@buaa_smat/hometrans 26.0.2 → 26.0.4-devecocli.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agents/code-reviewer.md +111 -154
- package/devecocli-plugin/common.ts +2271 -0
- package/devecocli-plugin/content-resolver.ts +363 -0
- package/devecocli-plugin/install.ts +72 -0
- package/devecocli-plugin/uninstall.ts +26 -0
- package/devecocli-plugin/update.ts +77 -0
- package/i18n/FILE-NAMES.md +9 -0
- package/i18n/agents/code-reviewer.md +436 -0
- package/i18n/agents/model-render-worker.md +38 -0
- package/i18n/agents/specgen-worker.md +18 -0
- package/i18n/commands/hometrans.md +17 -0
- package/i18n/skills/a2h-app-migrate/SKILL.md +206 -0
- package/i18n/skills/a2h-app-migrate/references/config.example.json +28 -0
- package/i18n/skills/a2h-app-migrate/references/feature-scope.md +121 -0
- package/i18n/skills/a2h-app-migrate/references/specs.example.json +19 -0
- package/i18n/skills/a2h-app-migrate/references/stage-map.md +50 -0
- package/i18n/skills/a2h-app-migrate/references/workflow.yaml +2007 -0
- package/i18n/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +187 -0
- package/i18n/skills/a2h-app-migrate/scripts/env_preflight.mjs +1656 -0
- package/i18n/skills/a2h-app-migrate/scripts/human_review_gate.mjs +728 -0
- package/i18n/skills/a2h-app-migrate/scripts/validate_workflow.mjs +541 -0
- package/i18n/skills/a2h-app-migrate/test/test_android_index.mjs +143 -0
- package/i18n/skills/a2h-app-migrate/test/test_arch_done.mjs +54 -0
- package/i18n/skills/a2h-app-migrate/test/test_build_fixer_contract.mjs +98 -0
- package/i18n/skills/a2h-app-migrate/test/test_config_example.mjs +42 -0
- package/i18n/skills/a2h-app-migrate/test/test_ensure_utg_snapshot.mjs +147 -0
- package/i18n/skills/a2h-app-migrate/test/test_env_requirements.mjs +713 -0
- package/i18n/skills/a2h-app-migrate/test/test_finalize.mjs +117 -0
- package/i18n/skills/a2h-app-migrate/test/test_image_probe.mjs +120 -0
- package/i18n/skills/a2h-app-migrate/test/test_interaction.mjs +122 -0
- package/i18n/skills/a2h-app-migrate/test/test_preflight_report.mjs +93 -0
- package/i18n/skills/a2h-app-migrate/test/test_resume_plan.mjs +271 -0
- package/i18n/skills/a2h-app-migrate/test/test_resume_summary.mjs +222 -0
- package/i18n/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +136 -0
- package/i18n/skills/a2h-app-migrate/test/test_run_dir.mjs +552 -0
- package/i18n/skills/a2h-app-migrate/test/test_skill_doc.mjs +144 -0
- package/i18n/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +263 -0
- package/i18n/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +165 -0
- package/i18n/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +76 -0
- package/i18n/skills/a2h-app-migrate/test/test_ui_batch_gate.mjs +226 -0
- package/i18n/skills/a2h-app-migrate/test/test_user_facing_progress.mjs +43 -0
- package/i18n/skills/a2h-app-migrate/test/test_utg_static_done.mjs +207 -0
- package/i18n/skills/a2h-app-migrate/test/test_validate_workflow_bilingual.mjs +87 -0
- package/i18n/skills/a2h-arch-generate/SKILL.md +378 -0
- package/i18n/skills/a2h-arch-generate/examples/reconcile-existing-project.md +107 -0
- package/i18n/skills/a2h-arch-generate/examples/simple-conversion-backend.md +70 -0
- package/i18n/skills/a2h-arch-generate/references/arkts-mvvm-v2.md +1407 -0
- package/i18n/skills/a2h-arch-generate/references/artifact-contracts.generate.md +120 -0
- package/i18n/skills/a2h-arch-generate/references/artifact-contracts.reconcile.md +123 -0
- package/i18n/skills/a2h-arch-generate/references/bpta-layered-architecture-design.md +88 -0
- package/i18n/skills/a2h-arch-generate/references/database-schema-recovery.md +107 -0
- package/i18n/skills/a2h-arch-generate/references/existing-target-annotation.md +68 -0
- package/i18n/skills/a2h-arch-generate/references/harmony-project-inspection.md +150 -0
- package/i18n/skills/a2h-arch-generate/references/harmony-target-architecture.md +94 -0
- package/i18n/skills/a2h-arch-generate/references/homegraph-workflow.md +131 -0
- package/i18n/skills/a2h-arch-generate/references/source-baseline.md +93 -0
- package/i18n/skills/a2h-arch-generate/scripts/generate_source_baseline.mjs +360 -0
- package/i18n/skills/a2h-arch-generate/scripts/inspect_harmony_target.mjs +798 -0
- package/i18n/skills/a2h-arch-generate/scripts/lib/contract_terms.mjs +40 -0
- package/i18n/skills/a2h-arch-generate/scripts/module_create/generate.mjs +639 -0
- package/i18n/skills/a2h-arch-generate/scripts/module_create/testdata/reconcile-layer-PROJECT_DESIGN.md +47 -0
- package/i18n/skills/a2h-arch-generate/scripts/module_create/testdata/single-entry-PROJECT_DESIGN.md +15 -0
- package/i18n/skills/a2h-arch-generate/scripts/module_create/testdata/three-layer-PROJECT_DESIGN.md +36 -0
- package/i18n/skills/a2h-arch-generate/scripts/module_create/testdata/verification-report.md +150 -0
- package/i18n/skills/a2h-arch-generate/scripts/tests/e2e/fixtures/uniapp_source/pages.json +5 -0
- package/i18n/skills/a2h-arch-generate/scripts/tests/e2e/run_e2e.mjs +548 -0
- package/i18n/skills/a2h-arch-generate/scripts/tests/run_tests.mjs +1261 -0
- package/i18n/skills/a2h-arch-generate/scripts/tests/test_module_templates.mjs +70 -0
- package/i18n/skills/a2h-arch-generate/scripts/validate_architecture_docs.mjs +851 -0
- package/i18n/skills/a2h-arch-generate/scripts/validate_data_docs.mjs +982 -0
- package/i18n/skills/a2h-arkts-logic-coder/SKILL.md +304 -0
- package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +10 -0
- package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +249 -0
- package/i18n/skills/a2h-arkts-logic-coder/references/spec-design.md +344 -0
- package/i18n/skills/a2h-arkts-logic-coder/scripts/design/move_spec_technical_reference.mjs +162 -0
- package/i18n/skills/a2h-arkts-logic-coder/scripts/design/validate_spec_design_output.mjs +298 -0
- package/i18n/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +877 -0
- package/i18n/skills/a2h-arkts-logic-coder/scripts/test_check_units.ts +149 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/golden/move_design.md +18 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/golden/move_design_crlf.md +18 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/golden/move_spec.md +7 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/golden/validate_issue_file.md +12 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/golden/validate_issues.json +57 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/test_spec_design_scripts.mjs +547 -0
- package/i18n/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +597 -0
- package/i18n/skills/a2h-batch-ui-align/SKILL.md +372 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/alignment.md +35 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/build.md +13 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/canvas.md +17 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/dynamics.md +27 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/geometry.md +85 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/interaction.md +23 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/resources.md +89 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/state-v1.md +29 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/state.md +14 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +62 -0
- package/i18n/skills/a2h-batch-ui-align/references/cards/window.md +30 -0
- package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +930 -0
- package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +420 -0
- package/i18n/skills/a2h-batch-ui-align/references/incremental-scope.md +158 -0
- package/i18n/skills/a2h-batch-ui-align/references/lottie-integration.md +43 -0
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +2552 -0
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +560 -0
- package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +175 -0
- package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_decorator-quickref.md +251 -0
- package/i18n/skills/a2h-batch-ui-align/references/state-mgmt/_paradigm-selection.md +28 -0
- package/i18n/skills/a2h-batch-ui-align/references/step3-capture.md +232 -0
- package/i18n/skills/a2h-batch-ui-align/references/step4-prepare.md +206 -0
- package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +232 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/android_parse_fast.ts +2005 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/branch_coverage.mjs +155 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +2118 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/databinding_analyzer_design.md +79 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/detect_paradigm.mjs +245 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/draw_coverage.mjs +264 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +1805 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/gen_rule_docs.mjs +100 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/generate_pages_json.mjs +612 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/group_pack.mjs +1959 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +147 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/image_probe.mjs +405 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/measure_pack.ts +1632 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +1300 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +1234 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/state_doc.mjs +417 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/core/cli.ts +134 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/core/i18n.ts +18 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/main.ts +216 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +615 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/android_immersive.ts +125 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +49 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/block_comment_break.ts +64 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/blur_mirrored.ts +134 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/builder_call_sites.ts +242 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/builder_invokes_callback.ts +136 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/canvas.ts +255 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/color_string.ts +109 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/column_shrink.ts +154 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/constant_coordinate.ts +39 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/container_align.ts +140 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/dialog_backboard.ts +91 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/entry_root_builtin.ts +69 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/entry_route.ts +114 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/event_default_click.ts +179 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/fixed_size_safe_area.ts +103 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/format_string.ts +157 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/framework_dialog.ts +110 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/framework_picker.ts +115 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +339 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/image_source.ts +84 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/input_traps.ts +249 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +780 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_host.ts +145 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_content.ts +138 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +408 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/offset_in_scroll.ts +163 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/orphan_component.ts +119 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_binds.ts +56 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_string.ts +96 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +179 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/page_reachability.ts +94 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/path_commands_vp.ts +50 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +81 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/popup_menu.ts +137 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/r_template_string.ts +37 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +102 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/request_permission.ts +98 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/resource_as_string.ts +68 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +147 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/runtime_traps.ts +440 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/safe_area_clipping.ts +168 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +127 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_delta.ts +178 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/sdk_api.ts +195 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/shared_chrome.ts +73 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/sheet_blur.ts +95 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/shell_content.ts +198 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/stack_occluding.ts +118 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/state_decorators.ts +73 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/state_name_shadows.ts +93 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/string_quote_leak.ts +73 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/surface_stroke.ts +50 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/swiper_index.ts +65 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +184 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/track_getter.ts +132 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/waterflow_sections.ts +231 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +53 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/window_mode.ts +67 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_a11y.test.mjs +598 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_blur.test.mjs +217 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_builder_calls.test.mjs +323 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_fidelity.test.mjs +507 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_input_runtime.test.mjs +514 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +651 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_occlusion_offset_format.test.mjs +372 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_overlay_lottie.test.mjs +199 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_review_fixes.test.mjs +298 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rules.test.mjs +365 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_scroll_padding_raster.test.mjs +262 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_weight_color.test.mjs +473 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/branch_coverage.test.mjs +116 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +693 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/draw_coverage.test.mjs +245 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/export_ui_info.test.mjs +742 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/generate_pages_json.test.mjs +123 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/group_pack.test.mjs +363 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/image_probe.test.mjs +243 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +326 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/occlusion.test.mjs +102 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +356 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +60 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +395 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/static_check_registry.test.mjs +122 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/tests/text_color_diff.test.mjs +250 -0
- package/i18n/skills/a2h-batch-ui-align/scripts/text_color_diff.mjs +470 -0
- package/i18n/skills/a2h-coldstart-smoke-gate/SKILL.md +62 -0
- package/i18n/skills/a2h-dashboard-render/SKILL.md +73 -0
- package/i18n/skills/a2h-dashboard-render/references/artifact-contract.jsonc +117 -0
- package/i18n/skills/a2h-dashboard-render/references/artifact-registry-spec.md +67 -0
- package/i18n/skills/a2h-dashboard-render/references/dashboard-guide.md +91 -0
- package/i18n/skills/a2h-dashboard-render/references/dashboard.config.example.json +19 -0
- package/i18n/skills/a2h-dashboard-render/scripts/dashboard.mjs +3245 -0
- package/i18n/skills/a2h-dashboard-render/scripts/device_capture.mjs +2050 -0
- package/i18n/skills/a2h-dashboard-render/test/fixtures/page_capture/expected.json +156 -0
- package/i18n/skills/a2h-dashboard-render/test/fixtures/page_capture/hmos.json +1 -0
- package/i18n/skills/a2h-dashboard-render/test/fixtures/page_capture/list.xml +1 -0
- package/i18n/skills/a2h-dashboard-render/test/test_artifact_contract.mjs +168 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_architecture.mjs +118 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_build.mjs +93 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_i18n.mjs +154 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_node.mjs +1369 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_spec_pipeline.mjs +318 -0
- package/i18n/skills/a2h-dashboard-render/test/test_dashboard_ui_pipeline.mjs +81 -0
- package/i18n/skills/a2h-dashboard-render/test/test_device_capture_env.mjs +115 -0
- package/i18n/skills/a2h-dashboard-render/test/test_device_capture_policy.mjs +411 -0
- package/i18n/skills/a2h-dashboard-render/test/test_page_capture.mjs +147 -0
- package/i18n/skills/a2h-dashboard-render/test/test_usage_readers.mjs +512 -0
- package/i18n/skills/a2h-fix-build-errors/SKILL.md +304 -0
- package/i18n/skills/a2h-fix-build-errors/references/arkts-strict-patterns.md +219 -0
- package/i18n/skills/a2h-fix-build-errors/references/rdb-entity-pattern.md +131 -0
- package/i18n/skills/a2h-module-semantic-docs/SKILL.md +265 -0
- package/i18n/skills/a2h-module-semantic-docs/test/golden/module_structure.json +187 -0
- package/i18n/skills/a2h-module-semantic-docs/test/golden/module_understanding.json +351 -0
- package/i18n/skills/a2h-module-semantic-docs/test/golden/module_update_plan.json +495 -0
- package/i18n/skills/a2h-module-semantic-docs/test/golden/project_directory_structure.json +157 -0
- package/i18n/skills/a2h-module-semantic-docs/test/test_scan_and_commit.mjs +388 -0
- package/i18n/skills/a2h-page-specgen/SKILL.md +239 -0
- package/i18n/skills/a2h-page-specgen/references/behavior-ledger.md +1174 -0
- package/i18n/skills/a2h-page-specgen/references/body-language.md +179 -0
- package/i18n/skills/a2h-page-specgen/references/gates.md +329 -0
- package/i18n/skills/a2h-page-specgen/references/page-inventory.md +220 -0
- package/i18n/skills/a2h-page-specgen/references/scenario-authoring.md +274 -0
- package/i18n/skills/a2h-page-specgen/references/spec-example.md +312 -0
- package/i18n/skills/a2h-page-specgen/references/spec-template.md +210 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-audit.mjs +2436 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +1833 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-model.mjs +181 -0
- package/i18n/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +1205 -0
- package/i18n/skills/a2h-page-specgen/scripts/entry-evidence.mjs +1123 -0
- package/i18n/skills/a2h-page-specgen/scripts/facts-build.mjs +1613 -0
- package/i18n/skills/a2h-page-specgen/scripts/footprint.mjs +1650 -0
- package/i18n/skills/a2h-page-specgen/scripts/gate.mjs +864 -0
- package/i18n/skills/a2h-page-specgen/scripts/interactions.mjs +346 -0
- package/i18n/skills/a2h-page-specgen/scripts/inventory.mjs +371 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/contracts.mjs +155 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +235 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/hg.mjs +684 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/homegraph-process.mjs +102 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/homegraph-query.mjs +161 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/operation-reviews.mjs +913 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/prose.mjs +252 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/reach.mjs +53 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/semantic-detail.mjs +353 -0
- package/i18n/skills/a2h-page-specgen/scripts/lib/source-text.mjs +497 -0
- package/i18n/skills/a2h-page-specgen/scripts/operation-evidence.mjs +1542 -0
- package/i18n/skills/a2h-page-specgen/scripts/prepare.mjs +864 -0
- package/i18n/skills/a2h-page-specgen/scripts/render.mjs +276 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +897 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.json +25 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.json +47 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +2694 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +726 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +108 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.review.md +65 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +267 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.json +57 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +373 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +300 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/branch-checklist.md +32 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/gate-results.json +22 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/manifest.json +111 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/portability.test.mjs +141 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/review.md +22 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +553 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/android-entry-evidence.test.mjs +585 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +755 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-group.test.mjs +546 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-post.test.mjs +655 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +1234 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-component-gate.test.mjs +520 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +1516 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-finalize.test.mjs +759 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +630 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-model.test.mjs +118 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +798 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/behavior-regression.test.mjs +886 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +205 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +475 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/facts.test.mjs +1205 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +271 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/facts/i18n/zh.js.txt +8 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-b+zh+Hans/strings.xml +7 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-zh/strings.xml +8 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/App.vue +1 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-conflict-record.json +17 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-record.json +17 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/manifest.json +3 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages/list/index.vue +80 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages.json +14 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/source-record.json +15 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/components/RefreshPanel.vue +15 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/composables/useRefresh.ts +50 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/pages/help/index.vue +9 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/state/store.ts +4 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fixtures/utg/click_paths.json +28 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +1029 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/fsx.test.mjs +32 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +143 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/gate.test.mjs +1121 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +332 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/helpers.mjs +188 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/hg.test.mjs +549 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/homegraph-process-fixture.mjs +130 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/homegraph-query.test.mjs +288 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/integration.test.mjs +368 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +348 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +250 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/keys.test.mjs +776 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +1002 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +1103 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-homegraph-reproduction.mjs +365 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-homegraph.test.mjs +569 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prepare-pipeline.test.mjs +326 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +240 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/prose.test.mjs +427 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +531 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/reach.test.mjs +93 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +418 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +1782 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/render.test.mjs +536 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/review-followup.test.mjs +467 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/semantic-detail.test.mjs +949 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/submit.test.mjs +1239 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/uniapp-operation-evidence.test.mjs +639 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/utg-footprint-contract.test.mjs +274 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/utg-io.test.mjs +90 -0
- package/i18n/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +1801 -0
- package/i18n/skills/a2h-resource-convert/SKILL.md +375 -0
- package/i18n/skills/a2h-resource-convert/references/code-vector-icon-rules.md +336 -0
- package/i18n/skills/a2h-resource-convert/references/incremental-page-migration.md +272 -0
- package/i18n/skills/a2h-resource-convert/references/lottie-conversion-rules.md +226 -0
- package/i18n/skills/a2h-resource-convert/references/resource-mapping-rules.md +493 -0
- package/i18n/skills/a2h-resource-convert/references/step4-resource-types.md +251 -0
- package/i18n/skills/a2h-resource-convert/references/step7-report-template.md +217 -0
- package/i18n/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +2596 -0
- package/i18n/skills/a2h-resource-convert/scripts/lottie_hosts.ts +415 -0
- package/i18n/skills/a2h-resource-convert/scripts/tests/docs_only_i18n.test.mjs +44 -0
- package/i18n/skills/a2h-resource-convert/scripts/tests/lottie_hosts.test.mjs +222 -0
- package/i18n/skills/a2h-spec-design-pipeline/SKILL.md +238 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/coding-loop.md +358 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/homegraph-cli.md +307 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/initialization.md +103 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/merge-queue.md +266 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/post-loop.md +23 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/review-loop.md +71 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/scripts.md +55 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/specs.example.json +19 -0
- package/i18n/skills/a2h-spec-design-pipeline/references/state-and-resume.md +246 -0
- package/i18n/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +752 -0
- package/i18n/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +661 -0
- package/i18n/skills/a2h-spec-generate/SKILL.md +375 -0
- package/i18n/skills/a2h-spec-generate/references/batch-mode.md +215 -0
- package/i18n/skills/a2h-spec-generate/references/delete-blast-radius.md +3 -0
- package/i18n/skills/a2h-spec-generate/references/dispatch-watchdog.md +150 -0
- package/i18n/skills/a2h-spec-generate/references/fusion-task-contract.md +184 -0
- package/i18n/skills/a2h-spec-generate/references/input-formats.md +27 -0
- package/i18n/skills/a2h-spec-generate/references/library-evidence.md +3 -0
- package/i18n/skills/a2h-spec-generate/references/method-discipline.md +64 -0
- package/i18n/skills/a2h-spec-generate/references/optional-gates.json +45 -0
- package/i18n/skills/a2h-spec-generate/references/recall-guide.md +84 -0
- package/i18n/skills/a2h-spec-generate/references/recall-terse.md +3 -0
- package/i18n/skills/a2h-spec-generate/references/recall-uniapp.md +10 -0
- package/i18n/skills/a2h-spec-generate/references/requirement-scope.md +122 -0
- package/i18n/skills/a2h-spec-generate/references/review-checklist.md +22 -0
- package/i18n/skills/a2h-spec-generate/references/spec-sample-complex.md +80 -0
- package/i18n/skills/a2h-spec-generate/references/spec-sample-transfer.md +43 -0
- package/i18n/skills/a2h-spec-generate/references/spec-samples.md +65 -0
- package/i18n/skills/a2h-spec-generate/references/specs.schema.json +85 -0
- package/i18n/skills/a2h-spec-generate/references/synthesis-rules.md +145 -0
- package/i18n/skills/a2h-spec-generate/references/transfer-file.md +5 -0
- package/i18n/skills/a2h-spec-generate/references/transfer-socket.md +5 -0
- package/i18n/skills/a2h-spec-generate/references/worker-rules.md +129 -0
- package/i18n/skills/a2h-spec-generate/scripts/check-fused-spec.mjs +702 -0
- package/i18n/skills/a2h-spec-generate/scripts/check_spec.ts +515 -0
- package/i18n/skills/a2h-spec-generate/scripts/collect-specs.mjs +727 -0
- package/i18n/skills/a2h-spec-generate/scripts/feature-stem.mjs +151 -0
- package/i18n/skills/a2h-spec-generate/scripts/parse_requirements.ts +515 -0
- package/i18n/skills/a2h-spec-generate/scripts/prepare-facts.mjs +313 -0
- package/i18n/skills/a2h-spec-generate/scripts/publish-specs.mjs +354 -0
- package/i18n/skills/a2h-spec-generate/scripts/regroup-by-page.mjs +669 -0
- package/i18n/skills/a2h-spec-generate/scripts/render-tasks.mjs +385 -0
- package/i18n/skills/a2h-spec-generate/scripts/report.mjs +136 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/build.ts +2217 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/component-variants.ts +845 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/policy.ts +572 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/traceability.ts +580 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/analysis/req-model/build.ts +1265 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/area-facts.ts +1057 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/behavior-seed.ts +565 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/library-evidence.ts +544 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/navigation-guard.ts +363 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/schema.ts +317 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/selfcheck.ts +707 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/spec-bindings.ts +436 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/task-contract.ts +608 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/contracts.ts +650 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/task-contract.ts +178 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/tree-sitter-adapter.ts +923 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/model/finalize.ts +912 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/model/task.ts +279 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/requirement-scope.ts +163 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/source-index/homegraph.ts +1039 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/validation/req-text.ts +256 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fixtures/fusion-run.ts +243 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-area-facts.test.ts +576 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-detectors.test.ts +176 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-e2e.test.ts +103 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-schema.test.ts +111 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-selfcheck.test.ts +307 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-contract.test.ts +340 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-finalize.test.ts +1857 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-navigation-guard.test.ts +262 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-prepare.test.ts +722 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-scope.test.ts +339 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-selfcheck.test.ts +1253 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-spec.test.ts +608 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/model-scope.test.ts +411 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/model-task-contract.test.ts +300 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/model-v4.test.ts +1061 -0
- package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/uniapp-scanner.test.ts +159 -0
- package/i18n/skills/a2h-spec-generate/template/REQ.txt +22 -0
- package/i18n/skills/a2h-spec-generate/template/REQ.xlsx +0 -0
- package/i18n/skills/a2h-spec-generate/test/check-fused-spec.test.mjs +847 -0
- package/i18n/skills/a2h-spec-generate/test/check-spec.test.ts +415 -0
- package/i18n/skills/a2h-spec-generate/test/collect-specs.test.mjs +808 -0
- package/i18n/skills/a2h-spec-generate/test/feature-stem.test.mjs +157 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/components/MyCard.vue +9 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/feature/editor/index.vue +1 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/detail/index.vue +1 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/home/index.vue +33 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages/settings/index.vue +1 -0
- package/i18n/skills/a2h-spec-generate/test/fixtures/uniapp-src/src/pages.json +23 -0
- package/i18n/skills/a2h-spec-generate/test/inspect-uniapp.test.mjs +54 -0
- package/i18n/skills/a2h-spec-generate/test/prepare-facts.test.mjs +41 -0
- package/i18n/skills/a2h-spec-generate/test/publish-specs.test.mjs +295 -0
- package/i18n/skills/a2h-spec-generate/test/regroup-by-page.test.mjs +354 -0
- package/i18n/skills/a2h-spec-generate/test/render-tasks.test.mjs +596 -0
- package/i18n/skills/a2h-spec-generate/test/report.test.mjs +47 -0
- package/i18n/skills/a2h-utg-explorer/SKILL.md +126 -0
- package/i18n/skills/a2h-utg-explorer/references/architecture.md +282 -0
- package/i18n/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +908 -0
- package/i18n/skills/a2h-utg-explorer/scripts/final_utg.mjs +446 -0
- package/i18n/skills/a2h-utg-explorer/scripts/hint_check.mjs +147 -0
- package/i18n/skills/a2h-utg-explorer/scripts/hint_source.mjs +119 -0
- package/i18n/skills/a2h-utg-explorer/scripts/hybrid_route_cdp.mjs +376 -0
- package/i18n/skills/a2h-utg-explorer/scripts/recover_b.mjs +550 -0
- package/i18n/skills/a2h-utg-explorer/scripts/recover_d.mjs +647 -0
- package/i18n/skills/a2h-utg-explorer/scripts/seed_recipes.mjs +426 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/attest.test.mjs +66 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/compose_identity.test.mjs +302 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/content_wait.test.mjs +207 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +252 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/direct_launch.test.mjs +130 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/final_utg.test.mjs +135 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/generalization_fixes.test.mjs +252 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/hint_check.test.mjs +129 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/hybrid_route_identity.test.mjs +146 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +614 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +214 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/overflow_prefix.test.mjs +327 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/overlay_identity.test.mjs +204 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/page_identity_tiers.test.mjs +393 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/pager_navigation.test.mjs +119 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/panel_routes.test.mjs +208 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/pipeline.test.mjs +240 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/recover_b.test.mjs +173 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/recover_d.test.mjs +280 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/robustness_fixes.test.mjs +345 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/runner_capabilities.test.mjs +194 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/seed_recipes.test.mjs +261 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/semantics.test.mjs +102 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/state_ambiguity.test.mjs +92 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/twin_opener.test.mjs +119 -0
- package/i18n/skills/a2h-utg-explorer/scripts/tests/variant_strings.test.mjs +63 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/diagnostics.mjs +196 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/hybrid_route.mjs +140 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +1562 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +47 -0
- package/i18n/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +2714 -0
- package/i18n/skills/a2h-utg-static/SKILL.md +372 -0
- package/i18n/skills/a2h-utg-static/references/ui-elements-static-utg-schema.md +248 -0
- package/i18n/skills/a2h-utg-static/references/view-interactions.md +215 -0
- package/i18n/skills/a2h-utg-static/scripts/assemble.mjs +2190 -0
- package/i18n/skills/a2h-utg-static/scripts/audit.mjs +268 -0
- package/i18n/skills/a2h-utg-static/scripts/click_paths.mjs +720 -0
- package/i18n/skills/a2h-utg-static/scripts/compose_body_text.mjs +250 -0
- package/i18n/skills/a2h-utg-static/scripts/compose_titles.mjs +374 -0
- package/i18n/skills/a2h-utg-static/scripts/compose_widgets.mjs +498 -0
- package/i18n/skills/a2h-utg-static/scripts/data_model.mjs +590 -0
- package/i18n/skills/a2h-utg-static/scripts/data_producers.mjs +431 -0
- package/i18n/skills/a2h-utg-static/scripts/fragment_nav.mjs +1137 -0
- package/i18n/skills/a2h-utg-static/scripts/hybrid_scope.mjs +705 -0
- package/i18n/skills/a2h-utg-static/scripts/interaction_sites.mjs +267 -0
- package/i18n/skills/a2h-utg-static/scripts/label_resolve.mjs +958 -0
- package/i18n/skills/a2h-utg-static/scripts/lib/hybrid-provenance.mjs +201 -0
- package/i18n/skills/a2h-utg-static/scripts/lib/uniapp-routes.mjs +195 -0
- package/i18n/skills/a2h-utg-static/scripts/nl_hints.mjs +545 -0
- package/i18n/skills/a2h-utg-static/scripts/presenter_nav.mjs +490 -0
- package/i18n/skills/a2h-utg-static/scripts/static_prior.mjs +956 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/regression_matrix.mjs +1261 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_callee_string_default.mjs +30 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_chrome_tokens.mjs +60 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_commented_out_trigger.mjs +111 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +125 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_compose_vm_nav.mjs +289 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_data_model.mjs +120 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_data_producers.mjs +113 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_disabled_guard.mjs +42 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_drawer_panel_gesture.mjs +140 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_fresh_branch_guard.mjs +49 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hint_language.mjs +136 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_bundle_attribution.mjs +74 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_bundled_pages.mjs +181 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_provenance.mjs +150 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +457 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_hybrid_title_renders.mjs +118 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_label_accessor_forms.mjs +187 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_label_source.mjs +70 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_launch_intent_guard.mjs +67 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_login_interceptor.mjs +368 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_mode_and_cb_param.mjs +172 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +78 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_nl_hint_grammar.mjs +42 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_nl_hints_gate.mjs +85 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_nl_hints_off_path.mjs +67 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_non_gesture_step_flag.mjs +62 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_preference_widgets.mjs +48 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_read_text_crlf.mjs +41 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_sealed_dialog_state.mjs +148 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_state_specific_hop.mjs +130 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_synthetic_label_identity.mjs +51 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_template_title.mjs +61 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_ui_elements_flow_filter.mjs +110 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_data_table.mjs +340 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_relative_url.mjs +125 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_routes.mjs +161 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +330 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_utg_specgen_boundary.mjs +45 -0
- package/i18n/skills/a2h-utg-static/scripts/tests/test_viewpage_nav.mjs +340 -0
- package/i18n/skills/a2h-utg-static/scripts/uniapp_nav.mjs +1394 -0
- package/i18n/skills/a2h-utg-static/scripts/uniapp_widgets.mjs +244 -0
- package/i18n/skills/a2h-utg-static/tools/convert_static_utg_to_ui_elements.ts +769 -0
- package/index.js +1643 -0
- package/package.json +18 -168
- package/platforms/deveco/agents/code-reviewer.frontmatter.md +1 -1
- package/platforms/opencode/agents/code-reviewer.frontmatter.md +1 -1
- package/plugin.jsonc +12 -0
- package/skills/a2h-app-migrate/SKILL.md +31 -12
- package/skills/a2h-app-migrate/references/config.example.json +1 -0
- package/skills/a2h-app-migrate/references/feature-scope.md +121 -0
- package/skills/a2h-app-migrate/references/stage-map.md +4 -2
- package/skills/a2h-app-migrate/references/workflow.yaml +427 -103
- package/skills/a2h-app-migrate/scripts/android_index.mjs +35 -8
- package/skills/a2h-app-migrate/scripts/check_module_docs_done.mjs +39 -1
- package/skills/a2h-app-migrate/scripts/check_spec_gen_done.mjs +78 -6
- package/skills/a2h-app-migrate/scripts/check_spec_pipeline_done.mjs +144 -9
- package/skills/a2h-app-migrate/scripts/check_ui_batch_done.mjs +14 -1
- package/skills/a2h-app-migrate/scripts/check_utg_static_done.mjs +46 -5
- package/skills/a2h-app-migrate/scripts/diagnose.mjs +162 -0
- package/skills/a2h-app-migrate/scripts/env_preflight.mjs +178 -44
- package/skills/a2h-app-migrate/scripts/feature_scope.mjs +347 -0
- package/skills/a2h-app-migrate/scripts/human_review_gate.mjs +81 -11
- package/skills/a2h-app-migrate/scripts/infer_android_root.mjs +17 -1
- package/skills/a2h-app-migrate/scripts/ledger.mjs +80 -10
- package/skills/a2h-app-migrate/scripts/migration_manifest.mjs +351 -0
- package/skills/a2h-app-migrate/scripts/paths_preflight.mjs +9 -23
- package/skills/a2h-app-migrate/scripts/resume_plan.mjs +72 -12
- package/skills/a2h-app-migrate/scripts/reuse_static_utg.mjs +33 -1
- package/skills/a2h-app-migrate/scripts/run_dir.mjs +137 -41
- package/skills/a2h-app-migrate/scripts/scope_model.mjs +255 -0
- package/skills/a2h-app-migrate/scripts/scope_report.mjs +128 -0
- package/skills/a2h-app-migrate/scripts/source_fp.mjs +120 -0
- package/skills/a2h-app-migrate/scripts/spec_layout.mjs +2 -0
- package/skills/a2h-app-migrate/scripts/validate_workflow.mjs +38 -0
- package/skills/a2h-app-migrate/test/test_android_index.mjs +143 -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 +98 -0
- package/skills/a2h-app-migrate/test/test_config_example.mjs +42 -0
- package/skills/a2h-app-migrate/test/test_devecocli_docs_preflight.mjs +32 -0
- package/skills/a2h-app-migrate/test/test_ensure_utg_snapshot.mjs +147 -0
- package/skills/a2h-app-migrate/test/test_entry_guards.mjs +102 -0
- package/skills/a2h-app-migrate/test/test_env_requirements.mjs +713 -0
- package/skills/a2h-app-migrate/test/test_feature_scope.mjs +217 -0
- package/skills/a2h-app-migrate/test/test_finalize.mjs +117 -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_i18n_engine_mirror.mjs +51 -0
- package/skills/a2h-app-migrate/test/test_image_probe.mjs +120 -0
- package/skills/a2h-app-migrate/test/test_incremental_acceptance.mjs +145 -0
- package/skills/a2h-app-migrate/test/test_incremental_phase2.mjs +223 -0
- package/skills/a2h-app-migrate/test/test_incremental_phase2_acceptance.mjs +157 -0
- package/skills/a2h-app-migrate/test/test_incremental_profile.mjs +84 -0
- package/skills/a2h-app-migrate/test/test_infer_android_root.mjs +101 -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 +150 -0
- package/skills/a2h-app-migrate/test/test_migration_manifest.mjs +225 -0
- package/skills/a2h-app-migrate/test/test_module_docs_done.mjs +86 -0
- package/skills/a2h-app-migrate/test/test_parse_args.mjs +69 -0
- package/skills/a2h-app-migrate/test/test_preflight_report.mjs +93 -0
- package/skills/a2h-app-migrate/test/test_resume_plan.mjs +271 -0
- package/skills/a2h-app-migrate/test/test_resume_summary.mjs +222 -0
- package/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +136 -0
- package/skills/a2h-app-migrate/test/test_run_dir.mjs +552 -0
- package/skills/a2h-app-migrate/test/test_scope_model.mjs +172 -0
- package/skills/a2h-app-migrate/test/test_skill_doc.mjs +144 -0
- package/skills/a2h-app-migrate/test/test_spec_engine_acceptance.mjs +94 -0
- package/skills/a2h-app-migrate/test/test_spec_engine_contract.mjs +155 -0
- package/skills/a2h-app-migrate/test/test_spec_gen_done.mjs +263 -0
- package/skills/a2h-app-migrate/test/test_spec_gen_gate.mjs +165 -0
- package/skills/a2h-app-migrate/test/test_spec_pipeline_done.mjs +511 -0
- package/skills/a2h-app-migrate/test/test_specs_json_preflight.mjs +76 -0
- package/skills/a2h-app-migrate/test/test_ui_batch_capture_audit.mjs +106 -0
- package/skills/a2h-app-migrate/test/test_ui_batch_done.mjs +65 -0
- package/skills/a2h-app-migrate/test/test_ui_batch_gate.mjs +226 -0
- package/skills/a2h-app-migrate/test/test_uniapp_preflight.mjs +83 -0
- package/skills/a2h-app-migrate/test/test_user_facing_progress.mjs +43 -0
- package/skills/a2h-app-migrate/test/test_utg_dirs.mjs +41 -0
- package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +214 -0
- package/skills/a2h-app-migrate/test/test_validate_races.mjs +50 -0
- package/skills/a2h-app-migrate/test/test_validate_workflow_bilingual.mjs +87 -0
- package/skills/a2h-arch-generate/SKILL.md +20 -17
- package/skills/a2h-arch-generate/references/database-schema-recovery.md +2 -2
- package/skills/a2h-arch-generate/references/harmony-project-inspection.md +8 -8
- package/skills/a2h-arch-generate/references/homegraph-workflow.md +25 -14
- package/skills/a2h-arch-generate/references/module-evidence-subagent.md +2 -2
- package/skills/a2h-arch-generate/references/source-baseline.md +4 -4
- package/skills/a2h-arch-generate/scripts/cleanup_intermediates.mjs +34 -3
- package/skills/a2h-arch-generate/scripts/create_project.mjs +24 -1
- package/skills/a2h-arch-generate/scripts/generate_source_baseline.mjs +35 -46
- package/skills/a2h-arch-generate/scripts/inspect_and_route.mjs +29 -5
- package/skills/a2h-arch-generate/scripts/inspect_harmony_target.mjs +33 -40
- package/skills/a2h-arch-generate/scripts/module_create/generate.mjs +2 -3
- 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 +1260 -0
- package/skills/a2h-arch-generate/scripts/tests/test_cleanup.mjs +208 -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_module_templates.mjs +70 -0
- package/skills/a2h-arch-generate/scripts/tests/test_router.mjs +164 -0
- package/skills/a2h-arch-generate/scripts/validate_architecture_docs.mjs +2 -5
- package/skills/a2h-arch-generate/scripts/validate_incremental_docs.mjs +4 -2
- package/skills/a2h-arkts-logic-coder/SKILL.md +163 -15
- package/skills/a2h-arkts-logic-coder/references/ISSUES.md +3 -1
- package/skills/a2h-arkts-logic-coder/references/code-generation.md +120 -1
- package/skills/a2h-arkts-logic-coder/references/spec-design.md +46 -11
- package/skills/a2h-arkts-logic-coder/scripts/design/validate_spec_design_output.mjs +22 -25
- package/skills/a2h-arkts-logic-coder/scripts/state_doc.mjs +873 -0
- package/skills/a2h-arkts-logic-coder/test/golden/inspect_happy.json +20 -0
- package/skills/a2h-arkts-logic-coder/test/golden/move_design.md +18 -0
- package/skills/a2h-arkts-logic-coder/test/golden/move_design_crlf.md +18 -0
- package/skills/a2h-arkts-logic-coder/test/golden/move_spec.md +7 -0
- package/skills/a2h-arkts-logic-coder/test/golden/resolve_cases.json +36 -0
- package/skills/a2h-arkts-logic-coder/test/golden/validate_issue_file.md +12 -0
- package/skills/a2h-arkts-logic-coder/test/golden/validate_issues.json +57 -0
- package/skills/a2h-arkts-logic-coder/test/test_spec_design_scripts.mjs +547 -0
- package/skills/a2h-arkts-logic-coder/test/test_state_doc.mjs +596 -0
- package/skills/a2h-batch-ui-align/SKILL.md +78 -26
- package/skills/a2h-batch-ui-align/assets/ColorUtils.ets +16 -2
- package/skills/a2h-batch-ui-align/references/cards/alignment.md +5 -1
- package/skills/a2h-batch-ui-align/references/cards/geometry.md +6 -1
- package/skills/a2h-batch-ui-align/references/cards/interaction.md +2 -1
- package/skills/a2h-batch-ui-align/references/cards/resources.md +9 -3
- package/skills/a2h-batch-ui-align/references/cards/widgets.md +27 -3
- package/skills/a2h-batch-ui-align/references/cards/window.md +2 -1
- package/skills/a2h-batch-ui-align/references/checker-rules.md +301 -13
- package/skills/a2h-batch-ui-align/references/conversion-procedure.md +53 -13
- package/skills/a2h-batch-ui-align/references/host-dispatch.md +2 -0
- package/skills/a2h-batch-ui-align/references/incremental-scope.md +28 -9
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-atomic-component-mapping-reference.md +14 -9
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-interaction-mapping-reference.md +2 -2
- package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +28 -1
- package/skills/a2h-batch-ui-align/references/state-mgmt/_/350/243/205/351/245/260/345/231/250/351/200/237/346/237/245.md +30 -0
- package/skills/a2h-batch-ui-align/references/step3-capture.md +25 -6
- package/skills/a2h-batch-ui-align/references/step4-prepare.md +7 -2
- package/skills/a2h-batch-ui-align/references/step5-convert.md +33 -9
- package/skills/a2h-batch-ui-align/scripts/android_parse_fast.ts +6 -7
- package/skills/a2h-batch-ui-align/scripts/branch_coverage.mjs +155 -0
- package/skills/a2h-batch-ui-align/scripts/build_conversion_set.mjs +463 -22
- package/skills/a2h-batch-ui-align/scripts/capture_audit.mjs +474 -0
- package/skills/a2h-batch-ui-align/scripts/capture_fast.mjs +665 -0
- package/skills/a2h-batch-ui-align/scripts/capture_verify.mjs +552 -0
- package/skills/a2h-batch-ui-align/scripts/detach.mjs +5 -2
- package/skills/a2h-batch-ui-align/scripts/draw_coverage.mjs +264 -0
- package/skills/a2h-batch-ui-align/scripts/evidence_gate.mjs +263 -0
- package/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +20 -3
- package/skills/a2h-batch-ui-align/scripts/generate_pages_json.mjs +4 -5
- package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +220 -35
- package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +517 -41
- package/skills/a2h-batch-ui-align/scripts/icon_coverage.mjs +147 -0
- package/skills/a2h-batch-ui-align/scripts/image_probe.mjs +231 -54
- package/skills/a2h-batch-ui-align/scripts/list_existing.mjs +141 -0
- package/skills/a2h-batch-ui-align/scripts/measure_pack.ts +239 -14
- package/skills/a2h-batch-ui-align/scripts/page_gap.mjs +210 -0
- package/skills/a2h-batch-ui-align/scripts/phase5_check.mjs +98 -11
- package/skills/a2h-batch-ui-align/scripts/progress_identity.mjs +208 -0
- package/skills/a2h-batch-ui-align/scripts/scroll_verdict.mjs +62 -0
- package/skills/a2h-batch-ui-align/scripts/shell_contract.mjs +118 -4
- package/skills/a2h-batch-ui-align/scripts/shell_requests.mjs +273 -0
- package/skills/a2h-batch-ui-align/scripts/state_doc.mjs +9 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/core/android.ts +231 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/core/baseline.ts +79 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/core/i18n.ts +1 -5
- package/skills/a2h-batch-ui-align/scripts/static_check/core/parse.ts +90 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/core/scan.ts +44 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +61 -12
- package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +32 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/a11y.ts +3 -17
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/android_immersive.ts +3 -3
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/attr_chain.ts +1 -19
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/blur_mirrored.ts +2 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/builder_invokes_callback.ts +84 -19
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/color_string.ts +11 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/constant_coordinate.ts +2 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/dialog_backboard.ts +91 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/event_default_click.ts +179 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/framework_dialog.ts +110 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/framework_picker.ts +5 -5
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/hit_test.ts +339 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/image_source.ts +84 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/input_traps.ts +249 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/layout_placement.ts +234 -5
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/lottie_host.ts +145 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_content.ts +2 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/media_tint.ts +110 -12
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_binds.ts +56 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_string.ts +96 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/padding_in_size.ts +179 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/percent_height_in_scroll.ts +3 -2
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/popup_menu.ts +81 -8
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/relative_container_height.ts +102 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/root_weight.ts +54 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/runtime_traps.ts +440 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_align.ts +75 -23
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/scroll_delta.ts +178 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/swiper_index.ts +65 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/theme_color.ts +184 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/waterflow_sections.ts +231 -0
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/wide_constant_width.ts +4 -4
- package/skills/a2h-batch-ui-align/scripts/static_check/rules/window_mode.ts +2 -3
- package/skills/a2h-batch-ui-align/scripts/static_check/scan_file.ts +30 -2
- package/skills/a2h-batch-ui-align/scripts/tests/agent_cli.test.mjs +231 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_a11y.test.mjs +598 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_align_tint.test.mjs +312 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_baseline.test.mjs +129 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_blur.test.mjs +217 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_builder_calls.test.mjs +323 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_canvas_pct.test.mjs +312 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_coolmall_runtime2.test.mjs +697 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_fidelity.test.mjs +507 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_hit_test.test.mjs +298 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_input_runtime.test.mjs +514 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_layout_placement.test.mjs +651 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_occlusion_offset_format.test.mjs +372 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_overlay_lottie.test.mjs +199 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_review_fixes.test.mjs +298 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_rule_smoke.test.mjs +269 -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_runtime_api.test.mjs +346 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_scroll_padding_raster.test.mjs +262 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_scroll_safearea.test.mjs +742 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_shell.test.mjs +91 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_theme.test.mjs +86 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_theme_runtime.test.mjs +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_weight_color.test.mjs +473 -0
- package/skills/a2h-batch-ui-align/scripts/tests/branch_coverage.test.mjs +116 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set.test.mjs +693 -0
- package/skills/a2h-batch-ui-align/scripts/tests/build_conversion_set_scope.test.mjs +291 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_audit.test.mjs +179 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_fast.test.mjs +56 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_gate.test.mjs +197 -0
- package/skills/a2h-batch-ui-align/scripts/tests/capture_review_fixes.test.mjs +322 -0
- package/skills/a2h-batch-ui-align/scripts/tests/color_utils_asset.test.mjs +93 -0
- package/skills/a2h-batch-ui-align/scripts/tests/detect_paradigm.test.mjs +260 -0
- package/skills/a2h-batch-ui-align/scripts/tests/draw_coverage.test.mjs +244 -0
- package/skills/a2h-batch-ui-align/scripts/tests/evidence_gate.test.mjs +435 -0
- package/skills/a2h-batch-ui-align/scripts/tests/export_scroll_states.test.mjs +31 -0
- package/skills/a2h-batch-ui-align/scripts/tests/export_ui_info.test.mjs +742 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/SearchMenuDialog.buggy.ets +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/meta.json +21 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/screenshot.png +0 -0
- package/skills/a2h-batch-ui-align/scripts/tests/fixtures/icon_drift_search_sheet/page_0002_SearchMenuFragment/view.xml +35 -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 +363 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_pack_evidence.test.mjs +95 -0
- package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +1782 -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/icon_coverage.test.mjs +314 -0
- package/skills/a2h-batch-ui-align/scripts/tests/image_probe.test.mjs +243 -0
- package/skills/a2h-batch-ui-align/scripts/tests/list_existing.test.mjs +157 -0
- package/skills/a2h-batch-ui-align/scripts/tests/measure_pack.test.mjs +326 -0
- package/skills/a2h-batch-ui-align/scripts/tests/occlusion.test.mjs +102 -0
- package/skills/a2h-batch-ui-align/scripts/tests/page_gap.test.mjs +115 -0
- package/skills/a2h-batch-ui-align/scripts/tests/phase5_check.test.mjs +356 -0
- package/skills/a2h-batch-ui-align/scripts/tests/progress_identity.test.mjs +174 -0
- package/skills/a2h-batch-ui-align/scripts/tests/shell_contract.test.mjs +302 -0
- package/skills/a2h-batch-ui-align/scripts/tests/shell_requests.test.mjs +158 -0
- package/skills/a2h-batch-ui-align/scripts/tests/skill_doc_contract.test.mjs +60 -0
- package/skills/a2h-batch-ui-align/scripts/tests/state_doc.test.mjs +395 -0
- package/skills/a2h-batch-ui-align/scripts/tests/static_check_registry.test.mjs +122 -0
- package/skills/a2h-batch-ui-align/scripts/tests/test_bfs_exit.ts +49 -0
- package/skills/a2h-batch-ui-align/scripts/tests/text_color_diff.test.mjs +250 -0
- package/skills/a2h-coldstart-smoke-gate/SKILL.md +7 -4
- package/skills/a2h-dashboard-render/scripts/dashboard.mjs +12 -14
- package/skills/a2h-dashboard-render/scripts/device_capture.mjs +29 -30
- 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 +168 -0
- package/skills/a2h-dashboard-render/test/test_cli_check_registry.mjs +99 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_architecture.mjs +118 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_build.mjs +93 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_i18n.mjs +203 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_node.mjs +1369 -0
- package/skills/a2h-dashboard-render/test/test_dashboard_spec_pipeline.mjs +318 -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 +411 -0
- package/skills/a2h-dashboard-render/test/test_device_locale_dialogs.mjs +17 -0
- package/skills/a2h-dashboard-render/test/test_page_capture.mjs +147 -0
- package/skills/a2h-dashboard-render/test/test_usage_readers.mjs +512 -0
- package/skills/a2h-module-semantic-docs/SKILL.md +51 -13
- package/skills/a2h-module-semantic-docs/scripts/scan_modules.mjs +66 -11
- 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_incremental_fingerprint.mjs +94 -0
- package/skills/a2h-module-semantic-docs/test/test_scan_and_commit.mjs +388 -0
- package/skills/a2h-page-specgen/SKILL.md +240 -0
- package/skills/a2h-page-specgen/references/behavior-ledger.md +1170 -0
- package/skills/a2h-page-specgen/references/body-language.md +179 -0
- package/skills/a2h-page-specgen/references/evidence.md +105 -0
- package/skills/a2h-page-specgen/references/execution-model.md +364 -0
- package/skills/a2h-page-specgen/references/footprint-and-grouping.md +255 -0
- package/skills/a2h-page-specgen/references/gates.md +323 -0
- package/skills/a2h-page-specgen/references/page-inventory.md +220 -0
- package/skills/a2h-page-specgen/references/scenario-authoring.md +272 -0
- package/skills/a2h-page-specgen/references/spec-example.md +312 -0
- package/skills/a2h-page-specgen/references/spec-template.md +210 -0
- package/skills/a2h-page-specgen/scripts/behavior-audit.mjs +2436 -0
- package/skills/a2h-page-specgen/scripts/behavior-discovery.mjs +1833 -0
- package/skills/a2h-page-specgen/scripts/behavior-model.mjs +181 -0
- package/skills/a2h-page-specgen/scripts/behavior-reconcile.mjs +1205 -0
- package/skills/a2h-page-specgen/scripts/dispatch.mjs +212 -0
- package/skills/a2h-page-specgen/scripts/entry-evidence.mjs +1123 -0
- package/skills/a2h-page-specgen/scripts/facts-build.mjs +1613 -0
- package/skills/a2h-page-specgen/scripts/finalize.mjs +825 -0
- package/skills/a2h-page-specgen/scripts/footprint.mjs +1650 -0
- package/skills/a2h-page-specgen/scripts/gate.mjs +848 -0
- package/skills/a2h-page-specgen/scripts/interactions.mjs +344 -0
- package/skills/a2h-page-specgen/scripts/inventory.mjs +371 -0
- package/skills/a2h-page-specgen/scripts/lib/contracts.mjs +155 -0
- package/skills/a2h-page-specgen/scripts/lib/deps-source.mjs +399 -0
- package/skills/a2h-page-specgen/scripts/lib/draft-store.mjs +229 -0
- package/skills/a2h-page-specgen/scripts/lib/footprint-roles.mjs +278 -0
- package/skills/a2h-page-specgen/scripts/lib/fsx.mjs +79 -0
- package/skills/a2h-page-specgen/scripts/lib/graph-evidence.mjs +235 -0
- package/skills/a2h-page-specgen/scripts/lib/hg.mjs +683 -0
- package/skills/a2h-page-specgen/scripts/lib/homegraph-process.mjs +102 -0
- package/skills/a2h-page-specgen/scripts/lib/homegraph-query.mjs +161 -0
- package/skills/a2h-page-specgen/scripts/lib/ledger.mjs +478 -0
- package/skills/a2h-page-specgen/scripts/lib/main-module.mjs +24 -0
- package/skills/a2h-page-specgen/scripts/lib/operation-reviews.mjs +913 -0
- package/skills/a2h-page-specgen/scripts/lib/prose.mjs +238 -0
- package/skills/a2h-page-specgen/scripts/lib/reach.mjs +53 -0
- package/skills/a2h-page-specgen/scripts/lib/recovery-policy.mjs +28 -0
- package/skills/a2h-page-specgen/scripts/lib/scope.mjs +355 -0
- package/skills/a2h-page-specgen/scripts/lib/semantic-detail.mjs +353 -0
- package/skills/a2h-page-specgen/scripts/lib/source-text.mjs +497 -0
- package/skills/a2h-page-specgen/scripts/lib/symbols.mjs +125 -0
- package/skills/a2h-page-specgen/scripts/lib/utg-io.mjs +110 -0
- package/skills/a2h-page-specgen/scripts/lib/waker-event-store.mjs +658 -0
- package/skills/a2h-page-specgen/scripts/operation-evidence.mjs +1542 -0
- package/skills/a2h-page-specgen/scripts/prepare.mjs +840 -0
- package/skills/a2h-page-specgen/scripts/render.mjs +294 -0
- package/skills/a2h-page-specgen/scripts/report.mjs +340 -0
- package/skills/a2h-page-specgen/scripts/submission.mjs +697 -0
- package/skills/a2h-page-specgen/scripts/submit.mjs +85 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/README.md +77 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/acceptance.mjs +871 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.java +15 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.json +26 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/PlainDisplayPage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.java +36 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.json +43 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/SilentFailurePage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.discovery.json +2694 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.json +726 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.post-review.json +108 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.review.md +65 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/UniAppSourcePage.worker.md +265 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.java +47 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.json +54 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.prompt.md +347 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/ValidatedSearchPage.worker.md +298 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/branch-checklist.md +32 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/gate-results.json +22 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/manifest.json +111 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/portability.test.mjs +141 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/review.md +22 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/authoring/run.mjs +515 -0
- package/skills/a2h-page-specgen/scripts/test/acceptance/cases.example.json +57 -0
- package/skills/a2h-page-specgen/scripts/test/android-entry-evidence.test.mjs +585 -0
- package/skills/a2h-page-specgen/scripts/test/android-operation-evidence.test.mjs +755 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-group.test.mjs +543 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-post.test.mjs +652 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-audit-pre.test.mjs +1231 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-component-gate.test.mjs +494 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-discovery.test.mjs +1513 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-finalize.test.mjs +758 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-fixtures.mjs +623 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-model.test.mjs +116 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-reconcile.test.mjs +795 -0
- package/skills/a2h-page-specgen/scripts/test/behavior-regression.test.mjs +883 -0
- package/skills/a2h-page-specgen/scripts/test/contracts.test.mjs +205 -0
- package/skills/a2h-page-specgen/scripts/test/dispatch.test.mjs +258 -0
- package/skills/a2h-page-specgen/scripts/test/entry-evidence.test.mjs +475 -0
- package/skills/a2h-page-specgen/scripts/test/facts.test.mjs +1203 -0
- package/skills/a2h-page-specgen/scripts/test/finalize.test.mjs +243 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Api.kt +20 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/BothAnnotations.kt +28 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Cache.kt +7 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Comments.kt +26 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Mmkv.kt +7 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Models.kt +19 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Pair.kt +7 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Prefs.kt +9 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Room.kt +11 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Sample.kt +43 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Templates.kt +34 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/Timeouts.kt +8 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/androidTest/Helper.kt +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/build.gradle.kts +16 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/i18n/en.js.txt +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/i18n/zh.js.txt +4 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/libs.versions.toml +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/package.json +10 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values/strings.xml +10 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-b+zh+Hans/strings.xml +4 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-land/strings.xml +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-night/strings.xml +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-v21/strings.xml +4 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/res/values-zh/strings.xml +4 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/test/Legacy.kt +4 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts/weather.proto +11 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-container/src/AppPreferences.kt +13 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-container/src/SettingsViewModel.kt +16 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-dao/src/UserDao.kt +28 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-moko/i18n/src/commonMain/moko-resources/base/strings.xml +6 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-moko/i18n/src/commonMain/moko-resources/fil/strings.xml +6 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/res/values/arrays.xml +25 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/res/values/strings.xml +10 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/res/xml/prefs.xml +27 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/Api.java +19 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/Datastore.kt +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/Settings.java +13 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/forecast.js +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-pref/src/store.js +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-receiver/src/BasePreferences.kt +13 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-receiver/src/Screen.kt +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-receiver/src/UiPreferences.kt +8 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/facts-retrofit/src/AuthAPI.kt +26 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/AndroidManifest.xml +20 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/feature/auth/navigation/ScreenRoute.kt +8 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/pages.json +19 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/components/Widget.vue +11 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/pages/detail/detail.vue +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/pages/index/index.vue +24 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/store/userStore.js +11 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp/src/uni_modules/uview-ui/components/u-thing.js +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/fp.mkdb.mjs +144 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/hg.mkdb.mjs +112 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanels.java +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanels.kt +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/BottomPanelsKotlinForms.kt +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ChildContent.java +6 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ComposeLifecycle.kt +26 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/LifecycleCallAndOverride.java +10 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/LifecycleHooks.kt +31 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/MainFragment.java +6 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ManyLifecycleHooks.kt +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ManyListeners.java +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/PlainActivity.java +3 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/RefreshOnResume.java +7 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/RefreshResultNoise.kt +36 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/SelectionView.java +5 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ShowPage.vue +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/ThirdPartyLifecycle.kt +25 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/src/fragment_detail.xml +1 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/App.vue +1 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-conflict-record.json +17 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/bundle-record.json +17 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/manifest.json +3 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages/list/index.vue +80 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/pages.json +14 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/source-record.json +15 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/components/RefreshPanel.vue +15 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/composables/useRefresh.ts +50 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/pages/help/index.vue +9 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/uniapp-source/src/state/store.ts +4 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/utg/click_paths.json +28 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/utg/fold-chain/utg.json +12 -0
- package/skills/a2h-page-specgen/scripts/test/fixtures/utg/utg.json +34 -0
- package/skills/a2h-page-specgen/scripts/test/footprint-resolve.test.mjs +1029 -0
- package/skills/a2h-page-specgen/scripts/test/footprint-roles.test.mjs +172 -0
- package/skills/a2h-page-specgen/scripts/test/fsx.test.mjs +32 -0
- package/skills/a2h-page-specgen/scripts/test/gate-partial.test.mjs +143 -0
- package/skills/a2h-page-specgen/scripts/test/gate.test.mjs +1078 -0
- package/skills/a2h-page-specgen/scripts/test/graph-evidence.test.mjs +332 -0
- package/skills/a2h-page-specgen/scripts/test/helpers.mjs +188 -0
- package/skills/a2h-page-specgen/scripts/test/hg.test.mjs +549 -0
- package/skills/a2h-page-specgen/scripts/test/homegraph-process-fixture.mjs +130 -0
- package/skills/a2h-page-specgen/scripts/test/homegraph-query.test.mjs +288 -0
- package/skills/a2h-page-specgen/scripts/test/integration.test.mjs +368 -0
- package/skills/a2h-page-specgen/scripts/test/interactions.test.mjs +310 -0
- package/skills/a2h-page-specgen/scripts/test/inventory.test.mjs +250 -0
- package/skills/a2h-page-specgen/scripts/test/keys.test.mjs +776 -0
- package/skills/a2h-page-specgen/scripts/test/ledger-lock.test.mjs +77 -0
- package/skills/a2h-page-specgen/scripts/test/ledger.test.mjs +464 -0
- package/skills/a2h-page-specgen/scripts/test/main-module.test.mjs +43 -0
- package/skills/a2h-page-specgen/scripts/test/operation-reviews.test.mjs +1002 -0
- package/skills/a2h-page-specgen/scripts/test/plan-build.test.mjs +1103 -0
- package/skills/a2h-page-specgen/scripts/test/prepare-homegraph-reproduction.mjs +365 -0
- package/skills/a2h-page-specgen/scripts/test/prepare-homegraph.test.mjs +569 -0
- package/skills/a2h-page-specgen/scripts/test/prepare-index.test.mjs +160 -0
- package/skills/a2h-page-specgen/scripts/test/prepare-pipeline.test.mjs +326 -0
- package/skills/a2h-page-specgen/scripts/test/prompt-tpl.test.mjs +236 -0
- package/skills/a2h-page-specgen/scripts/test/prose.test.mjs +398 -0
- package/skills/a2h-page-specgen/scripts/test/protocol-docs.test.mjs +531 -0
- package/skills/a2h-page-specgen/scripts/test/reach.test.mjs +93 -0
- package/skills/a2h-page-specgen/scripts/test/recovery-e2e.test.mjs +418 -0
- package/skills/a2h-page-specgen/scripts/test/recovery-policy.test.mjs +14 -0
- package/skills/a2h-page-specgen/scripts/test/recovery.test.mjs +1782 -0
- package/skills/a2h-page-specgen/scripts/test/render.test.mjs +546 -0
- package/skills/a2h-page-specgen/scripts/test/report.test.mjs +296 -0
- package/skills/a2h-page-specgen/scripts/test/review-followup.test.mjs +467 -0
- package/skills/a2h-page-specgen/scripts/test/scope.test.mjs +292 -0
- package/skills/a2h-page-specgen/scripts/test/semantic-detail.test.mjs +949 -0
- package/skills/a2h-page-specgen/scripts/test/source-text.test.mjs +181 -0
- package/skills/a2h-page-specgen/scripts/test/submit.test.mjs +1231 -0
- package/skills/a2h-page-specgen/scripts/test/uniapp-operation-evidence.test.mjs +639 -0
- package/skills/a2h-page-specgen/scripts/test/utg-footprint-contract.test.mjs +274 -0
- package/skills/a2h-page-specgen/scripts/test/utg-io.test.mjs +90 -0
- package/skills/a2h-page-specgen/scripts/test/waker-event-store.test.mjs +1365 -0
- package/skills/a2h-page-specgen/scripts/test/waker-process.test.mjs +1801 -0
- package/skills/a2h-page-specgen/scripts/test/waker.test.mjs +1993 -0
- package/skills/a2h-page-specgen/scripts/test/watchdog.test.mjs +342 -0
- package/skills/a2h-page-specgen/scripts/waker.mjs +1301 -0
- package/skills/a2h-page-specgen/scripts/watchdog.mjs +299 -0
- package/skills/a2h-resource-convert/SKILL.md +9 -1
- package/skills/a2h-resource-convert/references/code-vector-icon-rules.md +2 -1
- package/skills/a2h-resource-convert/references/incremental-page-migration.md +23 -2
- package/skills/a2h-resource-convert/references/lottie-conversion-rules.md +7 -0
- package/skills/a2h-resource-convert/references/step4-resource-types.md +2 -0
- package/skills/a2h-resource-convert/scripts/a2h_resource_convert.ts +115 -53
- package/skills/a2h-resource-convert/scripts/a2h_resource_incremental.ts +68 -0
- package/skills/a2h-resource-convert/scripts/code_vector_icons.ts +45 -3
- package/skills/a2h-resource-convert/scripts/extract_page_resources.ts +42 -5
- package/skills/a2h-resource-convert/scripts/lottie_hosts.ts +415 -0
- package/skills/a2h-resource-convert/scripts/lottie_refs.ts +398 -0
- package/skills/a2h-resource-convert/scripts/merge_mapping.ts +316 -0
- package/skills/a2h-resource-convert/scripts/svg_fidelity_check.ts +2 -1
- 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-resource-convert/scripts/tests/code_vector_guard.test.mjs +75 -0
- package/skills/a2h-resource-convert/scripts/tests/docs_only_i18n.test.mjs +44 -0
- package/skills/a2h-resource-convert/scripts/tests/lottie_hosts.test.mjs +222 -0
- package/skills/a2h-resource-convert/scripts/tests/lottie_incremental.test.mjs +178 -0
- package/skills/a2h-resource-convert/scripts/tests/merge_mapping.test.mjs +201 -0
- package/skills/a2h-spec-design-pipeline/SKILL.md +98 -121
- package/skills/a2h-spec-design-pipeline/references/coding-loop.md +170 -45
- package/skills/a2h-spec-design-pipeline/references/execution-model.md +62 -12
- package/skills/a2h-spec-design-pipeline/references/final-report-template.md +6 -4
- package/skills/a2h-spec-design-pipeline/references/homegraph-cli.md +229 -0
- package/skills/a2h-spec-design-pipeline/references/initialization.md +49 -6
- package/skills/a2h-spec-design-pipeline/references/merge-queue.md +198 -54
- package/skills/a2h-spec-design-pipeline/references/permission-index.json +206 -0
- package/skills/a2h-spec-design-pipeline/references/post-loop.md +23 -0
- package/skills/a2h-spec-design-pipeline/references/resolver-prompt.md +67 -0
- package/skills/a2h-spec-design-pipeline/references/review-loop.md +46 -0
- package/skills/a2h-spec-design-pipeline/references/scripts.md +47 -14
- package/skills/a2h-spec-design-pipeline/references/shared-layer.md +390 -0
- package/skills/a2h-spec-design-pipeline/references/state-and-resume.md +148 -29
- package/skills/a2h-spec-design-pipeline/references/static-defect-gate.md +104 -24
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleMeta.json +18 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/config/ruleSet.json +16 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/README.md +47 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-param-contract.json +31 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/data/api-permission-map.json +698 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-cn.md +96 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/api-permission-declared-en.md +103 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-cn.md +124 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/arkui-runtime-pitfall-en.md +138 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-cn.md +106 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/document/checker/hometrans/platform-api-contract-en.md +113 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ApiPermissionDeclaredCheck.js +705 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/ArkUIRuntimePitfallCheck.js +1063 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/PlatformApiContractCheck.js +473 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/checker/platform/ExtraDataSubCheck.js +485 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/lib/index.js +13 -0
- package/skills/a2h-spec-design-pipeline/rules/migration-rules/package.json +18 -0
- package/skills/a2h-spec-design-pipeline/scripts/branch_landed.ts +12 -38
- package/skills/a2h-spec-design-pipeline/scripts/check_design_map.ts +108 -0
- package/skills/a2h-spec-design-pipeline/scripts/check_permissions.ts +420 -0
- package/skills/a2h-spec-design-pipeline/scripts/check_review_evidence.ts +45 -0
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/evidence.mjs +95 -7
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/fold.mjs +156 -7
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/landing.mjs +71 -0
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/progress.mjs +22 -3
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/reconcile.mjs +63 -4
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/wait.mjs +33 -3
- package/skills/a2h-spec-design-pipeline/scripts/dispatch/worktree.mjs +2 -2
- package/skills/a2h-spec-design-pipeline/scripts/dispatch.mjs +232 -13
- package/skills/a2h-spec-design-pipeline/scripts/ensure_index.ts +866 -0
- package/skills/a2h-spec-design-pipeline/scripts/fixtures/homecheck-stub.cjs +47 -0
- package/skills/a2h-spec-design-pipeline/scripts/homecheck_scan.ts +220 -44
- package/skills/a2h-spec-design-pipeline/scripts/lib/shared_classes.ts +113 -0
- package/skills/a2h-spec-design-pipeline/scripts/lib/shared_docs.ts +202 -0
- package/skills/a2h-spec-design-pipeline/scripts/lib/wiring.ts +58 -0
- package/skills/a2h-spec-design-pipeline/scripts/plan_groups.ts +178 -14
- package/skills/a2h-spec-design-pipeline/scripts/resolve_wiring.ts +3 -0
- package/skills/a2h-spec-design-pipeline/scripts/resolver_prompt.ts +368 -0
- package/skills/a2h-spec-design-pipeline/scripts/scan_shared.ts +642 -0
- package/skills/a2h-spec-design-pipeline/scripts/sync_permission_index.ts +340 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_api_permission_declared.ts +281 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_arkui_runtime_pitfall.ts +690 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_check_design_map.ts +46 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_check_permissions.ts +201 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_commands.mjs +42 -8
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_e2e.mjs +27 -9
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_evidence.mjs +242 -9
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_fold.mjs +192 -7
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_landing.mjs +531 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_progress.mjs +49 -1
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_reconcile.mjs +92 -4
- package/skills/a2h-spec-design-pipeline/scripts/test_dispatch_wait.mjs +51 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_index.ts +572 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_index_real.ts +56 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_homecheck_scan.ts +17 -10
- package/skills/a2h-spec-design-pipeline/scripts/test_homegraph_docs.ts +217 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_permission_index.ts +214 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_plan_groups.ts +155 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_platform_api_contract.ts +308 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_resolve_wiring.ts +14 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_resolver_prompt.ts +401 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_scan_shared.ts +996 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_classes.ts +80 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_docs.ts +205 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_docs.ts +165 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_shared_layer_e2e.ts +85 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_validate_shared_manifest.ts +720 -0
- package/skills/a2h-spec-design-pipeline/scripts/test_wiring.ts +40 -0
- package/skills/a2h-spec-design-pipeline/scripts/validate_shared_manifest.ts +566 -0
- package/skills/a2h-spec-generate/SKILL.md +89 -23
- package/skills/a2h-spec-generate/references/batch-mode.md +78 -17
- package/skills/a2h-spec-generate/references/dispatch-watchdog.md +150 -0
- package/skills/a2h-spec-generate/references/fusion-task-contract.md +7 -0
- package/skills/a2h-spec-generate/references/review-checklist.md +1 -0
- package/skills/a2h-spec-generate/references/specs.schema.json +24 -11
- package/skills/a2h-spec-generate/references/synthesis-rules.md +4 -2
- package/skills/a2h-spec-generate/references/worker-rules.md +6 -3
- package/skills/a2h-spec-generate/scripts/check-fused-spec.mjs +4 -5
- package/skills/a2h-spec-generate/scripts/check_spec.ts +145 -14
- package/skills/a2h-spec-generate/scripts/collect-specs.mjs +261 -19
- package/skills/a2h-spec-generate/scripts/dispatch-watch.mjs +1168 -0
- package/skills/a2h-spec-generate/scripts/ensure-index.mjs +1 -2
- package/skills/a2h-spec-generate/scripts/feature-stem.mjs +1 -2
- package/skills/a2h-spec-generate/scripts/publish-specs.mjs +1 -2
- package/skills/a2h-spec-generate/scripts/regroup-by-page.mjs +1 -2
- package/skills/a2h-spec-generate/scripts/render-tasks.mjs +25 -46
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/build.ts +26 -27
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/graph/component-variants.ts +3 -6
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/policy.ts +31 -32
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/names/traceability.ts +2 -3
- package/skills/a2h-spec-generate/scripts/reqgen/src/analysis/req-model/build.ts +15 -26
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/area-facts.ts +102 -81
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/behavior-seed.ts +39 -19
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/library-evidence.ts +12 -13
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/navigation-guard.ts +363 -0
- package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/task-contract.ts +35 -196
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/contracts.ts +3 -1
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/task-contract.ts +22 -96
- package/skills/a2h-spec-generate/scripts/reqgen/src/interaction-analysis/tree-sitter-adapter.ts +3 -4
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/contracts.ts +1 -1
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/finalize.ts +74 -7
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/prepare.ts +51 -7
- package/skills/a2h-spec-generate/scripts/reqgen/src/model/task.ts +42 -111
- package/skills/a2h-spec-generate/scripts/reqgen/src/requirement-scope.ts +1 -20
- package/skills/a2h-spec-generate/scripts/reqgen/src/source-index/homegraph.ts +1 -2
- package/skills/a2h-spec-generate/scripts/reqgen/src/validation/req-text.ts +3 -4
- 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/fixtures/fusion-run.ts +243 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fixtures/zip.ts +63 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-area-facts.test.ts +650 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-detectors.test.ts +176 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-e2e.test.ts +103 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-schema.test.ts +111 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-seed.test.ts +195 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-selfcheck.test.ts +307 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-contract.test.ts +347 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-finalize.test.ts +1948 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-library-evidence.test.ts +239 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-navigation-guard.test.ts +277 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-prepare.test.ts +844 -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 +1253 -0
- package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-spec.test.ts +608 -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 +411 -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 +300 -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/test/zip.test.ts +61 -0
- package/skills/a2h-spec-generate/test/check-fused-spec.test.mjs +879 -0
- package/skills/a2h-spec-generate/test/check-spec.test.ts +430 -0
- package/skills/a2h-spec-generate/test/collect-specs.test.mjs +811 -0
- package/skills/a2h-spec-generate/test/detect-project.test.mjs +37 -0
- package/skills/a2h-spec-generate/test/dispatch-watch.test.mjs +606 -0
- package/skills/a2h-spec-generate/test/ensure-index.test.mjs +229 -0
- package/skills/a2h-spec-generate/test/feature-stem.test.mjs +157 -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/prepare-facts.test.mjs +41 -0
- package/skills/a2h-spec-generate/test/publication-verdict.test.mjs +182 -0
- package/skills/a2h-spec-generate/test/publish-specs.test.mjs +295 -0
- package/skills/a2h-spec-generate/test/regroup-by-page.test.mjs +354 -0
- package/skills/a2h-spec-generate/test/render-tasks.test.mjs +596 -0
- package/skills/a2h-spec-generate/test/report.test.mjs +47 -0
- package/skills/a2h-utg-explorer/SKILL.md +9 -3
- package/skills/a2h-utg-explorer/references/architecture.md +7 -0
- package/skills/a2h-utg-explorer/scripts/audit.mjs +8 -2
- package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +120 -85
- package/skills/a2h-utg-explorer/scripts/direct_launch.mjs +47 -2
- package/skills/a2h-utg-explorer/scripts/hint_check.mjs +1 -2
- package/skills/a2h-utg-explorer/scripts/hybrid_route_cdp.mjs +376 -0
- package/skills/a2h-utg-explorer/scripts/plan.mjs +8 -0
- package/skills/a2h-utg-explorer/scripts/recover.mjs +1 -1
- package/skills/a2h-utg-explorer/scripts/recover_d.mjs +288 -21
- package/skills/a2h-utg-explorer/scripts/rejudge.mjs +5 -3
- package/skills/a2h-utg-explorer/scripts/report.mjs +89 -0
- package/skills/a2h-utg-explorer/scripts/run_cycle.mjs +67 -10
- package/skills/a2h-utg-explorer/scripts/run_device.mjs +10 -2
- package/skills/a2h-utg-explorer/scripts/seed_recipes.mjs +426 -0
- package/skills/a2h-utg-explorer/scripts/tests/attest.test.mjs +66 -0
- package/skills/a2h-utg-explorer/scripts/tests/blank_wait.test.mjs +126 -0
- package/skills/a2h-utg-explorer/scripts/tests/calendar_round_fixes.test.mjs +244 -0
- package/skills/a2h-utg-explorer/scripts/tests/chain.test.mjs +45 -0
- package/skills/a2h-utg-explorer/scripts/tests/compose_identity.test.mjs +302 -0
- package/skills/a2h-utg-explorer/scripts/tests/content_wait.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 +231 -0
- package/skills/a2h-utg-explorer/scripts/tests/default_override.test.mjs +109 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_health.test.mjs +160 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_locale_dialogs.test.mjs +29 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_locale_identity.test.mjs +77 -0
- package/skills/a2h-utg-explorer/scripts/tests/device_lock_retry.test.mjs +187 -0
- package/skills/a2h-utg-explorer/scripts/tests/diagnostics.test.mjs +254 -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 +137 -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/foreground_spelling.test.mjs +155 -0
- package/skills/a2h-utg-explorer/scripts/tests/fresh_state_plan.test.mjs +78 -0
- package/skills/a2h-utg-explorer/scripts/tests/generalization_fixes.test.mjs +252 -0
- package/skills/a2h-utg-explorer/scripts/tests/hint_check.test.mjs +129 -0
- package/skills/a2h-utg-explorer/scripts/tests/holds_without_data_parity.test.mjs +26 -0
- package/skills/a2h-utg-explorer/scripts/tests/hybrid_route.test.mjs +120 -0
- package/skills/a2h-utg-explorer/scripts/tests/hybrid_route_identity.test.mjs +146 -0
- package/skills/a2h-utg-explorer/scripts/tests/interruptions.test.mjs +614 -0
- package/skills/a2h-utg-explorer/scripts/tests/launch_bridge.test.mjs +214 -0
- package/skills/a2h-utg-explorer/scripts/tests/launch_failure.test.mjs +40 -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 +327 -0
- package/skills/a2h-utg-explorer/scripts/tests/overlay_identity.test.mjs +204 -0
- package/skills/a2h-utg-explorer/scripts/tests/page_identity_tiers.test.mjs +393 -0
- package/skills/a2h-utg-explorer/scripts/tests/pager_navigation.test.mjs +119 -0
- package/skills/a2h-utg-explorer/scripts/tests/panel_routes.test.mjs +208 -0
- package/skills/a2h-utg-explorer/scripts/tests/pipeline.test.mjs +240 -0
- package/skills/a2h-utg-explorer/scripts/tests/pr169_review_fixes.test.mjs +218 -0
- package/skills/a2h-utg-explorer/scripts/tests/pr191_review_fixes.test.mjs +292 -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 +280 -0
- package/skills/a2h-utg-explorer/scripts/tests/recover_d_grounding.test.mjs +164 -0
- package/skills/a2h-utg-explorer/scripts/tests/replay_reroute.test.mjs +143 -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 +458 -0
- package/skills/a2h-utg-explorer/scripts/tests/run_cycle_follow.test.mjs +35 -0
- package/skills/a2h-utg-explorer/scripts/tests/runner_capabilities.test.mjs +194 -0
- package/skills/a2h-utg-explorer/scripts/tests/scope.test.mjs +229 -0
- package/skills/a2h-utg-explorer/scripts/tests/scroll_sweep.test.mjs +336 -0
- package/skills/a2h-utg-explorer/scripts/tests/seed_recipes.test.mjs +261 -0
- package/skills/a2h-utg-explorer/scripts/tests/semantics.test.mjs +102 -0
- package/skills/a2h-utg-explorer/scripts/tests/snapshot_integrity.test.mjs +142 -0
- package/skills/a2h-utg-explorer/scripts/tests/state_ambiguity.test.mjs +92 -0
- package/skills/a2h-utg-explorer/scripts/tests/string_tables_twin_ties.test.mjs +83 -0
- package/skills/a2h-utg-explorer/scripts/tests/tar_fixture.mjs +12 -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/adapters.mjs +135 -7
- package/skills/a2h-utg-explorer/scripts/utg_explorer/diagnostics.mjs +196 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/hybrid_route.mjs +140 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +245 -69
- package/skills/a2h-utg-explorer/scripts/utg_explorer/state_phase.mjs +47 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/strings.mjs +164 -0
- package/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +718 -42
- package/skills/a2h-utg-explorer/scripts/variant.mjs +57 -11
- package/skills/a2h-utg-static/SKILL.md +6 -2
- package/skills/a2h-utg-static/scripts/assemble.mjs +93 -3
- package/skills/a2h-utg-static/scripts/click_paths.mjs +135 -25
- package/skills/a2h-utg-static/scripts/compose_body_text.mjs +3 -3
- package/skills/a2h-utg-static/scripts/compose_overlay.mjs +110 -3
- package/skills/a2h-utg-static/scripts/compose_titles.mjs +5 -5
- package/skills/a2h-utg-static/scripts/compose_widgets.mjs +4 -4
- package/skills/a2h-utg-static/scripts/data_model.mjs +590 -0
- package/skills/a2h-utg-static/scripts/data_producers.mjs +431 -0
- package/skills/a2h-utg-static/scripts/fragment_nav.mjs +2 -3
- package/skills/a2h-utg-static/scripts/hybrid_scope.mjs +46 -1
- package/skills/a2h-utg-static/scripts/label_resolve.mjs +49 -4
- package/skills/a2h-utg-static/scripts/lib/hybrid-provenance.mjs +201 -0
- package/skills/a2h-utg-static/scripts/lib/uniapp-routes.mjs +195 -0
- package/skills/a2h-utg-static/scripts/menu_nav.mjs +1 -1
- package/skills/a2h-utg-static/scripts/nl_hints.mjs +34 -7
- package/skills/a2h-utg-static/scripts/presenter_nav.mjs +1 -2
- package/skills/a2h-utg-static/scripts/route_interceptor.mjs +21 -7
- package/skills/a2h-utg-static/scripts/run_pipeline.mjs +86 -4
- package/skills/a2h-utg-static/scripts/static_prior.mjs +26 -29
- package/skills/a2h-utg-static/scripts/tests/test_activity_gates.mjs +84 -0
- package/skills/a2h-utg-static/scripts/tests/test_carry_answers.mjs +30 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +18 -0
- package/skills/a2h-utg-static/scripts/tests/test_data_model.mjs +120 -0
- package/skills/a2h-utg-static/scripts/tests/test_data_producers.mjs +114 -0
- package/skills/a2h-utg-static/scripts/tests/test_guard_kinds_locale.mjs +12 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_provenance.mjs +150 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +165 -1
- package/skills/a2h-utg-static/scripts/tests/test_library_activity.mjs +45 -0
- package/skills/a2h-utg-static/scripts/tests/test_login_interceptor.mjs +38 -0
- package/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +35 -1
- package/skills/a2h-utg-static/scripts/tests/test_nl_hints_default_override.mjs +50 -0
- package/skills/a2h-utg-static/scripts/tests/test_pipeline_llm_phases.mjs +21 -0
- package/skills/a2h-utg-static/scripts/tests/test_pr169_review_fixes.mjs +172 -0
- package/skills/a2h-utg-static/scripts/tests/test_redirect_path_cost.mjs +136 -0
- package/skills/a2h-utg-static/scripts/tests/test_route_token_words.mjs +29 -1
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_route_jump.mjs +175 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_routes.mjs +161 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +99 -0
- package/skills/a2h-utg-static/scripts/tests/test_utg_specgen_boundary.mjs +45 -0
- package/skills/a2h-utg-static/scripts/tests/test_vm_nav_helper_navigate.mjs +21 -0
- package/skills/a2h-utg-static/scripts/uniapp_nav.mjs +112 -69
- package/skills/a2h-utg-static/scripts/vm_nav.mjs +9 -1
- package/README.md +0 -439
- package/dist/cli/config-store.js +0 -128
- package/dist/cli/config.js +0 -48
- package/dist/cli/editors.json +0 -114
- package/dist/cli/env-vars.js +0 -127
- package/dist/cli/index.js +0 -73
- package/dist/cli/init.js +0 -2513
- package/dist/cli/uninstall.js +0 -406
- package/dist/platform/compose.js +0 -228
- package/dist/platform/frontmatter.js +0 -151
- package/dist/platform/installer.js +0 -417
- package/dist/platform/registry.js +0 -337
- package/dist/platform/transform.js +0 -363
- package/dist/platform/types.js +0 -9
- package/dist/platform/validate.js +0 -152
- package/dist/utils/regex.js +0 -7
- package/env-requirements.json +0 -511
- package/resource/choose_editor.png +0 -0
- package/resource/convert_pipeline_process.svg +0 -114
- package/resource/project_architecture.svg +0 -120
- package/resource/set_environment.png +0 -0
- package/resource/set_multimodel.png +0 -0
- package/resource/set_sdk.png +0 -0
- package/resource/title_dark.png +0 -0
- package/skills/a2h-app-migrate/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-app-migrate/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-arch-generate/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-arch-generate/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-arkts-logic-coder/scripts/design/i18n-term.d.mts +0 -5
- package/skills/a2h-arkts-logic-coder/scripts/design/i18n-term.mjs +0 -54
- package/skills/a2h-batch-ui-align/references/source-only-tier.md +0 -38
- package/skills/a2h-batch-ui-align/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-batch-ui-align/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-dashboard-render/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-dashboard-render/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-resource-convert/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-resource-convert/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-spec-design-pipeline/scripts/ensure_wt_index.ts +0 -885
- package/skills/a2h-spec-design-pipeline/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-spec-design-pipeline/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-spec-design-pipeline/scripts/test_ensure_wt_index.ts +0 -856
- package/skills/a2h-spec-design-pipeline/scripts/test_i18n_term.ts +0 -70
- package/skills/a2h-spec-generate/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-spec-generate/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-spec-generate/scripts/reqgen/src/i18n-term.d.mts +0 -5
- package/skills/a2h-spec-generate/scripts/reqgen/src/i18n-term.mjs +0 -54
- package/skills/a2h-utg-explorer/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-utg-explorer/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-utg-static/scripts/i18n-term.d.mts +0 -5
- package/skills/a2h-utg-static/scripts/i18n-term.mjs +0 -54
- package/skills/a2h-utg-static/scripts/tests/test_i18n_term.mjs +0 -155
package/index.js
ADDED
|
@@ -0,0 +1,1643 @@
|
|
|
1
|
+
// devecocli-plugin/index.ts
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import path3 from "node:path";
|
|
4
|
+
|
|
5
|
+
// devecocli-plugin/common.ts
|
|
6
|
+
import fs2 from "node:fs/promises";
|
|
7
|
+
import { existsSync, statSync } from "node:fs";
|
|
8
|
+
import os from "node:os";
|
|
9
|
+
import path2 from "node:path";
|
|
10
|
+
import { fileURLToPath } from "node:url";
|
|
11
|
+
|
|
12
|
+
// devecocli-plugin/content-resolver.ts
|
|
13
|
+
import fs from "node:fs/promises";
|
|
14
|
+
import path from "node:path";
|
|
15
|
+
var DEFAULT_INSTALL_LANGUAGE = "zh";
|
|
16
|
+
var CHINA_TIME_ZONES = /* @__PURE__ */ new Set([
|
|
17
|
+
"Asia/Shanghai",
|
|
18
|
+
"Asia/Chongqing",
|
|
19
|
+
"Asia/Chungking",
|
|
20
|
+
"Asia/Harbin",
|
|
21
|
+
"Asia/Urumqi",
|
|
22
|
+
"Asia/Kashgar",
|
|
23
|
+
"Asia/Macau",
|
|
24
|
+
"Asia/Hong_Kong",
|
|
25
|
+
"Asia/Taipei",
|
|
26
|
+
"Asia/Beijing",
|
|
27
|
+
"PRC",
|
|
28
|
+
"ROC",
|
|
29
|
+
"Hongkong"
|
|
30
|
+
]);
|
|
31
|
+
function isChinaTimeZone(timeZone) {
|
|
32
|
+
if (!timeZone) return false;
|
|
33
|
+
return CHINA_TIME_ZONES.has(timeZone.trim());
|
|
34
|
+
}
|
|
35
|
+
function parseInstallLanguage(value) {
|
|
36
|
+
if (!value) return void 0;
|
|
37
|
+
const normalized = value.trim().toLowerCase().replace(/_/g, "-");
|
|
38
|
+
if (normalized === "zh" || normalized.startsWith("zh-")) return "zh";
|
|
39
|
+
if (normalized === "en" || normalized.startsWith("en-")) return "en";
|
|
40
|
+
return void 0;
|
|
41
|
+
}
|
|
42
|
+
function detectTimeZone(env) {
|
|
43
|
+
try {
|
|
44
|
+
const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
45
|
+
if (tz) return tz;
|
|
46
|
+
} catch {
|
|
47
|
+
}
|
|
48
|
+
return env.TZ?.trim() || null;
|
|
49
|
+
}
|
|
50
|
+
function detectLocale(env) {
|
|
51
|
+
try {
|
|
52
|
+
const locale = Intl.DateTimeFormat().resolvedOptions().locale;
|
|
53
|
+
if (locale) return locale;
|
|
54
|
+
} catch {
|
|
55
|
+
}
|
|
56
|
+
const fromEnv = env.LC_ALL || env.LC_MESSAGES || env.LANG;
|
|
57
|
+
return fromEnv?.trim() || null;
|
|
58
|
+
}
|
|
59
|
+
function resolveInstallLanguage(signals = {}) {
|
|
60
|
+
const env = signals.env ?? process.env;
|
|
61
|
+
const explicit = parseInstallLanguage(signals.lang) ?? parseInstallLanguage(env.HOMETRANS_PLUGIN_LANG);
|
|
62
|
+
if (explicit) return explicit;
|
|
63
|
+
const timeZone = "timeZone" in signals ? signals.timeZone : detectTimeZone(env);
|
|
64
|
+
if (timeZone) return isChinaTimeZone(timeZone) ? "zh" : "en";
|
|
65
|
+
const locale = "locale" in signals ? signals.locale : detectLocale(env);
|
|
66
|
+
return parseInstallLanguage(locale) ?? DEFAULT_INSTALL_LANGUAGE;
|
|
67
|
+
}
|
|
68
|
+
var RENAME_ROW = /^\|\s*`([^`]+)`\s*\|\s*`([^`]+)`\s*\|\s*$/gm;
|
|
69
|
+
function parseOverlayRenames(markdown) {
|
|
70
|
+
return [...markdown.matchAll(RENAME_ROW)].map(([, english, original]) => ({ english, original }));
|
|
71
|
+
}
|
|
72
|
+
var RENAME_TABLE = "FILE-NAMES.md";
|
|
73
|
+
var REQUIRED_OVERLAY_DIRS = ["skills", "agents", "commands"];
|
|
74
|
+
async function loadRenameMap(i18nRoot) {
|
|
75
|
+
for (const dir of REQUIRED_OVERLAY_DIRS) {
|
|
76
|
+
if (!await isDirectory(path.join(i18nRoot, dir))) {
|
|
77
|
+
throw new Error(`English content is missing: ${path.join(i18nRoot, dir)}. Reinstall hometrans.`);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
const tablePath = path.join(i18nRoot, RENAME_TABLE);
|
|
81
|
+
let table;
|
|
82
|
+
try {
|
|
83
|
+
table = await fs.readFile(tablePath, "utf-8");
|
|
84
|
+
} catch {
|
|
85
|
+
throw new Error(`English content is missing: ${tablePath}. Reinstall hometrans.`);
|
|
86
|
+
}
|
|
87
|
+
const byOriginal = /* @__PURE__ */ new Map();
|
|
88
|
+
for (const { english, original } of parseOverlayRenames(table)) {
|
|
89
|
+
const englishRel = toPosix(english);
|
|
90
|
+
byOriginal.set(toPosix(original), englishRel);
|
|
91
|
+
if (!await exists(path.join(i18nRoot, englishRel))) {
|
|
92
|
+
throw new Error(`English content is missing: ${path.join(i18nRoot, englishRel)}. Reinstall hometrans.`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return { byOriginal };
|
|
96
|
+
}
|
|
97
|
+
function toPosix(p) {
|
|
98
|
+
return p.split(path.sep).join("/").replace(/\\/g, "/");
|
|
99
|
+
}
|
|
100
|
+
async function exists(p) {
|
|
101
|
+
try {
|
|
102
|
+
await fs.access(p);
|
|
103
|
+
return true;
|
|
104
|
+
} catch {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
async function isDirectory(p) {
|
|
109
|
+
try {
|
|
110
|
+
return (await fs.stat(p)).isDirectory();
|
|
111
|
+
} catch {
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
async function walkFiles(abs, relDir) {
|
|
116
|
+
const out = [];
|
|
117
|
+
const walk = async (dir, rel) => {
|
|
118
|
+
const entries = await fs.readdir(dir, { withFileTypes: true }).catch(() => []);
|
|
119
|
+
for (const entry of entries) {
|
|
120
|
+
if (entry.name === "node_modules") continue;
|
|
121
|
+
const childAbs = path.join(dir, entry.name);
|
|
122
|
+
const childRel = rel ? `${rel}/${entry.name}` : entry.name;
|
|
123
|
+
if (entry.isDirectory()) await walk(childAbs, childRel);
|
|
124
|
+
else if (entry.isFile()) out.push(childRel);
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
await walk(abs, relDir);
|
|
128
|
+
return out;
|
|
129
|
+
}
|
|
130
|
+
function createZhResolver(packageRoot, platformsRoot) {
|
|
131
|
+
return createResolverImpl(DEFAULT_INSTALL_LANGUAGE, {
|
|
132
|
+
packageRoot,
|
|
133
|
+
platformsRoot: platformsRoot ?? path.join(packageRoot, "platforms")
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
async function createContentResolver(lang, opts) {
|
|
137
|
+
if (lang === DEFAULT_INSTALL_LANGUAGE) return createZhResolver(opts.packageRoot, opts.platformsRoot);
|
|
138
|
+
if (!opts.i18nRoot) {
|
|
139
|
+
throw new Error("English install requested without an i18n root");
|
|
140
|
+
}
|
|
141
|
+
const renames = await loadRenameMap(opts.i18nRoot);
|
|
142
|
+
return createResolverImpl(lang, opts, renames);
|
|
143
|
+
}
|
|
144
|
+
function createResolverImpl(lang, opts, renames) {
|
|
145
|
+
const packageRoot = opts.packageRoot;
|
|
146
|
+
const i18nRoot = opts.i18nRoot;
|
|
147
|
+
const platformsRoot = opts.platformsRoot ?? path.join(packageRoot, "platforms");
|
|
148
|
+
const byOriginal = renames?.byOriginal ?? /* @__PURE__ */ new Map();
|
|
149
|
+
const existsCache = /* @__PURE__ */ new Map();
|
|
150
|
+
const baseAbs = (rel) => {
|
|
151
|
+
const norm = toPosix(rel);
|
|
152
|
+
const prefix = "platforms/";
|
|
153
|
+
if (norm.startsWith(prefix)) return path.join(platformsRoot, norm.slice(prefix.length));
|
|
154
|
+
return path.join(packageRoot, norm);
|
|
155
|
+
};
|
|
156
|
+
const cachedExists = async (p) => {
|
|
157
|
+
const cached = existsCache.get(p);
|
|
158
|
+
if (cached !== void 0) return cached;
|
|
159
|
+
const found = await exists(p);
|
|
160
|
+
existsCache.set(p, found);
|
|
161
|
+
return found;
|
|
162
|
+
};
|
|
163
|
+
const destRel = (rel) => {
|
|
164
|
+
const norm = toPosix(rel);
|
|
165
|
+
if (lang === DEFAULT_INSTALL_LANGUAGE) return norm;
|
|
166
|
+
return byOriginal.get(norm) ?? norm;
|
|
167
|
+
};
|
|
168
|
+
const resolve = async (rel) => {
|
|
169
|
+
const norm = toPosix(rel);
|
|
170
|
+
if (lang !== DEFAULT_INSTALL_LANGUAGE && i18nRoot) {
|
|
171
|
+
const renamed = byOriginal.get(norm);
|
|
172
|
+
if (renamed) return path.join(i18nRoot, renamed);
|
|
173
|
+
const candidate = path.join(i18nRoot, norm);
|
|
174
|
+
if (await cachedExists(candidate)) return candidate;
|
|
175
|
+
}
|
|
176
|
+
return baseAbs(norm);
|
|
177
|
+
};
|
|
178
|
+
const has = async (rel) => {
|
|
179
|
+
const norm = toPosix(rel);
|
|
180
|
+
if (lang !== DEFAULT_INSTALL_LANGUAGE && i18nRoot) {
|
|
181
|
+
const renamed = byOriginal.get(norm);
|
|
182
|
+
if (renamed) return cachedExists(path.join(i18nRoot, renamed));
|
|
183
|
+
if (await cachedExists(path.join(i18nRoot, norm))) return true;
|
|
184
|
+
}
|
|
185
|
+
return cachedExists(baseAbs(norm));
|
|
186
|
+
};
|
|
187
|
+
return {
|
|
188
|
+
lang,
|
|
189
|
+
resolve,
|
|
190
|
+
destRel,
|
|
191
|
+
has,
|
|
192
|
+
async kind(rel) {
|
|
193
|
+
try {
|
|
194
|
+
const stat = await fs.stat(await resolve(rel));
|
|
195
|
+
return stat.isDirectory() ? "dir" : stat.isFile() ? "file" : null;
|
|
196
|
+
} catch {
|
|
197
|
+
return null;
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
async walkDir(relDir) {
|
|
201
|
+
const dir = toPosix(relDir).replace(/\/+$/, "");
|
|
202
|
+
const out = [];
|
|
203
|
+
for (const rel of await walkFiles(baseAbs(dir), dir)) {
|
|
204
|
+
out.push({ rel, destRel: destRel(rel), src: await resolve(rel) });
|
|
205
|
+
}
|
|
206
|
+
return out;
|
|
207
|
+
},
|
|
208
|
+
async listNames(relDir, kind) {
|
|
209
|
+
const dir = toPosix(relDir);
|
|
210
|
+
const names = [];
|
|
211
|
+
const entries = await fs.readdir(baseAbs(dir), { withFileTypes: true }).catch(() => []);
|
|
212
|
+
for (const entry of entries) {
|
|
213
|
+
if (entry.name === "node_modules") continue;
|
|
214
|
+
if (kind === "dir" && !entry.isDirectory()) continue;
|
|
215
|
+
if (kind === "file" && !entry.isFile()) continue;
|
|
216
|
+
names.push(entry.name);
|
|
217
|
+
}
|
|
218
|
+
return names;
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// devecocli-plugin/common.ts
|
|
224
|
+
var PLUGIN_DIR = path2.dirname(fileURLToPath(import.meta.url));
|
|
225
|
+
var looksLikePackageRoot = (dir) => existsSync(path2.join(dir, "plugin.jsonc")) || existsSync(path2.join(dir, "skills"));
|
|
226
|
+
var PACKAGE_ROOT = looksLikePackageRoot(PLUGIN_DIR) ? PLUGIN_DIR : path2.resolve(PLUGIN_DIR, "..");
|
|
227
|
+
var PLATFORMS_ROOT = existsSync(path2.join(PACKAGE_ROOT, "platforms")) ? path2.join(PACKAGE_ROOT, "platforms") : path2.resolve(PLUGIN_DIR, "..", "platforms");
|
|
228
|
+
var SKILLS_ROOT = path2.join(PACKAGE_ROOT, "skills");
|
|
229
|
+
var AGENTS_ROOT = path2.join(PACKAGE_ROOT, "agents");
|
|
230
|
+
var COMMANDS_ROOT = path2.join(PACKAGE_ROOT, "commands");
|
|
231
|
+
var I18N_ROOT = path2.join(PACKAGE_ROOT, "i18n");
|
|
232
|
+
var DEFAULT_RESOLVER = createZhResolver(PACKAGE_ROOT, PLATFORMS_ROOT);
|
|
233
|
+
async function createResolver(lang = DEFAULT_INSTALL_LANGUAGE) {
|
|
234
|
+
try {
|
|
235
|
+
return await createContentResolver(lang, {
|
|
236
|
+
packageRoot: PACKAGE_ROOT,
|
|
237
|
+
i18nRoot: I18N_ROOT,
|
|
238
|
+
platformsRoot: PLATFORMS_ROOT
|
|
239
|
+
});
|
|
240
|
+
} catch (err) {
|
|
241
|
+
throw new PluginError(err.message);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
var PluginError = class extends Error {
|
|
245
|
+
};
|
|
246
|
+
function stripJsonc(text) {
|
|
247
|
+
let out = "";
|
|
248
|
+
let i = 0;
|
|
249
|
+
while (i < text.length) {
|
|
250
|
+
const ch = text[i];
|
|
251
|
+
if (ch === '"') {
|
|
252
|
+
let j = i + 1;
|
|
253
|
+
while (j < text.length && text[j] !== '"') j += text[j] === "\\" ? 2 : 1;
|
|
254
|
+
out += text.slice(i, j + 1);
|
|
255
|
+
i = j + 1;
|
|
256
|
+
} else if (ch === "/" && text[i + 1] === "/") {
|
|
257
|
+
while (i < text.length && text[i] !== "\n") i++;
|
|
258
|
+
} else if (ch === "/" && text[i + 1] === "*") {
|
|
259
|
+
const end = text.indexOf("*/", i + 2);
|
|
260
|
+
i = end < 0 ? text.length : end + 2;
|
|
261
|
+
} else {
|
|
262
|
+
out += ch;
|
|
263
|
+
i++;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
return out.replace(/,(\s*[}\]])/g, "$1");
|
|
267
|
+
}
|
|
268
|
+
async function loadManifest() {
|
|
269
|
+
const raw = await fs2.readFile(path2.join(PACKAGE_ROOT, "plugin.jsonc"), "utf-8");
|
|
270
|
+
return JSON.parse(stripJsonc(raw));
|
|
271
|
+
}
|
|
272
|
+
function parseScalar(v) {
|
|
273
|
+
if (v.length >= 2 && v.startsWith('"') && v.endsWith('"')) {
|
|
274
|
+
return v.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\");
|
|
275
|
+
}
|
|
276
|
+
if (v.length >= 2 && v.startsWith("'") && v.endsWith("'")) {
|
|
277
|
+
return v.slice(1, -1).replace(/''/g, "'");
|
|
278
|
+
}
|
|
279
|
+
return v;
|
|
280
|
+
}
|
|
281
|
+
function parseFrontmatter(raw) {
|
|
282
|
+
const m = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/.exec(raw);
|
|
283
|
+
if (!m) return { fm: {}, body: raw, hasFrontmatter: false };
|
|
284
|
+
const fm = {};
|
|
285
|
+
let parent = null;
|
|
286
|
+
for (const line of m[1].split(/\r?\n/)) {
|
|
287
|
+
if (!line.trim() || line.trim().startsWith("#")) continue;
|
|
288
|
+
const indented = line[0] === " " || line[0] === " ";
|
|
289
|
+
const trimmed = line.trim();
|
|
290
|
+
if (trimmed.startsWith("- ") && parent !== null) {
|
|
291
|
+
const item = parseScalar(trimmed.slice(2).trim());
|
|
292
|
+
const cur = fm[parent];
|
|
293
|
+
fm[parent] = Array.isArray(cur) ? [...cur, item] : [item];
|
|
294
|
+
continue;
|
|
295
|
+
}
|
|
296
|
+
const idx = line.indexOf(":");
|
|
297
|
+
if (idx < 0) continue;
|
|
298
|
+
const key = line.slice(0, idx).trim();
|
|
299
|
+
const value = line.slice(idx + 1).trim();
|
|
300
|
+
if (!indented) {
|
|
301
|
+
parent = key;
|
|
302
|
+
if (value === "") {
|
|
303
|
+
if (!(key in fm)) fm[key] = {};
|
|
304
|
+
} else {
|
|
305
|
+
fm[key] = parseScalar(value);
|
|
306
|
+
}
|
|
307
|
+
} else if (parent !== null && value !== "") {
|
|
308
|
+
const cur = fm[parent];
|
|
309
|
+
const map = Array.isArray(cur) || typeof cur !== "object" || cur === void 0 ? {} : cur;
|
|
310
|
+
map[key] = parseScalar(value);
|
|
311
|
+
fm[parent] = map;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
return { fm, body: raw.slice(m[0].length), hasFrontmatter: true };
|
|
315
|
+
}
|
|
316
|
+
var BARE_SAFE = /^[A-Za-z0-9_][A-Za-z0-9_ ./+|=-]*$/;
|
|
317
|
+
var BOOL_LIKE = /^(true|false|yes|no|on|off|null|~)$/i;
|
|
318
|
+
var NATIVE_BOOLEAN_KEYS = /* @__PURE__ */ new Set([
|
|
319
|
+
"subtask",
|
|
320
|
+
"disable-model-invocation",
|
|
321
|
+
"user-invocable",
|
|
322
|
+
"disable",
|
|
323
|
+
"hidden",
|
|
324
|
+
"is_background",
|
|
325
|
+
"background",
|
|
326
|
+
"readonly"
|
|
327
|
+
]);
|
|
328
|
+
function formatScalar(key, v) {
|
|
329
|
+
if (v === "") return '""';
|
|
330
|
+
if (NATIVE_BOOLEAN_KEYS.has(key) && /^(true|false)$/i.test(v)) return v.toLowerCase();
|
|
331
|
+
if (!BARE_SAFE.test(v) || BOOL_LIKE.test(v) || v !== v.trim()) {
|
|
332
|
+
return '"' + v.replace(/\\/g, "\\\\").replace(/"/g, '\\"') + '"';
|
|
333
|
+
}
|
|
334
|
+
return v;
|
|
335
|
+
}
|
|
336
|
+
function serializeFrontmatter(fm) {
|
|
337
|
+
const lines = ["---"];
|
|
338
|
+
for (const [key, value] of Object.entries(fm)) {
|
|
339
|
+
if (Array.isArray(value)) {
|
|
340
|
+
if (value.length === 0) {
|
|
341
|
+
lines.push(`${key}: []`);
|
|
342
|
+
} else {
|
|
343
|
+
lines.push(`${key}:`);
|
|
344
|
+
for (const item of value) lines.push(` - ${formatScalar(key, item)}`);
|
|
345
|
+
}
|
|
346
|
+
} else if (typeof value === "boolean") {
|
|
347
|
+
lines.push(`${key}: ${value ? "true" : "false"}`);
|
|
348
|
+
} else if (typeof value === "object" && value !== null) {
|
|
349
|
+
const entries = Object.entries(value);
|
|
350
|
+
if (entries.length === 0) {
|
|
351
|
+
lines.push(`${key}: {}`);
|
|
352
|
+
} else {
|
|
353
|
+
lines.push(`${key}:`);
|
|
354
|
+
for (const [k, v] of entries) lines.push(` ${k}: ${formatScalar(k, v)}`);
|
|
355
|
+
}
|
|
356
|
+
} else {
|
|
357
|
+
lines.push(`${key}: ${formatScalar(key, value)}`);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
lines.push("---", "");
|
|
361
|
+
return lines.join("\n");
|
|
362
|
+
}
|
|
363
|
+
function asString(v) {
|
|
364
|
+
return typeof v === "string" ? v : void 0;
|
|
365
|
+
}
|
|
366
|
+
function asRecord(v) {
|
|
367
|
+
return typeof v === "object" && v !== null && !Array.isArray(v) ? v : {};
|
|
368
|
+
}
|
|
369
|
+
function fmValueToString(v) {
|
|
370
|
+
if (typeof v === "string") return v;
|
|
371
|
+
if (typeof v === "boolean") return v ? "true" : "false";
|
|
372
|
+
if (Array.isArray(v)) return v.join(", ");
|
|
373
|
+
return Object.entries(v).map(([k, val]) => `${k}=${val}`).join(", ");
|
|
374
|
+
}
|
|
375
|
+
function home(...segments) {
|
|
376
|
+
return path2.join(os.homedir(), ...segments);
|
|
377
|
+
}
|
|
378
|
+
function resolvePlatforms() {
|
|
379
|
+
const codexRoot = process.env.CODEX_HOME ? path2.resolve(process.env.CODEX_HOME) : home(".codex");
|
|
380
|
+
const platforms = [
|
|
381
|
+
{
|
|
382
|
+
name: "opencode",
|
|
383
|
+
markerDir: home(".config", "opencode"),
|
|
384
|
+
skillsDir: home(".config", "opencode", "skills"),
|
|
385
|
+
agentsDir: home(".config", "opencode", "agents"),
|
|
386
|
+
commandsDir: home(".config", "opencode", "commands"),
|
|
387
|
+
agentFormat: "passthrough",
|
|
388
|
+
skillKeepAllowedTools: false,
|
|
389
|
+
skillKeepArgumentHint: false,
|
|
390
|
+
skillDescriptionLimit: 1024,
|
|
391
|
+
skillSlashMetadata: true,
|
|
392
|
+
commandKeepKeys: ["description", "agent", "subtask", "model"],
|
|
393
|
+
verbatim: false,
|
|
394
|
+
legacyDirs: []
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
name: "trae",
|
|
398
|
+
markerDir: home(".trae"),
|
|
399
|
+
skillsDir: home(".trae", "skills"),
|
|
400
|
+
agentsDir: home(".trae", "agents"),
|
|
401
|
+
commandsDir: home(".trae", "commands"),
|
|
402
|
+
agentFormat: "trae",
|
|
403
|
+
skillKeepAllowedTools: false,
|
|
404
|
+
skillKeepArgumentHint: false,
|
|
405
|
+
skillSlashMetadata: false,
|
|
406
|
+
commandKeepKeys: ["name", "description"],
|
|
407
|
+
verbatim: false,
|
|
408
|
+
legacyDirs: []
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
name: "pi",
|
|
412
|
+
markerDir: home(".pi"),
|
|
413
|
+
// Global skills go to pi's own ~/.pi/skills, not the open-standard shared directory
|
|
414
|
+
// ~/.agents/skills -- the shared directory is ht init's fallback install location (see SHARED_AGENTS_FALLBACK in src/cli/
|
|
415
|
+
// config-store.ts) and is also read by opencode / newer codex
|
|
416
|
+
// etc.: installing there would pollute what other agents see, detection would mistake a same-named skill in the shared directory
|
|
417
|
+
// for pi being installed, and uninstall would wrongly delete content installed by other tools
|
|
418
|
+
skillsDir: home(".pi", "skills"),
|
|
419
|
+
agentsDir: home(".pi", "agent", "agents"),
|
|
420
|
+
// Pi provides slash commands as prompt templates: md templates under ~/.pi/prompts
|
|
421
|
+
// become commands by template name
|
|
422
|
+
commandsDir: home(".pi", "prompts"),
|
|
423
|
+
agentFormat: "pi-profile",
|
|
424
|
+
skillKeepAllowedTools: true,
|
|
425
|
+
skillKeepArgumentHint: false,
|
|
426
|
+
skillDescriptionLimit: 1024,
|
|
427
|
+
skillSlashMetadata: false,
|
|
428
|
+
commandKeepKeys: ["description"],
|
|
429
|
+
verbatim: false,
|
|
430
|
+
// Some versions installed pi skills into the shared directory ~/.agents/skills; deliberately not included in legacy
|
|
431
|
+
// cleanup: that directory is shared by ht init / other agents, and deleting would hit same-named content installed by other tools
|
|
432
|
+
// (ht uninstall handles its own installs symmetrically)
|
|
433
|
+
legacyDirs: [
|
|
434
|
+
{
|
|
435
|
+
agentsDir: home(".pi", "agents"),
|
|
436
|
+
commandsDir: home(".pi", "commands")
|
|
437
|
+
}
|
|
438
|
+
]
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
name: "deveco",
|
|
442
|
+
markerDir: home(".config", "deveco"),
|
|
443
|
+
skillsDir: home(".config", "deveco", "skills"),
|
|
444
|
+
agentsDir: home(".config", "deveco", "agents"),
|
|
445
|
+
commandsDir: home(".config", "deveco", "commands"),
|
|
446
|
+
agentFormat: "passthrough",
|
|
447
|
+
skillKeepAllowedTools: false,
|
|
448
|
+
skillKeepArgumentHint: false,
|
|
449
|
+
skillDescriptionLimit: 1024,
|
|
450
|
+
skillSlashMetadata: true,
|
|
451
|
+
commandKeepKeys: ["description", "agent", "subtask", "model"],
|
|
452
|
+
verbatim: false,
|
|
453
|
+
legacyDirs: []
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
name: "cursor",
|
|
457
|
+
markerDir: home(".cursor"),
|
|
458
|
+
skillsDir: home(".cursor", "skills"),
|
|
459
|
+
agentsDir: home(".cursor", "agents"),
|
|
460
|
+
commandsDir: home(".cursor", "commands"),
|
|
461
|
+
agentFormat: "cursor",
|
|
462
|
+
skillKeepAllowedTools: false,
|
|
463
|
+
skillKeepArgumentHint: false,
|
|
464
|
+
skillSlashMetadata: false,
|
|
465
|
+
commandKeepKeys: ["description"],
|
|
466
|
+
verbatim: false,
|
|
467
|
+
legacyDirs: []
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
name: "codebuddy",
|
|
471
|
+
markerDir: home(".codebuddy"),
|
|
472
|
+
skillsDir: home(".codebuddy", "skills"),
|
|
473
|
+
agentsDir: home(".codebuddy", "agents"),
|
|
474
|
+
commandsDir: home(".codebuddy", "commands"),
|
|
475
|
+
agentFormat: "codebuddy",
|
|
476
|
+
skillKeepAllowedTools: true,
|
|
477
|
+
skillKeepArgumentHint: false,
|
|
478
|
+
skillSlashMetadata: false,
|
|
479
|
+
commandKeepKeys: [
|
|
480
|
+
"description",
|
|
481
|
+
"argument-hint",
|
|
482
|
+
"model",
|
|
483
|
+
"allowed-tools",
|
|
484
|
+
"disable-model-invocation"
|
|
485
|
+
],
|
|
486
|
+
verbatim: false,
|
|
487
|
+
legacyDirs: []
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
name: "qoder",
|
|
491
|
+
markerDir: home(".qoder"),
|
|
492
|
+
skillsDir: home(".qoder", "skills"),
|
|
493
|
+
agentsDir: home(".qoder", "agents"),
|
|
494
|
+
commandsDir: home(".qoder", "commands"),
|
|
495
|
+
agentFormat: "qoder",
|
|
496
|
+
skillKeepAllowedTools: false,
|
|
497
|
+
skillKeepArgumentHint: false,
|
|
498
|
+
skillSlashMetadata: false,
|
|
499
|
+
commandKeepKeys: ["description"],
|
|
500
|
+
verbatim: false,
|
|
501
|
+
legacyDirs: []
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
name: "claude-code",
|
|
505
|
+
markerDir: home(".claude"),
|
|
506
|
+
skillsDir: home(".claude", "skills"),
|
|
507
|
+
agentsDir: home(".claude", "agents"),
|
|
508
|
+
commandsDir: home(".claude", "commands"),
|
|
509
|
+
agentFormat: "claude",
|
|
510
|
+
skillKeepAllowedTools: true,
|
|
511
|
+
skillKeepArgumentHint: true,
|
|
512
|
+
skillSlashMetadata: false,
|
|
513
|
+
commandKeepKeys: [
|
|
514
|
+
"description",
|
|
515
|
+
"argument-hint",
|
|
516
|
+
"allowed-tools",
|
|
517
|
+
"model",
|
|
518
|
+
"disable-model-invocation",
|
|
519
|
+
"context"
|
|
520
|
+
],
|
|
521
|
+
verbatim: false,
|
|
522
|
+
legacyDirs: []
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
name: "codex",
|
|
526
|
+
markerDir: codexRoot,
|
|
527
|
+
skillsDir: path2.join(codexRoot, "skills"),
|
|
528
|
+
agentsDir: path2.join(codexRoot, "agents"),
|
|
529
|
+
// Commands are not installed as prompts (custom prompts are deprecated) but converted to skills in the skills/
|
|
530
|
+
// directory; the old prompts location is included in legacy cleanup
|
|
531
|
+
commandsDir: null,
|
|
532
|
+
agentFormat: "codex-toml",
|
|
533
|
+
skillKeepAllowedTools: false,
|
|
534
|
+
skillKeepArgumentHint: false,
|
|
535
|
+
skillSlashMetadata: false,
|
|
536
|
+
commandKeepKeys: [],
|
|
537
|
+
commandsAsSkills: true,
|
|
538
|
+
verbatim: false,
|
|
539
|
+
legacyDirs: [{ commandsDir: path2.join(codexRoot, "prompts") }]
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
name: "atomcode",
|
|
543
|
+
markerDir: home(".atomcode"),
|
|
544
|
+
skillsDir: home(".atomcode", "skills"),
|
|
545
|
+
agentsDir: home(".atomcode", "agents"),
|
|
546
|
+
commandsDir: null,
|
|
547
|
+
agentFormat: "atomcode-role",
|
|
548
|
+
skillKeepAllowedTools: false,
|
|
549
|
+
skillKeepArgumentHint: false,
|
|
550
|
+
skillSlashMetadata: false,
|
|
551
|
+
commandKeepKeys: [],
|
|
552
|
+
// AtomCode has no separate commands directory: slash commands come from skills (each skill automatically
|
|
553
|
+
// becomes /<skill-name>, and the $ menu supports inline arguments via $<name> <args>) and its own
|
|
554
|
+
// /plugin packages (with a plugin-name: prefix, not via this install path); once commands are converted to skills in
|
|
555
|
+
// skills/, /hometrans appears as is
|
|
556
|
+
commandsAsSkills: true,
|
|
557
|
+
verbatim: false,
|
|
558
|
+
legacyDirs: [{ commandsDir: home(".atomcode", "commands") }]
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
name: "dsh",
|
|
562
|
+
markerDir: home(".dsh"),
|
|
563
|
+
skillsDir: home(".dsh", "skills"),
|
|
564
|
+
agentsDir: null,
|
|
565
|
+
// DSH has no file-based commands (commands are registered via the plugin API): commands are converted to skills in
|
|
566
|
+
// skills/, and the native keys disable-model-invocation + user-invocable keep
|
|
567
|
+
// the "user-invoked only" command semantics
|
|
568
|
+
commandsDir: null,
|
|
569
|
+
agentFormat: "none",
|
|
570
|
+
skillKeepAllowedTools: false,
|
|
571
|
+
skillKeepArgumentHint: false,
|
|
572
|
+
skillSlashMetadata: false,
|
|
573
|
+
commandKeepKeys: [],
|
|
574
|
+
commandsAsSkills: true,
|
|
575
|
+
verbatim: false,
|
|
576
|
+
legacyDirs: [
|
|
577
|
+
{
|
|
578
|
+
agentsDir: home(".dsh", "agents"),
|
|
579
|
+
commandsDir: home(".dsh", "commands")
|
|
580
|
+
}
|
|
581
|
+
]
|
|
582
|
+
}
|
|
583
|
+
];
|
|
584
|
+
return new Map(platforms.map((p) => [p.name, p]));
|
|
585
|
+
}
|
|
586
|
+
var PROJECT_DIR_OVERRIDES = {
|
|
587
|
+
// pi: skills go to .pi/skills (deveco-cli project-level convention); project-level profiles are ignored by the platform
|
|
588
|
+
// and prompt templates are global only (~/.pi/prompts), so both are skipped with a note
|
|
589
|
+
pi: {
|
|
590
|
+
agents: null,
|
|
591
|
+
commands: null,
|
|
592
|
+
agentsSkipNote: "pi ignores project-level subagent profiles",
|
|
593
|
+
commandsSkipNote: "pi prompt templates are global-only (~/.pi/prompts)"
|
|
594
|
+
}
|
|
595
|
+
};
|
|
596
|
+
var PROJECT_ROOT_NAME = {
|
|
597
|
+
"trae-cn": ".trae",
|
|
598
|
+
"claude-code": ".claude"
|
|
599
|
+
};
|
|
600
|
+
function toProjectPlatform(platform, projectRoot, skillsDir) {
|
|
601
|
+
const override = PROJECT_DIR_OVERRIDES[platform.name] ?? {};
|
|
602
|
+
const cliSkillsDir = typeof skillsDir === "string" && platform.skillsDir !== null ? skillsDir : void 0;
|
|
603
|
+
const root = cliSkillsDir ? path2.dirname(cliSkillsDir) : path2.join(
|
|
604
|
+
projectRoot,
|
|
605
|
+
PROJECT_ROOT_NAME[platform.name] ?? "." + platform.name
|
|
606
|
+
);
|
|
607
|
+
const resolveDir = (globalDir, sub, overrideValue) => {
|
|
608
|
+
if (overrideValue !== void 0) {
|
|
609
|
+
return overrideValue === null ? null : path2.join(root, overrideValue);
|
|
610
|
+
}
|
|
611
|
+
return globalDir === null ? null : path2.join(root, sub);
|
|
612
|
+
};
|
|
613
|
+
return {
|
|
614
|
+
...platform,
|
|
615
|
+
skillsDir: cliSkillsDir ?? resolveDir(platform.skillsDir, "skills", override.skills),
|
|
616
|
+
agentsDir: resolveDir(platform.agentsDir, "agents", override.agents),
|
|
617
|
+
commandsDir: resolveDir(
|
|
618
|
+
platform.commandsDir,
|
|
619
|
+
"commands",
|
|
620
|
+
override.commands
|
|
621
|
+
),
|
|
622
|
+
agentsSkipNote: override.agentsSkipNote ?? platform.agentsSkipNote,
|
|
623
|
+
commandsSkipNote: override.commandsSkipNote ?? platform.commandsSkipNote,
|
|
624
|
+
legacyDirs: []
|
|
625
|
+
};
|
|
626
|
+
}
|
|
627
|
+
function commandsDirLabel(platform) {
|
|
628
|
+
if (platform.commandsDir) return platform.commandsDir;
|
|
629
|
+
if (platform.commandsAsSkills && platform.skillsDir) return `${platform.skillsDir} (as skills)`;
|
|
630
|
+
return null;
|
|
631
|
+
}
|
|
632
|
+
var SKILL_STANDARD_KEYS = /* @__PURE__ */ new Set(["name", "description", "license", "compatibility", "metadata"]);
|
|
633
|
+
function toolItems(v) {
|
|
634
|
+
if (Array.isArray(v)) return v.map((s) => s.trim()).filter(Boolean);
|
|
635
|
+
if (typeof v === "string") return v.split(",").map((s) => s.trim()).filter(Boolean);
|
|
636
|
+
return [];
|
|
637
|
+
}
|
|
638
|
+
function normalizePiTools(v) {
|
|
639
|
+
const out = [];
|
|
640
|
+
for (const t of toolItems(v)) {
|
|
641
|
+
const base = t.replace(/\(.*\)$/, "").toLowerCase();
|
|
642
|
+
if (!base || base === "agent" || base === "task") continue;
|
|
643
|
+
if (!out.includes(base)) out.push(base);
|
|
644
|
+
}
|
|
645
|
+
return out;
|
|
646
|
+
}
|
|
647
|
+
function transformSkillMd(platform, raw) {
|
|
648
|
+
if (platform.verbatim) return { content: raw, rawCopy: true, notes: [] };
|
|
649
|
+
const { fm, body, hasFrontmatter } = parseFrontmatter(raw);
|
|
650
|
+
if (!hasFrontmatter) return { content: raw, rawCopy: true, notes: [] };
|
|
651
|
+
const out = {};
|
|
652
|
+
const metadata = { ...asRecord(fm.metadata) };
|
|
653
|
+
let dirty = false;
|
|
654
|
+
const notes = [];
|
|
655
|
+
for (const [key, value] of Object.entries(fm)) {
|
|
656
|
+
if (key === "metadata") continue;
|
|
657
|
+
if (SKILL_STANDARD_KEYS.has(key)) {
|
|
658
|
+
out[key] = value;
|
|
659
|
+
continue;
|
|
660
|
+
}
|
|
661
|
+
if (key === "allowed-tools") {
|
|
662
|
+
if (platform.skillKeepAllowedTools) {
|
|
663
|
+
if (platform.name === "pi") {
|
|
664
|
+
const normalized = normalizePiTools(value);
|
|
665
|
+
if (JSON.stringify(normalized) === JSON.stringify(toolItems(value))) {
|
|
666
|
+
out["allowed-tools"] = value;
|
|
667
|
+
} else {
|
|
668
|
+
out["allowed-tools"] = normalized;
|
|
669
|
+
dirty = true;
|
|
670
|
+
notes.push("allowed-tools normalized for pi (lowercase, Agent/Task dropped)");
|
|
671
|
+
}
|
|
672
|
+
} else {
|
|
673
|
+
out["allowed-tools"] = value;
|
|
674
|
+
}
|
|
675
|
+
} else {
|
|
676
|
+
dirty = true;
|
|
677
|
+
notes.push(`dropped allowed-tools (${platform.name} has no skill-level tool allowlist)`);
|
|
678
|
+
}
|
|
679
|
+
continue;
|
|
680
|
+
}
|
|
681
|
+
if (key === "argument-hint") {
|
|
682
|
+
if (platform.skillKeepArgumentHint) {
|
|
683
|
+
out["argument-hint"] = value;
|
|
684
|
+
} else if (platform.skillSlashMetadata) {
|
|
685
|
+
metadata["opencode/slash"] = "true";
|
|
686
|
+
dirty = true;
|
|
687
|
+
notes.push("argument-hint -> metadata opencode/slash (slash command exposure)");
|
|
688
|
+
} else {
|
|
689
|
+
dirty = true;
|
|
690
|
+
notes.push(`dropped argument-hint (no equivalent on ${platform.name})`);
|
|
691
|
+
}
|
|
692
|
+
continue;
|
|
693
|
+
}
|
|
694
|
+
metadata[key] = fmValueToString(value);
|
|
695
|
+
dirty = true;
|
|
696
|
+
notes.push(`relocated top-level ${key} -> metadata.${key}`);
|
|
697
|
+
}
|
|
698
|
+
if (Object.keys(metadata).length > 0) {
|
|
699
|
+
out.metadata = metadata;
|
|
700
|
+
if (!("metadata" in fm)) dirty = true;
|
|
701
|
+
}
|
|
702
|
+
if (!dirty) return { content: raw, rawCopy: true, notes: [] };
|
|
703
|
+
return { content: serializeFrontmatter(out) + body, rawCopy: false, notes };
|
|
704
|
+
}
|
|
705
|
+
var PERMISSION_TO_TOOLS = {
|
|
706
|
+
edit: ["Edit", "Write"],
|
|
707
|
+
bash: ["Bash"],
|
|
708
|
+
task: ["Agent", "Task"],
|
|
709
|
+
webfetch: ["WebFetch"],
|
|
710
|
+
websearch: ["WebSearch"],
|
|
711
|
+
read: ["Read"],
|
|
712
|
+
glob: ["Glob"],
|
|
713
|
+
grep: ["Grep"]
|
|
714
|
+
};
|
|
715
|
+
function tomlInline(s) {
|
|
716
|
+
return '"' + s.replace(/\\/g, "\\\\").replace(/"/g, '\\"') + '"';
|
|
717
|
+
}
|
|
718
|
+
function tomlMultiline(s) {
|
|
719
|
+
const body = s.replace(/\r\n/g, "\n");
|
|
720
|
+
if (!body.includes("'''")) return `'''
|
|
721
|
+
${body}
|
|
722
|
+
'''`;
|
|
723
|
+
return '"' + body.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\r/g, "\\r").replace(/\n/g, "\\n") + '"';
|
|
724
|
+
}
|
|
725
|
+
function firstSentence(text, max = 200) {
|
|
726
|
+
const m = /^[\s\S]*?[.!?](\s|$)/.exec(text);
|
|
727
|
+
let s = (m ? m[0] : text).trim();
|
|
728
|
+
if (s.length > max) s = s.slice(0, max - 1).replace(/\s+\S*$/, "") + "\u2026";
|
|
729
|
+
return s;
|
|
730
|
+
}
|
|
731
|
+
function droppedModeNote(mode, platform) {
|
|
732
|
+
if (mode === void 0) return void 0;
|
|
733
|
+
if (mode !== "all") return `dropped mode: ${mode}`;
|
|
734
|
+
if (platform.agentFormat === "claude") {
|
|
735
|
+
return "dropped mode: all - primary-style use natively available via 'claude --agent <name>'";
|
|
736
|
+
}
|
|
737
|
+
return `dropped mode: all - ${platform.name} has no primary-agent concept (subagent dispatch preserved)`;
|
|
738
|
+
}
|
|
739
|
+
function transformAgentMd(platform, fileName, raw) {
|
|
740
|
+
if (platform.agentFormat === "none") return null;
|
|
741
|
+
if (platform.verbatim || platform.agentFormat === "passthrough") {
|
|
742
|
+
return { fileName, content: raw, rawCopy: true, notes: [] };
|
|
743
|
+
}
|
|
744
|
+
const { fm, body } = parseFrontmatter(raw);
|
|
745
|
+
const name = asString(fm.name) || fileName.replace(/\.md$/, "");
|
|
746
|
+
const description = asString(fm.description) ?? "";
|
|
747
|
+
const permission = asRecord(fm.permission);
|
|
748
|
+
const denies = Object.keys(permission).filter((k) => permission[k] === "deny");
|
|
749
|
+
const allows = Object.keys(permission).filter((k) => permission[k] === "allow");
|
|
750
|
+
const bodyText = body.replace(/^\r?\n/, "").replace(/\s+$/, "");
|
|
751
|
+
const modeNote = droppedModeNote(asString(fm.mode), platform);
|
|
752
|
+
switch (platform.agentFormat) {
|
|
753
|
+
case "claude":
|
|
754
|
+
case "codebuddy": {
|
|
755
|
+
const out = { name, description };
|
|
756
|
+
const notes = [];
|
|
757
|
+
const disallowed = [...new Set(denies.flatMap((k) => PERMISSION_TO_TOOLS[k] ?? []))];
|
|
758
|
+
if (disallowed.length > 0) {
|
|
759
|
+
out.disallowedTools = disallowed;
|
|
760
|
+
notes.push(`permission deny (${denies.join(", ")}) -> disallowedTools: ${disallowed.join(", ")}`);
|
|
761
|
+
}
|
|
762
|
+
if (modeNote) notes.push(modeNote);
|
|
763
|
+
return { fileName, content: serializeFrontmatter(out) + body, rawCopy: false, notes };
|
|
764
|
+
}
|
|
765
|
+
case "cursor": {
|
|
766
|
+
const out = { name, description };
|
|
767
|
+
const notes = [];
|
|
768
|
+
if (permission.edit === "deny") {
|
|
769
|
+
out.readonly = true;
|
|
770
|
+
notes.push("permission edit deny -> readonly: true");
|
|
771
|
+
}
|
|
772
|
+
const rest = denies.filter((k) => k !== "edit");
|
|
773
|
+
if (rest.length > 0) {
|
|
774
|
+
notes.push(`dropped permission deny (${rest.join(", ")}) - no Cursor equivalent`);
|
|
775
|
+
}
|
|
776
|
+
if (modeNote) notes.push(modeNote);
|
|
777
|
+
return { fileName, content: serializeFrontmatter(out) + body, rawCopy: false, notes };
|
|
778
|
+
}
|
|
779
|
+
case "qoder": {
|
|
780
|
+
const out = { name, description };
|
|
781
|
+
const notes = [];
|
|
782
|
+
if (Object.keys(permission).length > 0) {
|
|
783
|
+
const tools = /* @__PURE__ */ new Set(["Read", "Glob", "Grep"]);
|
|
784
|
+
for (const k of allows) {
|
|
785
|
+
for (const t of PERMISSION_TO_TOOLS[k] ?? []) {
|
|
786
|
+
if (t !== "Agent" && t !== "Task") tools.add(t);
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
out.tools = [...tools];
|
|
790
|
+
notes.push(`permission -> tools whitelist: ${out.tools.join(", ")}`);
|
|
791
|
+
}
|
|
792
|
+
if (modeNote) notes.push(modeNote);
|
|
793
|
+
return { fileName, content: serializeFrontmatter(out) + body, rawCopy: false, notes };
|
|
794
|
+
}
|
|
795
|
+
case "trae": {
|
|
796
|
+
const out = { name, description };
|
|
797
|
+
const notes = [];
|
|
798
|
+
const disallowed = [
|
|
799
|
+
...new Set(denies.flatMap((k) => PERMISSION_TO_TOOLS[k] ?? []))
|
|
800
|
+
].filter((t) => t !== "Agent" && t !== "Task");
|
|
801
|
+
if (disallowed.length > 0) {
|
|
802
|
+
out.disallowedTools = disallowed.join(", ");
|
|
803
|
+
notes.push(`permission deny (${denies.join(", ")}) -> disallowedTools: ${out.disallowedTools}`);
|
|
804
|
+
}
|
|
805
|
+
if (denies.includes("task")) {
|
|
806
|
+
notes.push("dropped permission task deny - Trae subagents have no Task tool");
|
|
807
|
+
}
|
|
808
|
+
if (modeNote) notes.push(modeNote);
|
|
809
|
+
return { fileName, content: serializeFrontmatter(out) + body, rawCopy: false, notes };
|
|
810
|
+
}
|
|
811
|
+
case "pi-profile": {
|
|
812
|
+
const out = { name, description };
|
|
813
|
+
const notes = [];
|
|
814
|
+
if (Object.keys(permission).length > 0) {
|
|
815
|
+
const tools = /* @__PURE__ */ new Set(["read", "glob", "grep"]);
|
|
816
|
+
if (allows.includes("edit")) {
|
|
817
|
+
tools.add("edit");
|
|
818
|
+
tools.add("write");
|
|
819
|
+
}
|
|
820
|
+
if (allows.includes("bash")) tools.add("bash");
|
|
821
|
+
if (allows.includes("webfetch")) tools.add("webfetch");
|
|
822
|
+
if (allows.includes("websearch")) tools.add("websearch");
|
|
823
|
+
out.tools = [...tools].join(", ");
|
|
824
|
+
notes.push(`permission -> tools: ${out.tools}`);
|
|
825
|
+
}
|
|
826
|
+
if (modeNote) notes.push(modeNote);
|
|
827
|
+
return { fileName, content: serializeFrontmatter(out) + body, rawCopy: false, notes };
|
|
828
|
+
}
|
|
829
|
+
case "codex-toml": {
|
|
830
|
+
const notes = ["converted to Codex subagent TOML (body -> developer_instructions)"];
|
|
831
|
+
const lines = [`name = ${tomlInline(name)}`];
|
|
832
|
+
if (description) lines.push(`description = ${tomlInline(description)}`);
|
|
833
|
+
let instructions = bodyText;
|
|
834
|
+
if (permission.edit === "deny") {
|
|
835
|
+
instructions += "\n\nConstraint: never modify, create, or delete any file - this agent is read-only.";
|
|
836
|
+
notes.push("permission edit deny -> read-only constraint appended (no per-agent write sandbox)");
|
|
837
|
+
}
|
|
838
|
+
lines.push(`developer_instructions = ${tomlMultiline(instructions)}`);
|
|
839
|
+
if (permission.bash === "deny") {
|
|
840
|
+
lines.push("", "[features]", "shell_tool = false");
|
|
841
|
+
notes.push("permission bash deny -> features.shell_tool = false");
|
|
842
|
+
}
|
|
843
|
+
if (modeNote) notes.push(modeNote);
|
|
844
|
+
return {
|
|
845
|
+
fileName: fileName.replace(/\.md$/, ".toml"),
|
|
846
|
+
content: lines.join("\n") + "\n",
|
|
847
|
+
rawCopy: false,
|
|
848
|
+
notes
|
|
849
|
+
};
|
|
850
|
+
}
|
|
851
|
+
case "atomcode-role": {
|
|
852
|
+
const permissionValue = permission.edit === "deny" ? "explore" : "worker";
|
|
853
|
+
const out = {
|
|
854
|
+
permission: permissionValue,
|
|
855
|
+
difficulty: "hard",
|
|
856
|
+
when: firstSentence(description),
|
|
857
|
+
name,
|
|
858
|
+
description
|
|
859
|
+
};
|
|
860
|
+
const notes = [
|
|
861
|
+
`converted to AtomCode role format (permission: ${permissionValue}, difficulty: hard)`,
|
|
862
|
+
"difficulty defaults to hard (no source equivalent)"
|
|
863
|
+
];
|
|
864
|
+
return { fileName, content: serializeFrontmatter(out) + body, rawCopy: false, notes };
|
|
865
|
+
}
|
|
866
|
+
default:
|
|
867
|
+
return { fileName, content: raw, rawCopy: true, notes: [] };
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
function transformCommandMd(platform, raw) {
|
|
871
|
+
if (platform.verbatim || platform.commandsDir === null) {
|
|
872
|
+
return { content: raw, rawCopy: true, notes: [] };
|
|
873
|
+
}
|
|
874
|
+
const { fm, body, hasFrontmatter } = parseFrontmatter(raw);
|
|
875
|
+
if (!hasFrontmatter) return { content: raw, rawCopy: true, notes: [] };
|
|
876
|
+
const keep = new Set(platform.commandKeepKeys);
|
|
877
|
+
const out = {};
|
|
878
|
+
let dirty = false;
|
|
879
|
+
const notes = [];
|
|
880
|
+
for (const [key, value] of Object.entries(fm)) {
|
|
881
|
+
if (keep.has(key)) {
|
|
882
|
+
out[key] = value;
|
|
883
|
+
continue;
|
|
884
|
+
}
|
|
885
|
+
if (key === "subtask" && platform.agentFormat === "claude" && value === "true") {
|
|
886
|
+
out.context = "fork";
|
|
887
|
+
dirty = true;
|
|
888
|
+
notes.push("subtask: true -> context: fork");
|
|
889
|
+
continue;
|
|
890
|
+
}
|
|
891
|
+
dirty = true;
|
|
892
|
+
notes.push(`dropped ${key} (not supported in ${platform.name} commands)`);
|
|
893
|
+
}
|
|
894
|
+
if (!dirty) return { content: raw, rawCopy: true, notes: [] };
|
|
895
|
+
if (Object.keys(out).length === 0) {
|
|
896
|
+
return { content: body, rawCopy: false, notes };
|
|
897
|
+
}
|
|
898
|
+
return { content: serializeFrontmatter(out) + body, rawCopy: false, notes };
|
|
899
|
+
}
|
|
900
|
+
function commandToSkillMd(platform, fileName, raw) {
|
|
901
|
+
const { fm, body } = parseFrontmatter(raw);
|
|
902
|
+
const skillName = fileName.replace(/\.md$/, "");
|
|
903
|
+
const notes = [];
|
|
904
|
+
const out = { name: skillName };
|
|
905
|
+
const description = asString(fm.description);
|
|
906
|
+
if (description) out.description = description;
|
|
907
|
+
if ("subtask" in fm) notes.push("dropped subtask (no skill equivalent)");
|
|
908
|
+
if ("argument-hint" in fm) notes.push("dropped argument-hint (no skill equivalent)");
|
|
909
|
+
let openaiYaml = null;
|
|
910
|
+
if (platform.name === "codex") {
|
|
911
|
+
notes.push("converted command to skill (Codex custom prompts deprecated)");
|
|
912
|
+
notes.push("openai.yaml: allow_implicit_invocation=false (commands are user-triggered)");
|
|
913
|
+
openaiYaml = "policy:\n allow_implicit_invocation: false\n";
|
|
914
|
+
} else if (platform.name === "dsh") {
|
|
915
|
+
notes.push("converted command to skill (DSH has no file-based commands)");
|
|
916
|
+
out["disable-model-invocation"] = true;
|
|
917
|
+
out["user-invocable"] = true;
|
|
918
|
+
notes.push("disable-model-invocation + user-invocable -> user-only invocation (DSH native keys)");
|
|
919
|
+
} else if (platform.name === "atomcode") {
|
|
920
|
+
notes.push(
|
|
921
|
+
"converted command to skill (each skill appears as /<skill-name>; $<skill-name> <args> carries inline arguments)"
|
|
922
|
+
);
|
|
923
|
+
notes.push("user-only invocation not preservable (AtomCode model may auto-invoke via use_skill)");
|
|
924
|
+
} else {
|
|
925
|
+
notes.push("converted command to skill");
|
|
926
|
+
}
|
|
927
|
+
return {
|
|
928
|
+
skillName,
|
|
929
|
+
content: serializeFrontmatter(out) + body,
|
|
930
|
+
openaiYaml,
|
|
931
|
+
notes
|
|
932
|
+
};
|
|
933
|
+
}
|
|
934
|
+
var SKILL_NAME_RE = /^[a-z0-9]+(-[a-z0-9]+)*$/;
|
|
935
|
+
function validateSkillMd(skillName, raw, descriptionLimit) {
|
|
936
|
+
const issues = [];
|
|
937
|
+
const { fm, hasFrontmatter } = parseFrontmatter(raw);
|
|
938
|
+
if (!hasFrontmatter) {
|
|
939
|
+
issues.push({
|
|
940
|
+
level: "error",
|
|
941
|
+
message: `${skillName}: SKILL.md has no frontmatter block starting with --- on line 1`
|
|
942
|
+
});
|
|
943
|
+
return issues;
|
|
944
|
+
}
|
|
945
|
+
const name = asString(fm.name);
|
|
946
|
+
if (!name) {
|
|
947
|
+
issues.push({ level: "error", message: `${skillName}: missing name` });
|
|
948
|
+
} else {
|
|
949
|
+
if (!SKILL_NAME_RE.test(name)) {
|
|
950
|
+
issues.push({ level: "error", message: `${skillName}: name "${name}" is not kebab-case` });
|
|
951
|
+
}
|
|
952
|
+
if (name.length > 64) {
|
|
953
|
+
issues.push({ level: "error", message: `${skillName}: name exceeds 64 chars` });
|
|
954
|
+
}
|
|
955
|
+
if (name !== skillName) {
|
|
956
|
+
issues.push({ level: "error", message: `${skillName}: name "${name}" != directory name` });
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
const description = asString(fm.description);
|
|
960
|
+
if (!description) {
|
|
961
|
+
issues.push({ level: "error", message: `${skillName}: missing description` });
|
|
962
|
+
} else if (descriptionLimit !== void 0 && description.length > descriptionLimit) {
|
|
963
|
+
issues.push({
|
|
964
|
+
level: "warn",
|
|
965
|
+
message: `${skillName}: description ${description.length} chars > ${descriptionLimit} (platform hard limit); installed as-is, platform may refuse to load`
|
|
966
|
+
});
|
|
967
|
+
}
|
|
968
|
+
return issues;
|
|
969
|
+
}
|
|
970
|
+
function validateAgentFile(platform, fileName, raw) {
|
|
971
|
+
const issues = [];
|
|
972
|
+
const base = fileName.replace(/\.(md|toml)$/, "");
|
|
973
|
+
if (platform.agentFormat === "codex-toml") {
|
|
974
|
+
if (!/^name\s*=/m.test(raw)) issues.push({ level: "error", message: `${base}.toml: missing name` });
|
|
975
|
+
if (!/^description\s*=/m.test(raw)) {
|
|
976
|
+
issues.push({ level: "error", message: `${base}.toml: missing description` });
|
|
977
|
+
}
|
|
978
|
+
if (!/^developer_instructions\s*=/m.test(raw)) {
|
|
979
|
+
issues.push({ level: "error", message: `${base}.toml: missing developer_instructions` });
|
|
980
|
+
}
|
|
981
|
+
return issues;
|
|
982
|
+
}
|
|
983
|
+
const { fm, hasFrontmatter } = parseFrontmatter(raw);
|
|
984
|
+
if (!hasFrontmatter) {
|
|
985
|
+
issues.push({ level: "error", message: `${base}: no frontmatter block starting with --- on line 1` });
|
|
986
|
+
return issues;
|
|
987
|
+
}
|
|
988
|
+
if (platform.agentFormat === "atomcode-role") {
|
|
989
|
+
const permission = asString(fm.permission);
|
|
990
|
+
if (permission !== "explore" && permission !== "worker") {
|
|
991
|
+
issues.push({ level: "error", message: `${base}: permission must be explore|worker` });
|
|
992
|
+
}
|
|
993
|
+
const difficulty = asString(fm.difficulty);
|
|
994
|
+
if (difficulty !== "simple" && difficulty !== "hard") {
|
|
995
|
+
issues.push({ level: "error", message: `${base}: difficulty must be simple|hard` });
|
|
996
|
+
}
|
|
997
|
+
return issues;
|
|
998
|
+
}
|
|
999
|
+
const name = asString(fm.name);
|
|
1000
|
+
if (!name) {
|
|
1001
|
+
issues.push({ level: "error", message: `${base}: missing name` });
|
|
1002
|
+
} else {
|
|
1003
|
+
if (platform.name === "trae" && name.length > 50) {
|
|
1004
|
+
issues.push({ level: "error", message: `${base}: name ${name.length} chars > 50 (trae limit)` });
|
|
1005
|
+
}
|
|
1006
|
+
if (platform.name === "claude-code") {
|
|
1007
|
+
if (name.length > 256) {
|
|
1008
|
+
issues.push({ level: "error", message: `${base}: name exceeds 256 chars` });
|
|
1009
|
+
}
|
|
1010
|
+
if (name.includes(":")) {
|
|
1011
|
+
issues.push({ level: "error", message: `${base}: name must not contain ':'` });
|
|
1012
|
+
}
|
|
1013
|
+
if (name.startsWith("-")) {
|
|
1014
|
+
issues.push({ level: "error", message: `${base}: name must not start with '-'` });
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
if (!asString(fm.description)) {
|
|
1019
|
+
issues.push({ level: "error", message: `${base}: missing description` });
|
|
1020
|
+
}
|
|
1021
|
+
return issues;
|
|
1022
|
+
}
|
|
1023
|
+
function validateCommandMd(platform, fileName, raw) {
|
|
1024
|
+
const issues = [];
|
|
1025
|
+
const base = fileName.replace(/\.md$/, "");
|
|
1026
|
+
if (!SKILL_NAME_RE.test(base)) {
|
|
1027
|
+
issues.push({
|
|
1028
|
+
level: "error",
|
|
1029
|
+
message: `${fileName}: command name "${base}" is not lowercase kebab-case (trae/qoder/codex naming constraint)`
|
|
1030
|
+
});
|
|
1031
|
+
}
|
|
1032
|
+
if (!raw.startsWith("---")) {
|
|
1033
|
+
issues.push({
|
|
1034
|
+
level: "warn",
|
|
1035
|
+
message: `${fileName}: no frontmatter block - description missing from command list`
|
|
1036
|
+
});
|
|
1037
|
+
return issues;
|
|
1038
|
+
}
|
|
1039
|
+
const { fm, body, hasFrontmatter } = parseFrontmatter(raw);
|
|
1040
|
+
if (!hasFrontmatter) {
|
|
1041
|
+
issues.push({
|
|
1042
|
+
level: "error",
|
|
1043
|
+
message: `${fileName}: malformed frontmatter (--- must open and close the block)`
|
|
1044
|
+
});
|
|
1045
|
+
return issues;
|
|
1046
|
+
}
|
|
1047
|
+
if (!asString(fm.description)) {
|
|
1048
|
+
issues.push({
|
|
1049
|
+
level: "warn",
|
|
1050
|
+
message: `${fileName}: no description - autocomplete shows nothing (qoder may not list it)`
|
|
1051
|
+
});
|
|
1052
|
+
}
|
|
1053
|
+
if (body.trim() === "") {
|
|
1054
|
+
issues.push({
|
|
1055
|
+
level: "warn",
|
|
1056
|
+
message: `${fileName}: empty body - qoder will not list this command`
|
|
1057
|
+
});
|
|
1058
|
+
}
|
|
1059
|
+
if (platform.agentFormat === "codebuddy" && body.includes("!`")) {
|
|
1060
|
+
const allowed = typeof fm["allowed-tools"] === "string" ? fm["allowed-tools"] : Array.isArray(fm["allowed-tools"]) ? fm["allowed-tools"].join(",") : "";
|
|
1061
|
+
if (!/\bBash\b/.test(allowed)) {
|
|
1062
|
+
issues.push({
|
|
1063
|
+
level: "warn",
|
|
1064
|
+
message: `${fileName}: body uses !\`cmd\` injection but allowed-tools lacks Bash (codebuddy requires it)`
|
|
1065
|
+
});
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
return issues;
|
|
1069
|
+
}
|
|
1070
|
+
async function exists2(p) {
|
|
1071
|
+
try {
|
|
1072
|
+
await fs2.access(p);
|
|
1073
|
+
return true;
|
|
1074
|
+
} catch {
|
|
1075
|
+
return false;
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
async function listBundledSkills(resolver = DEFAULT_RESOLVER) {
|
|
1079
|
+
const names = [];
|
|
1080
|
+
for (const name of await resolver.listNames("skills", "dir")) {
|
|
1081
|
+
if (await resolver.has(`skills/${name}/SKILL.md`)) names.push(name);
|
|
1082
|
+
}
|
|
1083
|
+
return names;
|
|
1084
|
+
}
|
|
1085
|
+
async function listBundledAgents(resolver = DEFAULT_RESOLVER) {
|
|
1086
|
+
return resolver.listNames("agents", "entry");
|
|
1087
|
+
}
|
|
1088
|
+
async function listBundledCommands(resolver = DEFAULT_RESOLVER) {
|
|
1089
|
+
return (await resolver.listNames("commands", "file")).filter((name) => name.endsWith(".md"));
|
|
1090
|
+
}
|
|
1091
|
+
async function copyResolvedDir(resolver, relDir, dest) {
|
|
1092
|
+
await fs2.mkdir(dest, { recursive: true });
|
|
1093
|
+
for (const file of await resolver.walkDir(relDir)) {
|
|
1094
|
+
const rel = path2.posix.relative(relDir, file.destRel);
|
|
1095
|
+
const out = path2.join(dest, ...rel.split("/"));
|
|
1096
|
+
await fs2.mkdir(path2.dirname(out), { recursive: true });
|
|
1097
|
+
await fs2.copyFile(file.src, out);
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
async function copyOverlayFiles(resolver, relDir, dest, exclude, dryRun) {
|
|
1101
|
+
let count = 0;
|
|
1102
|
+
for (const file of await resolver.walkDir(relDir)) {
|
|
1103
|
+
const rel = path2.posix.relative(relDir, file.destRel);
|
|
1104
|
+
if (exclude.has(path2.posix.basename(rel))) continue;
|
|
1105
|
+
count++;
|
|
1106
|
+
if (dryRun) continue;
|
|
1107
|
+
const out = path2.join(dest, ...rel.split("/"));
|
|
1108
|
+
await fs2.mkdir(path2.dirname(out), { recursive: true });
|
|
1109
|
+
await fs2.copyFile(file.src, out);
|
|
1110
|
+
}
|
|
1111
|
+
return count;
|
|
1112
|
+
}
|
|
1113
|
+
var SKILL_OVERLAY_EXCLUDE = /* @__PURE__ */ new Set(["SKILL.frontmatter.md", "SKILL.unique.md", "SKILL.md"]);
|
|
1114
|
+
async function platformSourcePath(platformName, kind, name, resolver = DEFAULT_RESOLVER) {
|
|
1115
|
+
const rel = `platforms/${platformName}/${kind}/${name}`;
|
|
1116
|
+
if (await resolver.has(rel)) return { src: await resolver.resolve(rel), overlay: true };
|
|
1117
|
+
return { src: await resolver.resolve(`${kind}/${name}`), overlay: false };
|
|
1118
|
+
}
|
|
1119
|
+
function agentFileCandidates(platform, mdName) {
|
|
1120
|
+
return platform.agentFormat === "codex-toml" ? [mdName.replace(/\.md$/, ".toml"), mdName] : [mdName];
|
|
1121
|
+
}
|
|
1122
|
+
async function cleanLegacyDirs(platform, resolver) {
|
|
1123
|
+
if (platform.legacyDirs.length === 0) return;
|
|
1124
|
+
const skills = await listBundledSkills(resolver);
|
|
1125
|
+
const agents = await listBundledAgents(resolver);
|
|
1126
|
+
const commands = await listBundledCommands(resolver);
|
|
1127
|
+
for (const legacy of platform.legacyDirs) {
|
|
1128
|
+
if (legacy.skillsDir) {
|
|
1129
|
+
for (const s of skills) await fs2.rm(path2.join(legacy.skillsDir, s), { recursive: true, force: true });
|
|
1130
|
+
}
|
|
1131
|
+
if (legacy.agentsDir) {
|
|
1132
|
+
for (const a of agents) await fs2.rm(path2.join(legacy.agentsDir, a), { recursive: true, force: true });
|
|
1133
|
+
}
|
|
1134
|
+
if (legacy.commandsDir) {
|
|
1135
|
+
for (const c of commands) await fs2.rm(path2.join(legacy.commandsDir, c), { force: true });
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
function normalizeText(raw) {
|
|
1140
|
+
const noBom = raw.charCodeAt(0) === 65279 ? raw.slice(1) : raw;
|
|
1141
|
+
return noBom.replace(/\r\n/g, "\n");
|
|
1142
|
+
}
|
|
1143
|
+
function extractYamlHeader(raw) {
|
|
1144
|
+
const m = /^---\r?\n[\s\S]*?\r?\n---[ \t]*(?:\r?\n|$)/.exec(raw);
|
|
1145
|
+
return m ? m[0].replace(/\r\n/g, "\n").replace(/\n+$/, "") : null;
|
|
1146
|
+
}
|
|
1147
|
+
function trimmedBody(raw) {
|
|
1148
|
+
const { body, hasFrontmatter } = parseFrontmatter(raw);
|
|
1149
|
+
return (hasFrontmatter ? body : raw).replace(/^(?:\r?\n)+/, "").replace(/\s+$/, "");
|
|
1150
|
+
}
|
|
1151
|
+
function platformPaths(platformName, kind, name) {
|
|
1152
|
+
const base = `platforms/${platformName}`;
|
|
1153
|
+
if (kind === "skill") {
|
|
1154
|
+
const dir2 = `${base}/skills/${name}`;
|
|
1155
|
+
return {
|
|
1156
|
+
headerMd: `${dir2}/SKILL.frontmatter.md`,
|
|
1157
|
+
headerToml: null,
|
|
1158
|
+
unique: `${dir2}/SKILL.unique.md`
|
|
1159
|
+
};
|
|
1160
|
+
}
|
|
1161
|
+
const dir = `${base}/${kind === "agent" ? "agents" : "commands"}`;
|
|
1162
|
+
const stem = name.replace(/\.md$/, "");
|
|
1163
|
+
return {
|
|
1164
|
+
headerMd: `${dir}/${stem}.frontmatter.md`,
|
|
1165
|
+
headerToml: kind === "agent" ? `${dir}/${stem}.frontmatter.toml` : null,
|
|
1166
|
+
unique: `${dir}/${stem}.unique.md`
|
|
1167
|
+
};
|
|
1168
|
+
}
|
|
1169
|
+
async function readOptional(p) {
|
|
1170
|
+
try {
|
|
1171
|
+
return normalizeText(await fs2.readFile(p, "utf-8"));
|
|
1172
|
+
} catch {
|
|
1173
|
+
return null;
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
function joinYamlBody(header, body) {
|
|
1177
|
+
const h = header.replace(/\n+$/, "");
|
|
1178
|
+
return body ? `${h}
|
|
1179
|
+
|
|
1180
|
+
${body}
|
|
1181
|
+
` : `${h}
|
|
1182
|
+
`;
|
|
1183
|
+
}
|
|
1184
|
+
async function composeDoc(platform, kind, name, rootRaw, resolver = DEFAULT_RESOLVER) {
|
|
1185
|
+
const rootText = normalizeText(rootRaw);
|
|
1186
|
+
const rootHeader = extractYamlHeader(rootText);
|
|
1187
|
+
const rootBody = trimmedBody(rootText);
|
|
1188
|
+
const paths = platformPaths(platform.name, kind, name);
|
|
1189
|
+
const [headerFile, tomlFile, uniqueFile] = await Promise.all([
|
|
1190
|
+
resolver.resolve(paths.headerMd).then(readOptional),
|
|
1191
|
+
paths.headerToml ? resolver.resolve(paths.headerToml).then(readOptional) : Promise.resolve(null),
|
|
1192
|
+
resolver.resolve(paths.unique).then(readOptional)
|
|
1193
|
+
]);
|
|
1194
|
+
const uniqueText = uniqueFile?.trimEnd() ?? null;
|
|
1195
|
+
const body = [uniqueText, rootBody].filter((s) => !!s).join("\n\n");
|
|
1196
|
+
return {
|
|
1197
|
+
header: headerFile ? extractYamlHeader(headerFile) : null,
|
|
1198
|
+
headerToml: tomlFile ? tomlFile.replace(/\s+$/, "") : null,
|
|
1199
|
+
headerRaw: headerFile ? headerFile.replace(/\s+$/, "") : null,
|
|
1200
|
+
unique: uniqueText,
|
|
1201
|
+
rootHeader,
|
|
1202
|
+
body,
|
|
1203
|
+
legacyRaw: rootHeader ? joinYamlBody(rootHeader, body) : body ? `${body}
|
|
1204
|
+
` : ""
|
|
1205
|
+
};
|
|
1206
|
+
}
|
|
1207
|
+
function sourceNotes(c) {
|
|
1208
|
+
return [
|
|
1209
|
+
c.header || c.headerToml ? "frontmatter: platforms definition" : "frontmatter: root fallback",
|
|
1210
|
+
c.unique ? "body: unique patch + root body" : "body: root body"
|
|
1211
|
+
];
|
|
1212
|
+
}
|
|
1213
|
+
function composeYamlDoc(c) {
|
|
1214
|
+
return {
|
|
1215
|
+
content: joinYamlBody(c.header, c.body),
|
|
1216
|
+
rawCopy: false,
|
|
1217
|
+
notes: sourceNotes(c)
|
|
1218
|
+
};
|
|
1219
|
+
}
|
|
1220
|
+
async function buildSkillContent(platform, skillName, rootRaw, resolver = DEFAULT_RESOLVER) {
|
|
1221
|
+
if (platform.verbatim) return { content: rootRaw, rawCopy: true, notes: [] };
|
|
1222
|
+
const c = await composeDoc(platform, "skill", skillName, rootRaw, resolver);
|
|
1223
|
+
if (c.header) return composeYamlDoc(c);
|
|
1224
|
+
const t = transformSkillMd(platform, c.legacyRaw);
|
|
1225
|
+
return {
|
|
1226
|
+
content: t.content,
|
|
1227
|
+
// The unique patch has been merged into the body (content != source file): even when the frontmatter needs no rewrite
|
|
1228
|
+
// it must not be marked rawCopy, or installTo would skip writing as "raw copy already correct" and the unique patch would be lost
|
|
1229
|
+
rawCopy: t.rawCopy && !c.unique,
|
|
1230
|
+
notes: [...sourceNotes(c), "platform frontmatter absent: legacy transform applied", ...t.notes]
|
|
1231
|
+
};
|
|
1232
|
+
}
|
|
1233
|
+
function injectCodexInstructions(toml, body) {
|
|
1234
|
+
const notes = [];
|
|
1235
|
+
let text = toml.split("\n").filter(
|
|
1236
|
+
(line) => !(/^\s*#/.test(line) && /developer_instructions\s*=/.test(line))
|
|
1237
|
+
).join("\n").replace(/\s+$/, "");
|
|
1238
|
+
if (/^developer_instructions\s*=/m.test(text)) {
|
|
1239
|
+
notes.push("developer_instructions already defined in platform TOML: body not injected");
|
|
1240
|
+
return { content: text + "\n", notes };
|
|
1241
|
+
}
|
|
1242
|
+
const key = `developer_instructions = ${tomlMultiline(body)}`;
|
|
1243
|
+
const lines = text.split("\n");
|
|
1244
|
+
const firstTable = lines.findIndex((line) => /^\s*\[/.test(line));
|
|
1245
|
+
if (firstTable >= 0) {
|
|
1246
|
+
lines.splice(firstTable, 0, key, "");
|
|
1247
|
+
} else {
|
|
1248
|
+
lines.push("", key);
|
|
1249
|
+
}
|
|
1250
|
+
notes.push("developer_instructions injected from composed body");
|
|
1251
|
+
return { content: lines.join("\n").replace(/\n{3,}$/, "\n\n") + "\n", notes };
|
|
1252
|
+
}
|
|
1253
|
+
async function buildAgentContent(platform, fileName, rootRaw, resolver = DEFAULT_RESOLVER) {
|
|
1254
|
+
if (platform.agentFormat === "none") return null;
|
|
1255
|
+
if (platform.verbatim) {
|
|
1256
|
+
return { fileName, content: rootRaw, rawCopy: true, notes: [] };
|
|
1257
|
+
}
|
|
1258
|
+
const c = await composeDoc(platform, "agent", fileName, rootRaw, resolver);
|
|
1259
|
+
const tomlHeader = c.headerToml ?? (platform.agentFormat === "codex-toml" && !c.header ? c.headerRaw : null);
|
|
1260
|
+
if (platform.agentFormat === "codex-toml" && tomlHeader) {
|
|
1261
|
+
const out = injectCodexInstructions(tomlHeader, c.body);
|
|
1262
|
+
const notes = sourceNotes(c);
|
|
1263
|
+
if (!c.headerToml && !c.header) notes[0] = "frontmatter: platforms definition (TOML in .frontmatter.md, legacy name)";
|
|
1264
|
+
return {
|
|
1265
|
+
fileName: fileName.replace(/\.md$/, ".toml"),
|
|
1266
|
+
content: out.content,
|
|
1267
|
+
rawCopy: false,
|
|
1268
|
+
notes: [...notes, ...out.notes]
|
|
1269
|
+
};
|
|
1270
|
+
}
|
|
1271
|
+
if (c.header) {
|
|
1272
|
+
return { fileName, ...composeYamlDoc(c) };
|
|
1273
|
+
}
|
|
1274
|
+
const t = transformAgentMd(platform, fileName, c.legacyRaw);
|
|
1275
|
+
if (!t) return null;
|
|
1276
|
+
return {
|
|
1277
|
+
fileName: t.fileName,
|
|
1278
|
+
content: t.content,
|
|
1279
|
+
// Same as buildSkillContent: must not be marked rawCopy when the unique patch changed the content (keep the contract consistent)
|
|
1280
|
+
rawCopy: t.rawCopy && !c.unique,
|
|
1281
|
+
notes: [...sourceNotes(c), "platform frontmatter absent: legacy transform applied", ...t.notes]
|
|
1282
|
+
};
|
|
1283
|
+
}
|
|
1284
|
+
async function buildCommandContent(platform, fileName, rootRaw, resolver = DEFAULT_RESOLVER) {
|
|
1285
|
+
if (platform.verbatim) return { content: rootRaw, rawCopy: true, notes: [] };
|
|
1286
|
+
const c = await composeDoc(platform, "command", fileName, rootRaw, resolver);
|
|
1287
|
+
if (c.header) return composeYamlDoc(c);
|
|
1288
|
+
const t = transformCommandMd(platform, c.legacyRaw);
|
|
1289
|
+
return {
|
|
1290
|
+
content: t.content,
|
|
1291
|
+
// Same as buildSkillContent: must not be marked rawCopy when the unique patch changed the content
|
|
1292
|
+
// (installTo's rawCopy branch copies the source file as is, which would drop the unique patch)
|
|
1293
|
+
rawCopy: t.rawCopy && !c.unique,
|
|
1294
|
+
notes: [...sourceNotes(c), ...t.notes]
|
|
1295
|
+
};
|
|
1296
|
+
}
|
|
1297
|
+
async function buildCommandSkill(platform, fileName, rootRaw, resolver = DEFAULT_RESOLVER) {
|
|
1298
|
+
const c = await composeDoc(platform, "command", fileName, rootRaw, resolver);
|
|
1299
|
+
const t = commandToSkillMd(platform, fileName, c.legacyRaw);
|
|
1300
|
+
return { ...t, notes: [...sourceNotes(c), ...t.notes] };
|
|
1301
|
+
}
|
|
1302
|
+
async function installTo(target, opts = {}) {
|
|
1303
|
+
const platform = target.platform;
|
|
1304
|
+
const dryRun = opts.dryRun === true;
|
|
1305
|
+
const resolver = opts.resolver ?? DEFAULT_RESOLVER;
|
|
1306
|
+
const noteCounts = /* @__PURE__ */ new Map();
|
|
1307
|
+
const issues = [];
|
|
1308
|
+
const skipped = [];
|
|
1309
|
+
const addNote = (note) => {
|
|
1310
|
+
noteCounts.set(note, (noteCounts.get(note) ?? 0) + 1);
|
|
1311
|
+
};
|
|
1312
|
+
if (!existsSync(SKILLS_ROOT) || !existsSync(AGENTS_ROOT) || !existsSync(COMMANDS_ROOT)) {
|
|
1313
|
+
throw new Error(
|
|
1314
|
+
`incomplete plugin package: the install sources (skills/, agents/, commands/) are missing under ${PACKAGE_ROOT}. The publish config of this version excluded the root contents; upgrade the plugin or check files/exclusion in package.json.`
|
|
1315
|
+
);
|
|
1316
|
+
}
|
|
1317
|
+
if (!dryRun) await cleanLegacyDirs(platform, resolver);
|
|
1318
|
+
let skills = 0;
|
|
1319
|
+
const bundledSkills = await listBundledSkills(resolver);
|
|
1320
|
+
if (platform.skillsDir && bundledSkills.length > 0 && !dryRun) {
|
|
1321
|
+
await fs2.mkdir(platform.skillsDir, { recursive: true });
|
|
1322
|
+
}
|
|
1323
|
+
if (platform.skillsDir) {
|
|
1324
|
+
for (const name of bundledSkills) {
|
|
1325
|
+
const sourceRaw = await fs2.readFile(await resolver.resolve(`skills/${name}/SKILL.md`), "utf-8");
|
|
1326
|
+
const t = await buildSkillContent(platform, name, sourceRaw, resolver);
|
|
1327
|
+
const dest = path2.join(platform.skillsDir, name);
|
|
1328
|
+
if (!dryRun) {
|
|
1329
|
+
await fs2.rm(dest, { recursive: true, force: true });
|
|
1330
|
+
await copyResolvedDir(resolver, `skills/${name}`, dest);
|
|
1331
|
+
}
|
|
1332
|
+
const overlayCount = await copyOverlayFiles(
|
|
1333
|
+
resolver,
|
|
1334
|
+
`platforms/${platform.name}/skills/${name}`,
|
|
1335
|
+
dest,
|
|
1336
|
+
SKILL_OVERLAY_EXCLUDE,
|
|
1337
|
+
dryRun
|
|
1338
|
+
);
|
|
1339
|
+
if (overlayCount > 0) {
|
|
1340
|
+
addNote(`file overlay: platforms/${platform.name}/skills/${name} (${overlayCount} files)`);
|
|
1341
|
+
}
|
|
1342
|
+
if (!dryRun && !t.rawCopy) await fs2.writeFile(path2.join(dest, "SKILL.md"), t.content, "utf-8");
|
|
1343
|
+
for (const n of t.notes) addNote(n);
|
|
1344
|
+
const finalRaw = dryRun ? t.rawCopy ? sourceRaw : t.content : await fs2.readFile(path2.join(platform.skillsDir, name, "SKILL.md"), "utf-8");
|
|
1345
|
+
issues.push(...validateSkillMd(name, finalRaw, platform.skillDescriptionLimit));
|
|
1346
|
+
skills++;
|
|
1347
|
+
}
|
|
1348
|
+
} else if (bundledSkills.length > 0) {
|
|
1349
|
+
skipped.push(`${target.name}: skills skipped - platform has no skills directory`);
|
|
1350
|
+
}
|
|
1351
|
+
let agents = 0;
|
|
1352
|
+
const bundledAgents = await listBundledAgents(resolver);
|
|
1353
|
+
if (platform.agentsDir && bundledAgents.length > 0 && !dryRun) {
|
|
1354
|
+
await fs2.mkdir(platform.agentsDir, { recursive: true });
|
|
1355
|
+
}
|
|
1356
|
+
if (platform.agentsDir) {
|
|
1357
|
+
for (const name of bundledAgents) {
|
|
1358
|
+
const srcRel = `agents/${name}`;
|
|
1359
|
+
if (await resolver.kind(srcRel) === "dir") {
|
|
1360
|
+
const dest = path2.join(platform.agentsDir, name);
|
|
1361
|
+
if (!dryRun) {
|
|
1362
|
+
await fs2.rm(dest, { recursive: true, force: true });
|
|
1363
|
+
await copyResolvedDir(resolver, srcRel, dest);
|
|
1364
|
+
}
|
|
1365
|
+
const dirOverlay = await copyOverlayFiles(
|
|
1366
|
+
resolver,
|
|
1367
|
+
`platforms/${platform.name}/agents/${name}`,
|
|
1368
|
+
dest,
|
|
1369
|
+
/* @__PURE__ */ new Set(),
|
|
1370
|
+
dryRun
|
|
1371
|
+
);
|
|
1372
|
+
if (dirOverlay > 0) {
|
|
1373
|
+
addNote(`file overlay: platforms/${platform.name}/agents/${name} (${dirOverlay} files)`);
|
|
1374
|
+
}
|
|
1375
|
+
agents++;
|
|
1376
|
+
continue;
|
|
1377
|
+
}
|
|
1378
|
+
if (!name.endsWith(".md")) continue;
|
|
1379
|
+
const source = await platformSourcePath(platform.name, "agents", name, resolver);
|
|
1380
|
+
if (source.overlay) addNote(`source overlay: platforms/${platform.name}/agents/${name}`);
|
|
1381
|
+
const raw = await fs2.readFile(source.src, "utf-8");
|
|
1382
|
+
const t = await buildAgentContent(platform, name, raw, resolver);
|
|
1383
|
+
if (!t) continue;
|
|
1384
|
+
if (!dryRun) {
|
|
1385
|
+
await fs2.writeFile(path2.join(platform.agentsDir, t.fileName), t.content, "utf-8");
|
|
1386
|
+
if (t.fileName !== name) {
|
|
1387
|
+
await fs2.rm(path2.join(platform.agentsDir, name), { force: true });
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
for (const n of t.notes) addNote(n);
|
|
1391
|
+
const finalRaw = dryRun ? t.content : await fs2.readFile(path2.join(platform.agentsDir, t.fileName), "utf-8");
|
|
1392
|
+
issues.push(...validateAgentFile(platform, t.fileName, finalRaw));
|
|
1393
|
+
agents++;
|
|
1394
|
+
}
|
|
1395
|
+
} else if (bundledAgents.length > 0) {
|
|
1396
|
+
skipped.push(
|
|
1397
|
+
`${target.name}: agents skipped - ${platform.agentsSkipNote ?? "platform has no file-based subagent"}`
|
|
1398
|
+
);
|
|
1399
|
+
}
|
|
1400
|
+
let commands = 0;
|
|
1401
|
+
const bundledCommands = await listBundledCommands(resolver);
|
|
1402
|
+
if (platform.commandsAsSkills && platform.skillsDir) {
|
|
1403
|
+
if (bundledCommands.length > 0) {
|
|
1404
|
+
if (!dryRun) await fs2.mkdir(platform.skillsDir, { recursive: true });
|
|
1405
|
+
addNote(`commands installed as skills into ${platform.skillsDir}`);
|
|
1406
|
+
}
|
|
1407
|
+
for (const name of bundledCommands) {
|
|
1408
|
+
const source = await platformSourcePath(platform.name, "commands", name, resolver);
|
|
1409
|
+
if (source.overlay) addNote(`source overlay: platforms/${platform.name}/commands/${name}`);
|
|
1410
|
+
const sourceRaw = await fs2.readFile(source.src, "utf-8");
|
|
1411
|
+
const t = await buildCommandSkill(platform, name, sourceRaw, resolver);
|
|
1412
|
+
if (!dryRun) {
|
|
1413
|
+
const dest = path2.join(platform.skillsDir, t.skillName);
|
|
1414
|
+
await fs2.rm(dest, { recursive: true, force: true });
|
|
1415
|
+
await fs2.mkdir(dest, { recursive: true });
|
|
1416
|
+
await fs2.writeFile(path2.join(dest, "SKILL.md"), t.content, "utf-8");
|
|
1417
|
+
if (t.openaiYaml !== null) {
|
|
1418
|
+
await fs2.mkdir(path2.join(dest, "agents"), { recursive: true });
|
|
1419
|
+
await fs2.writeFile(path2.join(dest, "agents", "openai.yaml"), t.openaiYaml, "utf-8");
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
for (const n of t.notes) addNote(n);
|
|
1423
|
+
const finalRaw = dryRun ? t.content : await fs2.readFile(path2.join(platform.skillsDir, t.skillName, "SKILL.md"), "utf-8");
|
|
1424
|
+
issues.push(...validateSkillMd(t.skillName, finalRaw, platform.skillDescriptionLimit));
|
|
1425
|
+
commands++;
|
|
1426
|
+
}
|
|
1427
|
+
} else if (platform.commandsDir && bundledCommands.length > 0) {
|
|
1428
|
+
if (!dryRun) await fs2.mkdir(platform.commandsDir, { recursive: true });
|
|
1429
|
+
for (const name of bundledCommands) {
|
|
1430
|
+
const source = await platformSourcePath(platform.name, "commands", name, resolver);
|
|
1431
|
+
if (source.overlay) addNote(`source overlay: platforms/${platform.name}/commands/${name}`);
|
|
1432
|
+
const sourceRaw = await fs2.readFile(source.src, "utf-8");
|
|
1433
|
+
const t = await buildCommandContent(platform, name, sourceRaw, resolver);
|
|
1434
|
+
if (!dryRun) {
|
|
1435
|
+
const dest = path2.join(platform.commandsDir, name);
|
|
1436
|
+
if (t.rawCopy) {
|
|
1437
|
+
await fs2.copyFile(source.src, dest);
|
|
1438
|
+
} else {
|
|
1439
|
+
await fs2.writeFile(dest, t.content, "utf-8");
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
for (const n of t.notes) addNote(n);
|
|
1443
|
+
const finalRaw = dryRun ? t.rawCopy ? sourceRaw : t.content : await fs2.readFile(path2.join(platform.commandsDir, name), "utf-8");
|
|
1444
|
+
issues.push(...validateCommandMd(platform, name, finalRaw));
|
|
1445
|
+
commands++;
|
|
1446
|
+
}
|
|
1447
|
+
} else if (bundledCommands.length > 0) {
|
|
1448
|
+
skipped.push(
|
|
1449
|
+
platform.commandsSkipNote ? `${target.name}: commands skipped - ${platform.commandsSkipNote}` : `${target.name}: commands skipped - platform has no slash-command directory`
|
|
1450
|
+
);
|
|
1451
|
+
}
|
|
1452
|
+
const notes = [...noteCounts.entries()].map(([note, n]) => n > 1 ? `${note} (${n} files)` : note);
|
|
1453
|
+
return { skills, agents, commands, skipped, notes, issues };
|
|
1454
|
+
}
|
|
1455
|
+
async function uninstallFrom(target) {
|
|
1456
|
+
const platform = target.platform;
|
|
1457
|
+
const result = { skills: 0, agents: 0, commands: 0, skipped: [], notes: [], issues: [] };
|
|
1458
|
+
const skills = await listBundledSkills();
|
|
1459
|
+
const agents = await listBundledAgents();
|
|
1460
|
+
const commands = await listBundledCommands();
|
|
1461
|
+
const skillDirs = [platform.skillsDir, ...platform.legacyDirs.map((l) => l.skillsDir)].filter(
|
|
1462
|
+
(d) => !!d
|
|
1463
|
+
);
|
|
1464
|
+
for (const name of skills) {
|
|
1465
|
+
let removed = false;
|
|
1466
|
+
for (const dir of skillDirs) {
|
|
1467
|
+
const p = path2.join(dir, name);
|
|
1468
|
+
if (await exists2(p)) {
|
|
1469
|
+
await fs2.rm(p, { recursive: true, force: true });
|
|
1470
|
+
removed = true;
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
if (removed) result.skills++;
|
|
1474
|
+
}
|
|
1475
|
+
const agentDirs = [platform.agentsDir, ...platform.legacyDirs.map((l) => l.agentsDir)].filter(
|
|
1476
|
+
(d) => !!d
|
|
1477
|
+
);
|
|
1478
|
+
for (const name of agents) {
|
|
1479
|
+
let removed = false;
|
|
1480
|
+
for (const dir of agentDirs) {
|
|
1481
|
+
for (const candidate of agentFileCandidates(platform, name)) {
|
|
1482
|
+
const p = path2.join(dir, candidate);
|
|
1483
|
+
if (await exists2(p)) {
|
|
1484
|
+
await fs2.rm(p, { recursive: true, force: true });
|
|
1485
|
+
removed = true;
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
if (removed) result.agents++;
|
|
1490
|
+
}
|
|
1491
|
+
const commandDirs = [platform.commandsDir, ...platform.legacyDirs.map((l) => l.commandsDir)].filter(
|
|
1492
|
+
(d) => !!d
|
|
1493
|
+
);
|
|
1494
|
+
for (const name of commands) {
|
|
1495
|
+
let removed = false;
|
|
1496
|
+
for (const dir of commandDirs) {
|
|
1497
|
+
const p = path2.join(dir, name);
|
|
1498
|
+
if (await exists2(p)) {
|
|
1499
|
+
await fs2.rm(p, { force: true });
|
|
1500
|
+
removed = true;
|
|
1501
|
+
}
|
|
1502
|
+
}
|
|
1503
|
+
if (platform.commandsAsSkills && platform.skillsDir) {
|
|
1504
|
+
const p = path2.join(platform.skillsDir, name.replace(/\.md$/, ""));
|
|
1505
|
+
if (await exists2(p)) {
|
|
1506
|
+
await fs2.rm(p, { recursive: true, force: true });
|
|
1507
|
+
removed = true;
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
if (removed) result.commands++;
|
|
1511
|
+
}
|
|
1512
|
+
return result;
|
|
1513
|
+
}
|
|
1514
|
+
var AGENT_NAME_ALIASES = {
|
|
1515
|
+
"claude code": "claude-code",
|
|
1516
|
+
"deveco code": "deveco"
|
|
1517
|
+
};
|
|
1518
|
+
function canonicalAgentName(name) {
|
|
1519
|
+
const n = name.trim().toLowerCase();
|
|
1520
|
+
return AGENT_NAME_ALIASES[n] ?? n;
|
|
1521
|
+
}
|
|
1522
|
+
function isVerboseEnv() {
|
|
1523
|
+
const v = process.env.HOMETRANS_PLUGIN_VERBOSE;
|
|
1524
|
+
return v !== void 0 && /^(1|true|yes)$/i.test(v.trim());
|
|
1525
|
+
}
|
|
1526
|
+
|
|
1527
|
+
// devecocli-plugin/index.ts
|
|
1528
|
+
var manifest = await loadManifest();
|
|
1529
|
+
function readPluginVersion() {
|
|
1530
|
+
try {
|
|
1531
|
+
const pkg = JSON.parse(
|
|
1532
|
+
readFileSync(new URL("./package.json", import.meta.url), "utf-8")
|
|
1533
|
+
);
|
|
1534
|
+
return pkg.version ?? manifest.version;
|
|
1535
|
+
} catch {
|
|
1536
|
+
return manifest.version;
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
function readSupportedAgents() {
|
|
1540
|
+
const agents = [
|
|
1541
|
+
...new Set(manifest.agent.map((a) => canonicalAgentName(a)))
|
|
1542
|
+
];
|
|
1543
|
+
if (agents.length === 0) {
|
|
1544
|
+
throw new PluginError('plugin.jsonc "agent" must list at least one agent');
|
|
1545
|
+
}
|
|
1546
|
+
return agents;
|
|
1547
|
+
}
|
|
1548
|
+
function toTarget(ctx) {
|
|
1549
|
+
const platform = resolvePlatforms().get(canonicalAgentName(ctx.agent));
|
|
1550
|
+
if (!platform) {
|
|
1551
|
+
throw new PluginError(`agent name ${ctx.agent} invalid`);
|
|
1552
|
+
}
|
|
1553
|
+
if (ctx.scope === "project") {
|
|
1554
|
+
if (!ctx.projectRoot) {
|
|
1555
|
+
throw new PluginError("projectRoot is required for project scope");
|
|
1556
|
+
}
|
|
1557
|
+
return {
|
|
1558
|
+
name: ctx.agent,
|
|
1559
|
+
explicit: true,
|
|
1560
|
+
platform: toProjectPlatform(platform, ctx.projectRoot, ctx.skillsDir)
|
|
1561
|
+
};
|
|
1562
|
+
}
|
|
1563
|
+
return { name: ctx.agent, explicit: true, platform };
|
|
1564
|
+
}
|
|
1565
|
+
var INSTALL_MARKER_SKILL = "a2h-app-migrate";
|
|
1566
|
+
var dirOf = (d) => d ?? "(none)";
|
|
1567
|
+
var contentResolver;
|
|
1568
|
+
function resolveContent() {
|
|
1569
|
+
contentResolver ??= createResolver(resolveInstallLanguage());
|
|
1570
|
+
return contentResolver;
|
|
1571
|
+
}
|
|
1572
|
+
async function isPluginInstalled(target) {
|
|
1573
|
+
const skillsDir = target.platform.skillsDir;
|
|
1574
|
+
if (!skillsDir) return false;
|
|
1575
|
+
return exists2(path3.join(skillsDir, INSTALL_MARKER_SKILL));
|
|
1576
|
+
}
|
|
1577
|
+
function logActionResult(ctx, target, r) {
|
|
1578
|
+
const errors = r.issues.filter((i) => i.level === "error");
|
|
1579
|
+
const warns = r.issues.filter((i) => i.level === "warn");
|
|
1580
|
+
if (!isVerboseEnv()) {
|
|
1581
|
+
for (const e of errors) ctx.log(` - validation ERROR: ${e.message}`);
|
|
1582
|
+
return;
|
|
1583
|
+
}
|
|
1584
|
+
const summary = `${r.skills} skills -> ${dirOf(target.platform.skillsDir)}, ${r.agents} agents -> ${dirOf(target.platform.agentsDir)}, ${r.commands} commands -> ${dirOf(commandsDirLabel(target.platform))}`;
|
|
1585
|
+
ctx.log(`${target.name}: ${summary}`);
|
|
1586
|
+
for (const s of r.skipped) ctx.log(` - skipped: ${s}`);
|
|
1587
|
+
for (const note of r.notes) ctx.log(` - transform: ${note}`);
|
|
1588
|
+
if (errors.length === 0 && warns.length === 0) {
|
|
1589
|
+
ctx.log(` - validation: PASS (${r.skills + r.agents + r.commands} files re-checked)`);
|
|
1590
|
+
} else {
|
|
1591
|
+
for (const e of errors) ctx.log(` - validation ERROR: ${e.message}`);
|
|
1592
|
+
for (const w of warns) ctx.log(` - validation WARN: ${w.message}`);
|
|
1593
|
+
}
|
|
1594
|
+
if (target.platform.skillSlashMetadata && r.skills > 0) {
|
|
1595
|
+
ctx.log(
|
|
1596
|
+
` - note: skills load by default; if your ${target.name} config restricts permission.skill, add an allow rule for "a2h-*"`
|
|
1597
|
+
);
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
var plugin = {
|
|
1601
|
+
name: manifest.name,
|
|
1602
|
+
version: readPluginVersion(),
|
|
1603
|
+
apiVersion: 1,
|
|
1604
|
+
supportedAgents: readSupportedAgents(),
|
|
1605
|
+
async install(ctx) {
|
|
1606
|
+
const target = toTarget(ctx);
|
|
1607
|
+
if (!await exists2(target.platform.markerDir)) {
|
|
1608
|
+
throw new PluginError(
|
|
1609
|
+
`${target.platform.markerDir} not found`
|
|
1610
|
+
);
|
|
1611
|
+
}
|
|
1612
|
+
if (await isPluginInstalled(target) && !ctx.force) {
|
|
1613
|
+
throw new PluginError(
|
|
1614
|
+
`plugin already installed; use --force to replace`
|
|
1615
|
+
);
|
|
1616
|
+
}
|
|
1617
|
+
const r = await installTo(target, { resolver: await resolveContent() });
|
|
1618
|
+
logActionResult(ctx, target, r);
|
|
1619
|
+
},
|
|
1620
|
+
async uninstall(ctx) {
|
|
1621
|
+
const target = toTarget(ctx);
|
|
1622
|
+
const r = await uninstallFrom(target);
|
|
1623
|
+
if (!isVerboseEnv()) return;
|
|
1624
|
+
if (r.skills + r.agents + r.commands === 0) {
|
|
1625
|
+
ctx.log(`${target.name}: nothing to uninstall`);
|
|
1626
|
+
} else {
|
|
1627
|
+
ctx.log(
|
|
1628
|
+
`${target.name}: uninstalled (${r.skills} skills, ${r.agents} agents, ${r.commands} commands removed)`
|
|
1629
|
+
);
|
|
1630
|
+
}
|
|
1631
|
+
},
|
|
1632
|
+
async update(ctx) {
|
|
1633
|
+
const target = toTarget(ctx);
|
|
1634
|
+
const resolver = await resolveContent();
|
|
1635
|
+
await uninstallFrom(target);
|
|
1636
|
+
const r = await installTo(target, { resolver });
|
|
1637
|
+
if (isVerboseEnv()) ctx.log(`${target.name}: updated ${ctx.from} -> ${ctx.to}`);
|
|
1638
|
+
logActionResult(ctx, target, r);
|
|
1639
|
+
}
|
|
1640
|
+
};
|
|
1641
|
+
export {
|
|
1642
|
+
plugin
|
|
1643
|
+
};
|