@buaa_smat/hometrans 26.0.0 → 26.0.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/package.json +11 -82
- package/skills/a2h-arch-generate/scripts/module_create/hap/src/main/ets/pages/Index.ets +2 -2
- package/skills/a2h-arch-generate/scripts/module_create/har/src/main/ets/components/MainPage.ets +2 -2
- package/skills/a2h-arch-generate/scripts/module_create/hsp/src/main/ets/pages/Index.ets +2 -2
- package/skills/a2h-batch-ui-align/references/conversion-procedure.md +1 -1
- package/skills/a2h-batch-ui-align/references/state-mgmt/_/350/214/203/345/274/217/351/200/211/346/213/251/350/257/264/346/230/216.md +1 -1
- package/skills/a2h-batch-ui-align/references/step3-capture.md +3 -3
- package/skills/a2h-batch-ui-align/references/step4-prepare.md +1 -1
- package/skills/a2h-batch-ui-align/scripts/detect_paradigm.mjs +11 -6
- package/skills/a2h-batch-ui-align/scripts/export_ui_info.mjs +59 -21
- package/skills/a2h-batch-ui-align/scripts/group_pack.mjs +3 -3
- package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +1 -1
- package/skills/a2h-batch-ui-align/scripts/static_check/core/scan.ts +1 -1
- package/skills/a2h-utg-explorer/SKILL.md +1 -1
- package/skills/a2h-utg-explorer/references/architecture.md +2 -2
- package/skills/a2h-utg-explorer/scripts/compile_tasks.mjs +36 -11
- package/skills/a2h-utg-explorer/scripts/device_health.mjs +91 -6
- package/skills/a2h-utg-explorer/scripts/final_utg.mjs +20 -2
- package/skills/a2h-utg-explorer/scripts/hint_check.mjs +64 -8
- package/skills/a2h-utg-explorer/scripts/hint_source.mjs +119 -0
- package/skills/a2h-utg-explorer/scripts/recover.mjs +7 -1
- package/skills/a2h-utg-explorer/scripts/recover_b.mjs +8 -1
- package/skills/a2h-utg-explorer/scripts/utg_explorer/adapters.mjs +89 -7
- package/skills/a2h-utg-explorer/scripts/utg_explorer/semantics.mjs +173 -4
- package/skills/a2h-utg-explorer/scripts/utg_explorer/task_runner.mjs +82 -14
- package/skills/a2h-utg-static/SKILL.md +1 -1
- package/skills/a2h-utg-static/references/view-interactions.md +1 -1
- package/skills/a2h-utg-static/scripts/assemble.mjs +6 -3
- package/skills/a2h-utg-static/scripts/compose_body_text.mjs +23 -5
- package/skills/a2h-utg-static/scripts/compose_overlay.mjs +29 -3
- package/skills/a2h-utg-static/scripts/compose_titles.mjs +10 -1
- package/skills/a2h-utg-static/scripts/label_resolve.mjs +51 -2
- package/skills/a2h-utg-static/scripts/static_prior.mjs +2 -1
- package/skills/a2h-utg-static/scripts/tests/_zipw.mjs +28 -0
- package/skills/a2h-utg-static/scripts/tests/probe_autoload.mjs +108 -0
- package/skills/a2h-utg-static/scripts/tests/probe_layout_fragments.mjs +90 -0
- package/skills/a2h-utg-static/scripts/tests/probe_unknown_scope.mjs +61 -0
- package/skills/a2h-utg-static/scripts/tests/regression_matrix.mjs +1261 -0
- package/skills/a2h-utg-static/scripts/tests/test_activity_alias_launcher.mjs +135 -0
- package/skills/a2h-utg-static/scripts/tests/test_activity_supertype_chain.mjs +106 -0
- package/skills/a2h-utg-static/scripts/tests/test_bottom_sheet_container.mjs +58 -0
- package/skills/a2h-utg-static/scripts/tests/test_branch_guard.mjs +19 -0
- package/skills/a2h-utg-static/scripts/tests/test_callee_string_default.mjs +30 -0
- package/skills/a2h-utg-static/scripts/tests/test_carry_answers.mjs +103 -0
- package/skills/a2h-utg-static/scripts/tests/test_chrome_tokens.mjs +60 -0
- package/skills/a2h-utg-static/scripts/tests/test_commented_out_trigger.mjs +111 -0
- package/skills/a2h-utg-static/scripts/tests/test_commit_scope.mjs +113 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_file_private_route.mjs +117 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_nested_graph.mjs +166 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_res_text.mjs +108 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_route_holder_collision.mjs +112 -0
- package/skills/a2h-utg-static/scripts/tests/test_compose_vm_nav.mjs +289 -0
- package/skills/a2h-utg-static/scripts/tests/test_custom_source_root.mjs +71 -0
- package/skills/a2h-utg-static/scripts/tests/test_defensive_null_guard.mjs +77 -0
- package/skills/a2h-utg-static/scripts/tests/test_dialog_orphan_entries.mjs +99 -0
- package/skills/a2h-utg-static/scripts/tests/test_dialog_page_owner.mjs +69 -0
- package/skills/a2h-utg-static/scripts/tests/test_dialogshow_builder_forms.mjs +96 -0
- package/skills/a2h-utg-static/scripts/tests/test_dialogshow_java_factory.mjs +37 -0
- package/skills/a2h-utg-static/scripts/tests/test_disabled_guard.mjs +42 -0
- package/skills/a2h-utg-static/scripts/tests/test_drawer_panel_gesture.mjs +140 -0
- package/skills/a2h-utg-static/scripts/tests/test_edge_dedupe_by_gesture.mjs +111 -0
- package/skills/a2h-utg-static/scripts/tests/test_edge_provenance_lint.mjs +70 -0
- package/skills/a2h-utg-static/scripts/tests/test_enclosing_gesture.mjs +69 -0
- package/skills/a2h-utg-static/scripts/tests/test_external_surface_roots.mjs +43 -0
- package/skills/a2h-utg-static/scripts/tests/test_find_package_indirect.mjs +67 -0
- package/skills/a2h-utg-static/scripts/tests/test_forwarding_wrapper.mjs +38 -0
- package/skills/a2h-utg-static/scripts/tests/test_fragment_containment.mjs +85 -0
- package/skills/a2h-utg-static/scripts/tests/test_fragment_helper_trigger.mjs +92 -0
- package/skills/a2h-utg-static/scripts/tests/test_fresh_branch_guard.mjs +49 -0
- package/skills/a2h-utg-static/scripts/tests/test_graph.mjs +55 -0
- package/skills/a2h-utg-static/scripts/tests/test_guard_clause.mjs +86 -0
- package/skills/a2h-utg-static/scripts/tests/test_hint_language.mjs +136 -0
- package/skills/a2h-utg-static/scripts/tests/test_host_kind_by_chain.mjs +68 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_bundle_attribution.mjs +74 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_bundled_pages.mjs +181 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_scope.mjs +293 -0
- package/skills/a2h-utg-static/scripts/tests/test_hybrid_title_renders.mjs +118 -0
- package/skills/a2h-utg-static/scripts/tests/test_i18n_term.mjs +155 -0
- package/skills/a2h-utg-static/scripts/tests/test_interaction_sites.mjs +272 -0
- package/skills/a2h-utg-static/scripts/tests/test_item_data_instance.mjs +51 -0
- package/skills/a2h-utg-static/scripts/tests/test_kotlin_fn_spans.mjs +69 -0
- package/skills/a2h-utg-static/scripts/tests/test_label_accessor_forms.mjs +187 -0
- package/skills/a2h-utg-static/scripts/tests/test_label_source.mjs +70 -0
- package/skills/a2h-utg-static/scripts/tests/test_launch_intent_guard.mjs +67 -0
- package/skills/a2h-utg-static/scripts/tests/test_layout_declared_fragment.mjs +103 -0
- package/skills/a2h-utg-static/scripts/tests/test_listener_call_forms.mjs +79 -0
- package/skills/a2h-utg-static/scripts/tests/test_listener_receiver_binding.mjs +47 -0
- package/skills/a2h-utg-static/scripts/tests/test_login_interceptor.mjs +328 -0
- package/skills/a2h-utg-static/scripts/tests/test_manifest_exported_default.mjs +40 -0
- package/skills/a2h-utg-static/scripts/tests/test_manifest_filters_modules.mjs +84 -0
- package/skills/a2h-utg-static/scripts/tests/test_manifest_srcfile.mjs +68 -0
- package/skills/a2h-utg-static/scripts/tests/test_mode_and_cb_param.mjs +172 -0
- package/skills/a2h-utg-static/scripts/tests/test_module_namespace.mjs +83 -0
- package/skills/a2h-utg-static/scripts/tests/test_module_strings.mjs +44 -0
- package/skills/a2h-utg-static/scripts/tests/test_multiple_entry_contracts.mjs +80 -0
- package/skills/a2h-utg-static/scripts/tests/test_nav_graph_xml.mjs +35 -0
- package/skills/a2h-utg-static/scripts/tests/test_nl_hint_grammar.mjs +42 -0
- package/skills/a2h-utg-static/scripts/tests/test_nl_hints_gate.mjs +85 -0
- package/skills/a2h-utg-static/scripts/tests/test_nl_hints_off_path.mjs +67 -0
- package/skills/a2h-utg-static/scripts/tests/test_node_id_collision.mjs +57 -0
- package/skills/a2h-utg-static/scripts/tests/test_non_gesture_step_flag.mjs +62 -0
- package/skills/a2h-utg-static/scripts/tests/test_out_of_scope_and_settings.mjs +72 -0
- package/skills/a2h-utg-static/scripts/tests/test_overload_and_climb.mjs +86 -0
- package/skills/a2h-utg-static/scripts/tests/test_pager_page_source.mjs +78 -0
- package/skills/a2h-utg-static/scripts/tests/test_pager_position_zero.mjs +65 -0
- package/skills/a2h-utg-static/scripts/tests/test_pager_variant_guard.mjs +172 -0
- package/skills/a2h-utg-static/scripts/tests/test_pipeline_llm_phases.mjs +107 -0
- package/skills/a2h-utg-static/scripts/tests/test_plain_dialog_nodes.mjs +167 -0
- package/skills/a2h-utg-static/scripts/tests/test_plaindialog_shared_anchor.mjs +117 -0
- package/skills/a2h-utg-static/scripts/tests/test_preference_click_nav.mjs +98 -0
- package/skills/a2h-utg-static/scripts/tests/test_preference_host_binding.mjs +87 -0
- package/skills/a2h-utg-static/scripts/tests/test_preference_nesting.mjs +183 -0
- package/skills/a2h-utg-static/scripts/tests/test_preference_widgets.mjs +48 -0
- package/skills/a2h-utg-static/scripts/tests/test_read_text_crlf.mjs +41 -0
- package/skills/a2h-utg-static/scripts/tests/test_resolver_tier_parity.mjs +126 -0
- package/skills/a2h-utg-static/scripts/tests/test_result_launcher.mjs +142 -0
- package/skills/a2h-utg-static/scripts/tests/test_review_fixes.mjs +135 -0
- package/skills/a2h-utg-static/scripts/tests/test_route_token_words.mjs +66 -0
- package/skills/a2h-utg-static/scripts/tests/test_same_name_decl_scope.mjs +236 -0
- package/skills/a2h-utg-static/scripts/tests/test_scope_utils.mjs +85 -0
- package/skills/a2h-utg-static/scripts/tests/test_sealed_dialog_state.mjs +148 -0
- package/skills/a2h-utg-static/scripts/tests/test_shared_overlay_split.mjs +63 -0
- package/skills/a2h-utg-static/scripts/tests/test_slug_parity.mjs +58 -0
- package/skills/a2h-utg-static/scripts/tests/test_starter_node_id.mjs +41 -0
- package/skills/a2h-utg-static/scripts/tests/test_state_guard_arity.mjs +109 -0
- package/skills/a2h-utg-static/scripts/tests/test_state_guard_commented_candidates.mjs +68 -0
- package/skills/a2h-utg-static/scripts/tests/test_state_guard_model_gates.mjs +127 -0
- package/skills/a2h-utg-static/scripts/tests/test_state_specific_hop.mjs +130 -0
- package/skills/a2h-utg-static/scripts/tests/test_synthetic_label_identity.mjs +51 -0
- package/skills/a2h-utg-static/scripts/tests/test_template_method_layout.mjs +81 -0
- package/skills/a2h-utg-static/scripts/tests/test_template_title.mjs +61 -0
- package/skills/a2h-utg-static/scripts/tests/test_trigger_id_spelling.mjs +68 -0
- package/skills/a2h-utg-static/scripts/tests/test_ui_elements_action_override.mjs +91 -0
- package/skills/a2h-utg-static/scripts/tests/test_ui_elements_flow_filter.mjs +110 -0
- package/skills/a2h-utg-static/scripts/tests/test_ui_elements_nl_hint_key.mjs +89 -0
- package/skills/a2h-utg-static/scripts/tests/test_uiless_host_fold.mjs +98 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_data_table.mjs +340 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_relative_url.mjs +125 -0
- package/skills/a2h-utg-static/scripts/tests/test_uniapp_source.mjs +231 -0
- package/skills/a2h-utg-static/scripts/tests/test_view_click_refs.mjs +104 -0
- package/skills/a2h-utg-static/scripts/tests/test_view_id_label.mjs +69 -0
- package/skills/a2h-utg-static/scripts/tests/test_view_interactions.mjs +346 -0
- package/skills/a2h-utg-static/scripts/tests/test_viewpage_nav.mjs +340 -0
- package/skills/a2h-utg-static/scripts/tests/test_vm_nav_helper_navigate.mjs +98 -0
- package/skills/a2h-utg-static/scripts/tests/test_widget_class_scope.mjs +92 -0
- package/skills/a2h-utg-static/scripts/tests/test_window_nav_kotlin.mjs +158 -0
- package/skills/a2h-utg-static/scripts/tests/test_worklist_parts.mjs +65 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buaa_smat/hometrans",
|
|
3
|
-
"version": "26.0.
|
|
3
|
+
"version": "26.0.1",
|
|
4
4
|
"description": "HomeTrans (Android-to-HarmonyOS) skill + agent installer. Run `ht init` to distribute conversion skills and subagents into AI editors.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -134,6 +134,7 @@
|
|
|
134
134
|
"skills/a2h-utg-explorer/scripts/evidence.mjs",
|
|
135
135
|
"skills/a2h-utg-explorer/scripts/final_utg.mjs",
|
|
136
136
|
"skills/a2h-utg-explorer/scripts/hint_check.mjs",
|
|
137
|
+
"skills/a2h-utg-explorer/scripts/hint_source.mjs",
|
|
137
138
|
"skills/a2h-utg-explorer/scripts/i18n-term.d.mts",
|
|
138
139
|
"skills/a2h-utg-explorer/scripts/i18n-term.mjs",
|
|
139
140
|
"skills/a2h-utg-explorer/scripts/panel_routes.mjs",
|
|
@@ -150,77 +151,7 @@
|
|
|
150
151
|
"skills/a2h-utg-explorer/scripts/variant.mjs",
|
|
151
152
|
"skills/a2h-utg-explorer/scripts/worklist_parts.mjs",
|
|
152
153
|
"skills/a2h-utg-explorer/SKILL.md",
|
|
153
|
-
"skills/a2h-utg-static
|
|
154
|
-
"skills/a2h-utg-static/references",
|
|
155
|
-
"skills/a2h-utg-static/scripts/activity_nav.mjs",
|
|
156
|
-
"skills/a2h-utg-static/scripts/activity_widgets.mjs",
|
|
157
|
-
"skills/a2h-utg-static/scripts/adapter_nav.mjs",
|
|
158
|
-
"skills/a2h-utg-static/scripts/androidfragment_nav.mjs",
|
|
159
|
-
"skills/a2h-utg-static/scripts/assemble.mjs",
|
|
160
|
-
"skills/a2h-utg-static/scripts/audit.mjs",
|
|
161
|
-
"skills/a2h-utg-static/scripts/carry_answers.mjs",
|
|
162
|
-
"skills/a2h-utg-static/scripts/click_paths.mjs",
|
|
163
|
-
"skills/a2h-utg-static/scripts/compose_body_text.mjs",
|
|
164
|
-
"skills/a2h-utg-static/scripts/compose_merge.mjs",
|
|
165
|
-
"skills/a2h-utg-static/scripts/compose_nav.mjs",
|
|
166
|
-
"skills/a2h-utg-static/scripts/compose_navbar_nav.mjs",
|
|
167
|
-
"skills/a2h-utg-static/scripts/compose_overlay.mjs",
|
|
168
|
-
"skills/a2h-utg-static/scripts/compose_titles.mjs",
|
|
169
|
-
"skills/a2h-utg-static/scripts/compose_widgets.mjs",
|
|
170
|
-
"skills/a2h-utg-static/scripts/dialogshow_nav.mjs",
|
|
171
|
-
"skills/a2h-utg-static/scripts/dialog_listener_nav.mjs",
|
|
172
|
-
"skills/a2h-utg-static/scripts/fragfactory_nav.mjs",
|
|
173
|
-
"skills/a2h-utg-static/scripts/fragment_nav.mjs",
|
|
174
|
-
"skills/a2h-utg-static/scripts/guard_subjects.mjs",
|
|
175
|
-
"skills/a2h-utg-static/scripts/hg_query.mjs",
|
|
176
|
-
"skills/a2h-utg-static/scripts/host_resolve.mjs",
|
|
177
|
-
"skills/a2h-utg-static/scripts/hybrid_bundle.mjs",
|
|
178
|
-
"skills/a2h-utg-static/scripts/hybrid_pages.mjs",
|
|
179
|
-
"skills/a2h-utg-static/scripts/hybrid_scope.mjs",
|
|
180
|
-
"skills/a2h-utg-static/scripts/i18n-term.d.mts",
|
|
181
|
-
"skills/a2h-utg-static/scripts/i18n-term.mjs",
|
|
182
|
-
"skills/a2h-utg-static/scripts/interaction_sites.mjs",
|
|
183
|
-
"skills/a2h-utg-static/scripts/io_utils.mjs",
|
|
184
|
-
"skills/a2h-utg-static/scripts/label_resolve.mjs",
|
|
185
|
-
"skills/a2h-utg-static/scripts/launch_extras.mjs",
|
|
186
|
-
"skills/a2h-utg-static/scripts/layout_resolve.mjs",
|
|
187
|
-
"skills/a2h-utg-static/scripts/manifest.mjs",
|
|
188
|
-
"skills/a2h-utg-static/scripts/measure",
|
|
189
|
-
"skills/a2h-utg-static/scripts/media_browse_nav.mjs",
|
|
190
|
-
"skills/a2h-utg-static/scripts/menu_nav.mjs",
|
|
191
|
-
"skills/a2h-utg-static/scripts/navactions_nav.mjs",
|
|
192
|
-
"skills/a2h-utg-static/scripts/nl_hints.mjs",
|
|
193
|
-
"skills/a2h-utg-static/scripts/orphan_overlay_nav.mjs",
|
|
194
|
-
"skills/a2h-utg-static/scripts/phase_plan.mjs",
|
|
195
|
-
"skills/a2h-utg-static/scripts/phase_planner.mjs",
|
|
196
|
-
"skills/a2h-utg-static/scripts/plaindialog_nav.mjs",
|
|
197
|
-
"skills/a2h-utg-static/scripts/preference_nav.mjs",
|
|
198
|
-
"skills/a2h-utg-static/scripts/preference_widgets.mjs",
|
|
199
|
-
"skills/a2h-utg-static/scripts/presenter_nav.mjs",
|
|
200
|
-
"skills/a2h-utg-static/scripts/registry_nav.mjs",
|
|
201
|
-
"skills/a2h-utg-static/scripts/route_interceptor.mjs",
|
|
202
|
-
"skills/a2h-utg-static/scripts/run_pipeline.mjs",
|
|
203
|
-
"skills/a2h-utg-static/scripts/scope_utils.mjs",
|
|
204
|
-
"skills/a2h-utg-static/scripts/screen_merge.mjs",
|
|
205
|
-
"skills/a2h-utg-static/scripts/screen_nav.mjs",
|
|
206
|
-
"skills/a2h-utg-static/scripts/single_host_nav.mjs",
|
|
207
|
-
"skills/a2h-utg-static/scripts/starter_nav.mjs",
|
|
208
|
-
"skills/a2h-utg-static/scripts/state_guard.mjs",
|
|
209
|
-
"skills/a2h-utg-static/scripts/static_prior.mjs",
|
|
210
|
-
"skills/a2h-utg-static/scripts/uniapp_nav.mjs",
|
|
211
|
-
"skills/a2h-utg-static/scripts/uniapp_widgets.mjs",
|
|
212
|
-
"skills/a2h-utg-static/scripts/utg_html.mjs",
|
|
213
|
-
"skills/a2h-utg-static/scripts/viewpage_nav.mjs",
|
|
214
|
-
"skills/a2h-utg-static/scripts/view_interactions.mjs",
|
|
215
|
-
"skills/a2h-utg-static/scripts/view_widgets.mjs",
|
|
216
|
-
"skills/a2h-utg-static/scripts/vm_nav.mjs",
|
|
217
|
-
"skills/a2h-utg-static/scripts/window_nav.mjs",
|
|
218
|
-
"skills/a2h-utg-static/scripts/worklist_parts.mjs",
|
|
219
|
-
"skills/a2h-utg-static/scripts/_graph.mjs",
|
|
220
|
-
"skills/a2h-utg-static/scripts/_py.mjs",
|
|
221
|
-
"skills/a2h-utg-static/scripts/_spawn.mjs",
|
|
222
|
-
"skills/a2h-utg-static/SKILL.md",
|
|
223
|
-
"skills/a2h-utg-static/tools",
|
|
154
|
+
"skills/a2h-utg-static",
|
|
224
155
|
"agents",
|
|
225
156
|
"commands",
|
|
226
157
|
"resource",
|
|
@@ -229,20 +160,19 @@
|
|
|
229
160
|
],
|
|
230
161
|
"exclusion": {
|
|
231
162
|
"main": [
|
|
232
|
-
"index.js",
|
|
233
163
|
"plugin.jsonc",
|
|
234
164
|
"devecocli-plugin",
|
|
235
165
|
"skills/a2h-app-migrate/test",
|
|
236
|
-
"skills/a2h-arch-generate/scripts/tests",
|
|
237
166
|
"skills/a2h-arkts-logic-coder/test",
|
|
238
|
-
"skills/a2h-batch-ui-align/scripts/tests",
|
|
239
167
|
"skills/a2h-dashboard-render/test",
|
|
240
168
|
"skills/a2h-module-semantic-docs/test",
|
|
241
|
-
"skills/a2h-resource-convert/scripts/tests",
|
|
242
169
|
"skills/a2h-spec-generate/test",
|
|
243
170
|
"skills/a2h-spec-generate/scripts/reqgen/test",
|
|
171
|
+
"skills/a2h-arch-generate/scripts/tests",
|
|
172
|
+
"skills/a2h-resource-convert/scripts/tests",
|
|
173
|
+
"skills/a2h-batch-ui-align/scripts/tests",
|
|
244
174
|
"skills/a2h-utg-explorer/scripts/tests",
|
|
245
|
-
"
|
|
175
|
+
"index.js"
|
|
246
176
|
],
|
|
247
177
|
"deveco-cli": [
|
|
248
178
|
"dist",
|
|
@@ -251,16 +181,15 @@
|
|
|
251
181
|
"README.md",
|
|
252
182
|
"bin",
|
|
253
183
|
"skills/a2h-app-migrate/test",
|
|
254
|
-
"skills/a2h-arch-generate/scripts/tests",
|
|
255
184
|
"skills/a2h-arkts-logic-coder/test",
|
|
256
|
-
"skills/a2h-batch-ui-align/scripts/tests",
|
|
257
185
|
"skills/a2h-dashboard-render/test",
|
|
258
186
|
"skills/a2h-module-semantic-docs/test",
|
|
259
|
-
"skills/a2h-resource-convert/scripts/tests",
|
|
260
187
|
"skills/a2h-spec-generate/test",
|
|
261
188
|
"skills/a2h-spec-generate/scripts/reqgen/test",
|
|
262
|
-
"skills/a2h-
|
|
263
|
-
"skills/a2h-
|
|
189
|
+
"skills/a2h-arch-generate/scripts/tests",
|
|
190
|
+
"skills/a2h-resource-convert/scripts/tests",
|
|
191
|
+
"skills/a2h-batch-ui-align/scripts/tests",
|
|
192
|
+
"skills/a2h-utg-explorer/scripts/tests"
|
|
264
193
|
]
|
|
265
194
|
},
|
|
266
195
|
"scripts": {
|
|
@@ -135,7 +135,7 @@ key 的前缀即范式:V2 分支只读 `v2-*`,V1 分支只读 `v1-*`;`mix-
|
|
|
135
135
|
|
|
136
136
|
读 `REFERENCE_VIEW_TREES`,建立结构化理解:根布局、toolbar、content、bottom nav、各 widget 的 class/resource-id/text/content-desc/bounds/clickable/scrollable/checkable/checked/enabled、由 bounds 推断父子+兄弟关系、识别复用模式(list item / card)。
|
|
137
137
|
|
|
138
|
-
若存在 `view_scroll_n.xml`(n=1,2,...):表示 Android UI 太长需滚动捕获,按编号 1→n 依次读取,**以 `view.xml` 为根**合并所有 `view_scroll_n.xml` 得到合并结构。全量模式下这些帧来自 explorer 的整页滚动采集,`meta.json.scroll_completeness` 标明证据覆盖到哪里:`complete` 表示已证明滚到底;其他值(`truncated`/`aborted`/`no-container`/`not-swept` 等)表示末帧之后仍有未采集的内容,必须以静态布局补全,并在报告中注明。`
|
|
138
|
+
若存在 `view_scroll_n.xml`(n=1,2,...):表示 Android UI 太长需滚动捕获,按编号 1→n 依次读取,**以 `view.xml` 为根**合并所有 `view_scroll_n.xml` 得到合并结构。全量模式下这些帧来自 explorer 的整页滚动采集,`meta.json.scroll_completeness` 标明证据覆盖到哪里:`complete` 表示已证明滚到底;其他值(`truncated`/`aborted`/`no-container`/`not-swept` 等)表示末帧之后仍有未采集的内容,必须以静态布局补全,并在报告中注明。`view_loaded.xml`(仅当 `view.xml` 是数据未到达或 FLAG_SECURE 的滚动起点时才有)是同一状态加载完成后的一次采集,不属于滚动序列,不得按滚动合并;取页面数据时以它为准。
|
|
139
139
|
|
|
140
140
|
**加载前截到的帧不代表页面外观**:`meta.json.content_loading` 存在时,`views[]` 列出的视图是在数据回来之前截到的,里面的文字是布局 `android:text` 的默认值(如 `Feels like %1$s`、`%1$d km/h`、占位城市名),并不是页面实际显示的内容。`texts` 给出了检出的未格式化占位符。页面外观(文字、数值、图标、列表行数)以 `loaded_views[]` 里的帧为准;`primary: true` 表示 `view.xml` / `screenshot.png` 本身就是加载前的帧。`loaded_views` 为空时,数据态从源码的绑定代码(`setText(getString(id, args))`、adapter)推出,并在报告里注明"采集仅有加载前帧"。这些占位串**不得**写进 ArkTS 的显示文本或默认值,ViewModel 也**不得**以"截图显示默认值"为由跳过数据绑定。布局几何不受影响,加载前帧的 bounds 可以照常使用。
|
|
141
141
|
|
|
@@ -23,6 +23,6 @@ node <skill>/scripts/detect_paradigm.mjs <harmony_project_dir>
|
|
|
23
23
|
|
|
24
24
|
**`@Component` / `@ComponentV2` 不计票**(只在输出的 `components` 里报告):不带状态的纯展示组件(如 `@Component struct Divider2 { build() { Divider() } }`)说明不了工程用哪套状态管理。若计票,0→1 工程里只要前序步骤生成过一个公共展示组件,就又会被判成 V1。
|
|
25
25
|
|
|
26
|
-
**脚手架模板不参与判定**:DevEco 新建工程自带的 `pages/Index.ets`(`struct Index` 的 Hello World 页:`@Entry` + `@Component` + 唯一的 `@State message`,或 V2 模板的 `@ComponentV2` + `@Local message
|
|
26
|
+
**脚手架模板不参与判定**:DevEco 新建工程自带的 `pages/Index.ets`(`struct Index` 的 Hello World 页:`@Entry` + `@Component` + 唯一的 `@State message`,或 V2 模板的 `@ComponentV2` + `@Local message`),以及 a2h-arch-generate 为每个 HAR 模块生成的 `components/MainPage.ets`(`struct MainPage`,无 `@Entry`,同样只有唯一的 `message` 状态)不是业务代码,不能作为“既有 V1 工程”的证据。实测(where-to-study):app-migrate 预检刚建好的空工程只有这份模板,被按“出现 `@Component` + `@State`”判成 V1,整个 0→1 迁移都写成了 V1。模板页一旦被改过(多了别的状态或装饰器),就按业务代码计数。
|
|
27
27
|
|
|
28
28
|
判定结果只决定选哪套装饰器,**不决定读哪个目录**:两个分支都读同目录的 `_装饰器速查.md`(V1 用它的第四节对照表),官方完整文档一律经 `scripts/state_doc.mjs read <key>` 读取,key 带范式前缀(`v1-*` / `v2-*` / `mix-*`),脚本保证 `v1-*` 只返回 V1 页、`v2-*` 只返回 V2 页。
|
|
@@ -43,7 +43,7 @@ Each prompt tells the reviewer to:
|
|
|
43
43
|
- answer every item, using `unresolved` / `abstain` when uncertain;
|
|
44
44
|
- write `{"items": [...]}` to the answers path;
|
|
45
45
|
- finish by running `node -e "JSON.parse(require('fs').readFileSync(process.argv[1],'utf8'))" <answers path>` and quote its success;
|
|
46
|
-
- **`nl_hints` and `view_interactions` parts:** also run `node <a2h-utg-explorer skill>/scripts/hint_check.mjs <answers path>`, rewrite every hint (or transition `instruction`) it prints until it reports `bad=0`, and quote that line. A hint it rejects compiles to `needs_external` in Step 3.2, so that page is never captured. Put the rules it prints into the prompt;
|
|
46
|
+
- **`nl_hints` and `view_interactions` parts:** also run `node <a2h-utg-explorer skill>/scripts/hint_check.mjs --project <Android source root> <answers path>`, rewrite every hint (or transition `instruction`) it prints until it reports `bad=0`, and quote that line. A hint it rejects compiles to `needs_external` in Step 3.2, so that page is never captured. Put the rules it prints into the prompt;
|
|
47
47
|
- never run `apply` or `--resume`.
|
|
48
48
|
|
|
49
49
|
Re-dispatch any part with no answers file when its agent ends. Then:
|
|
@@ -59,7 +59,7 @@ A refused merge names the stage and missing keys; re-dispatch only those parts.
|
|
|
59
59
|
**Reviewer waves (Steps 3.1 and 3.2).** Do not dispatch reviewers as a blocking wave. A blocking wave returns only when its slowest member returns, so one hung agent stalls the whole run: a single reviewer whose connection drops can hold its wave for hours after the others have finished. Instead (Step 0.1):
|
|
60
60
|
- write each part's prompt to `${harmony_project_dir}/.hometrans/work/prompts/<stage>_part<N>.md` and dispatch one **background sub-agent** per part, all in one message: "Read `<that file>` and follow it fully; reply `DONE <stage>_part<N>`." Record each one as you dispatch it with `node ./scripts/group_queue.mjs review-bind ${harmony_project_dir} --name <stage>_part<N> --answers <abs answers path> --task <handle>`. This writes `.hometrans/work/reviewers.json`, which the queue counts against `--max-agents`. Use `--kind skill-agent` for an agent that is not a reviewer, such as the Step 2 resource agent; it does not count. A binding stops counting by itself once its part is consumed (the explorer merged or re-split the parts); a reviewer that ended without its answers is released with `group_queue.mjs review-unbind ${harmony_project_dir} --name <part>`. Never hand-edit that file, and never re-bind a finished reviewer as `skill-agent` to free its slot;
|
|
61
61
|
- the answers file is the completion signal, never the agent: a part is done when `node ./scripts/answers_check.mjs <answers path>` reports `complete` (it parses and covers every key of the sibling `*_worklist.part<N>.json`); a reviewer whose answers are complete can stay "running" for hours;
|
|
62
|
-
- an `nl_hints` or `view_interactions` part is done only when, in addition, `node <a2h-utg-explorer skill>/scripts/hint_check.mjs <answers path>` exits 0 (`bad=0`). Its reviewer writes every key first and then rewrites hints in place, so `complete` alone means it may still be fixing them. While `bad>0`, keep the part in the `wait` loop; do not merge, apply or stop it. If its agent ends with `bad>0`, resume it in its own session with the lines `hint_check` prints;
|
|
62
|
+
- an `nl_hints` or `view_interactions` part is done only when, in addition, `node <a2h-utg-explorer skill>/scripts/hint_check.mjs --project <Android source root> <answers path>` exits 0 (`bad=0`). Its reviewer writes every key first and then rewrites hints in place, so `complete` alone means it may still be fixing them. While `bad>0`, keep the part in the `wait` loop; do not merge, apply or stop it. If its agent ends with `bad>0`, resume it in its own session with the lines `hint_check` prints;
|
|
63
63
|
- loop on `node ./scripts/group_queue.mjs wait ${harmony_project_dir}` (plus `--job run_cycle` in Step 3.2 while it runs). It follows every reviewer bound with `review-bind` that is not done or consumed, so no `--answers` is needed for them; pass `--answers <path>` (once per path) only for an answers file you did not bind. A job exit is reported once: a later `wait --job run_cycle` does not return again for the same exit, only after a restart ends. It returns when one becomes complete (`answers_complete`), has been silent for the stall limit (`answers_silent`; counted from the file's last write, or from its bind when it has never been written; `stall_limit_min` in the output, at least 20 min and scaled up with load), or after 9 min. Give the shell call a timeout above that;
|
|
64
64
|
- on each return: a silent part, or one whose agent ended without a complete file, is resumed in its own session with its task id (Step 0.1 item 4), and re-bound at once with the same `review-bind` line, which restarts its silence clock. `answers_silent` means only "no write for the limit"; a reviewer of a few items often writes them all at the end. A resume the host answers with "sent to the running background task" was queued behind a run still in progress: that agent is alive. A resume "also goes silent" only when, after the re-bind, `wait` reports the part silent again or its agent ends without a complete file; only then answer the remaining items `unresolved` yourself. Never answer for a part whose agent is still running: it may still write correct answers after your guesses have been merged;
|
|
65
65
|
- in Step 3.2, do the "Convert while exploring" checks between `wait` returns, too.
|
|
@@ -169,7 +169,7 @@ The parent drives the `a2h-utg-explorer` skill's `run_cycle.mjs`; reviewers are
|
|
|
169
169
|
**Export layout** (`export_ui_info.mjs`):
|
|
170
170
|
- **Per page.** One `page_NNNN_<Name>/` per *verified* static node and screen state, with `screenshot.png`, `view.xml`, `meta.json`.
|
|
171
171
|
- Scroll frames are `screenshot_scroll_N.png` / `view_scroll_N.xml`, with `scroll_index` = swipes from the top. Phase 4.2 merges them as a sequence.
|
|
172
|
-
-
|
|
172
|
+
- Other captures of the same state (re-visits, retries, non-sweep swipes) are **not exported**. Their observation ids are in `meta.source.unexported_viewport_ids` (artifacts under `<campaign>/artifacts/<id>/`). There are no `*_vpN` files. The primary is a loaded, unblocked capture when the state has one; only when a sweep origin (which must stay `view.xml`) is still loading or FLAG_SECURE is one loaded capture of the same state exported as `view_loaded.xml` / `screenshot_loaded.png`, listed last.
|
|
173
173
|
- **Top level.** Also writes `pages.json` (click-path order), `deferred_human.json` and `export_manifest.json`.
|
|
174
174
|
- **Not exported as pages.** Unmapped `dynamic:*` observations and container kinds (`host-activity`, …) appear only in the manifest. Captures whose view tree belongs to another package are listed under `foreign_tree_captures`.
|
|
175
175
|
- **`meta.scroll_completeness`.** `complete` means the page end was proven. `truncated`, `aborted`, `unreached`, `no-container` and `not-swept` mean the frames stop short, and the rest comes from the Android layout source. `meta.scroll.unswept_containers` lists nested vertical scrollers that were not swept.
|
|
@@ -19,7 +19,7 @@ For every snapshot directory:
|
|
|
19
19
|
2. Resolve `screenshot`, `screenshots`, `view_xml`, `view_xmls` relative to `ui_info_root` (absolute paths as-is).
|
|
20
20
|
3. **Read each resolved file by its exact path.** Glob is only for discovering directories; an empty Glob result never proves a declared path missing.
|
|
21
21
|
4. If a declared path cannot be read, mark the page `failed` with that exact path. Never tell a sub-agent a screenshot/view tree is absent unless this exact-path read failed.
|
|
22
|
-
5. Keep `reference_screenshots[page_id]` and `reference_view_trees[page_id]` (absolute paths): **every** entry of `screenshots` / `view_xmls`, not only `screenshot` / `view_xml`. Each
|
|
22
|
+
5. Keep `reference_screenshots[page_id]` and `reference_view_trees[page_id]` (absolute paths): **every** entry of `screenshots` / `view_xmls`, not only `screenshot` / `view_xml`. Each scroll frame (`_scroll_N`) is the same state at another offset, and can show controls the first frame does not.
|
|
23
23
|
6. `screenshots_blocked[]` (FLAG_SECURE window; `screenshot` may be `null`) is not a failure. Keep the view trees, record the blocked views, and tell the sub-agent that those views have no screenshot because the app forbids screen capture. Geometry comes from the view tree's bounds; colours come from source/theme, labelled as such, never sampled from a black frame. When **every** frame of a page is blocked, `conversion_set.json` marks the page `pixels: "blocked"` (summary `pages_tree_only`). Its group pack heads that state with a **tree-only** banner and a container-geometry table in dp: insets from the parent, plus `full` for containers that span the column. The agent takes widths from that table and does not re-derive them from raw `bounds`. Re-deriving them tends to take the cards' inner text edge as the content edge, so every card shrinks to its content. Nothing downstream can compare a tree-only page with pixels. Step 7 therefore lists tree-only pages under 待人工复核, and their GATE `card-width-wraps` hits cannot be waived without a `WRAP-WIDTH` source citation.
|
|
24
24
|
7. `content_loading` (the export found views captured before the page's data arrived: unformatted `%1$s`-style text) is not a failure either. Keep every frame. Tell the sub-agent which views are pre-data (`views[]`) and which carry the data (`loaded_views[]`), and that the page's look comes from the loaded ones (conversion-procedure.md §4.1「加载前截到的帧」). A page with `primary: true` and no `loaded_views` is listed under 待人工复核 in Step 7: no capture shows its data.
|
|
25
25
|
|
|
@@ -153,16 +153,21 @@ export function stripCommentsAndStrings(src) {
|
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
/**
|
|
156
|
-
* A DevEco
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
156
|
+
* A DevEco module-template page: Hello World text, a single `message` state and no
|
|
157
|
+
* decorators beyond @Entry + one component decorator + that one state decorator. Two
|
|
158
|
+
* struct names qualify:
|
|
159
|
+
* - `struct Index` — the HAP / HSP "Empty Ability" page (`pages/Index.ets`);
|
|
160
|
+
* - `struct MainPage` — the HAR library template (`components/MainPage.ets`, no @Entry).
|
|
161
|
+
* a2h-arch-generate scaffolds one per HAR module, so a 9-HAR 0→1 project used to
|
|
162
|
+
* carry 9 `@State message` votes and was judged V1.
|
|
163
|
+
* Both the V1 template (@Component/@State) and the V2 template (@ComponentV2/@Local)
|
|
164
|
+
* qualify. A business page that happens to show Hello World under another struct name
|
|
165
|
+
* is not scaffold.
|
|
161
166
|
*/
|
|
162
167
|
export function isScaffoldPage(src) {
|
|
163
168
|
if (!/['"]Hello World['"]/.test(src)) return false;
|
|
164
169
|
const code = stripCommentsAndStrings(src);
|
|
165
|
-
if (!/\bstruct\s+Index\b/.test(code)) return false;
|
|
170
|
+
if (!/\bstruct\s+(?:Index|MainPage)\b/.test(code)) return false;
|
|
166
171
|
const names = [...code.matchAll(ANY_DECORATOR_RE)].map((m) => m[1]);
|
|
167
172
|
const allowedV1 = new Set(['Entry', 'Component', 'State']);
|
|
168
173
|
const allowedV2 = new Set(['Entry', 'ComponentV2', 'Local']);
|
|
@@ -12,8 +12,7 @@
|
|
|
12
12
|
* <campaign>/artifacts/<obs>/{screen.png,layout.xml,observation.json},
|
|
13
13
|
* <static_ws>/click_paths.json.
|
|
14
14
|
* Output: <out>/page_NNNN_<Name>/{screenshot.png, view.xml, meta.json
|
|
15
|
-
* [, screenshot_scroll_N.png, view_scroll_N.xml]
|
|
16
|
-
* [, screenshot_vpN.png, view_vpN.xml]}
|
|
15
|
+
* [, screenshot_scroll_N.png, view_scroll_N.xml]}
|
|
17
16
|
* <out>/pages.json — pages in click-path order (parent before child)
|
|
18
17
|
* <out>/deferred_human.json — blocked phases, for Step 7's manual TODOs
|
|
19
18
|
* <out>/export_manifest.json — what was exported, skipped, and why
|
|
@@ -34,8 +33,20 @@
|
|
|
34
33
|
* of page) as `view.xml`, and `meta.scroll_completeness` carries the outcome:
|
|
35
34
|
* `complete` means the end was proven; anything else (`truncated`, `aborted`,
|
|
36
35
|
* `unreached`, `no-container`, `not-swept`) means Phase 4.2 must take the rest
|
|
37
|
-
* of the page from the Android layout source.
|
|
38
|
-
*
|
|
36
|
+
* of the page from the Android layout source.
|
|
37
|
+
*
|
|
38
|
+
* Other captures of the same state (re-visits, retries, swipes that are not sweep frames)
|
|
39
|
+
* are NOT exported: one state = `view.xml` + the sweep frames. They used to be exported as
|
|
40
|
+
* `*_vpN` (up to 4). Measured (ydweather1107): every vpN was a byte-identical copy of a
|
|
41
|
+
* sweep frame, a mid-scroll offset the sweep already covered, or a view tree taken
|
|
42
|
+
* mid-transition whose screenshot was another moment's (a Loading spinner tree paired with
|
|
43
|
+
* the loaded page) — no new control, extra image reads, and a converter that spent its
|
|
44
|
+
* reasoning on an "inconsistent pair". Their observation ids stay in
|
|
45
|
+
* `meta.source.unexported_viewport_ids` (artifacts under <campaign>/artifacts/<id>/).
|
|
46
|
+
* The primary is chosen to be usable: a loaded, unblocked capture first. A sweep state must keep
|
|
47
|
+
* its origin as `view.xml` (the frames continue it); when that origin is still loading or
|
|
48
|
+
* FLAG_SECURE and the state has a loaded, unblocked capture, that one alone is exported too, as
|
|
49
|
+
* `view_loaded.xml` / `screenshot_loaded.png` (listed last, in `content_loading.loaded_views`).
|
|
39
50
|
*/
|
|
40
51
|
|
|
41
52
|
import * as fs from 'node:fs';
|
|
@@ -1160,6 +1171,18 @@ export function loadedFirst(viewports, pkg = null) {
|
|
|
1160
1171
|
return k < 0 ? viewports : [viewports[k], ...viewports.filter((_, i) => i !== k)];
|
|
1161
1172
|
}
|
|
1162
1173
|
|
|
1174
|
+
/**
|
|
1175
|
+
* The state's viewports with an unblocked one first when the first is FLAG_SECURE (a black PNG
|
|
1176
|
+
* would leave the page tree-only), keeping a loaded one ahead of a loading one.
|
|
1177
|
+
*/
|
|
1178
|
+
export function usableFirst(viewports, campaign, pkg = null) {
|
|
1179
|
+
if (!viewports.length || !screenBlocked(viewports[0], campaign)) return viewports;
|
|
1180
|
+
const loaded0 = !placeholderTexts(viewports[0], pkg).length;
|
|
1181
|
+
const k = viewports.findIndex((c, i) => i > 0 && !isScrollCapture(c) && !screenBlocked(c, campaign)
|
|
1182
|
+
&& (!loaded0 || !placeholderTexts(c, pkg).length));
|
|
1183
|
+
return k < 0 ? viewports : [viewports[k], ...viewports.filter((_, i) => i !== k)];
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1163
1186
|
/** A capture that only moved the viewport: a sweep frame/probe/restore, or one reached by a swipe. */
|
|
1164
1187
|
export function isScrollCapture(c) {
|
|
1165
1188
|
return truthy(get(c, 'sweep')) || get(get(c, 'incoming_action') ?? {}, 'type') === 'scroll';
|
|
@@ -1346,7 +1369,7 @@ const sameObj = (a, b) => a === b || pyEq(a, b);
|
|
|
1346
1369
|
const memberOf = (x, list) => list.some((y) => sameObj(x, y));
|
|
1347
1370
|
|
|
1348
1371
|
/** `export` is a reserved word in JS: defined as exportUiInfo, exported under both names. */
|
|
1349
|
-
function exportUiInfo(campaign, staticWs, out,
|
|
1372
|
+
function exportUiInfo(campaign, staticWs, out, pkg = null) {
|
|
1350
1373
|
// digest first: report.mjs writes audit.json before utg.final.json, so a report landing
|
|
1351
1374
|
// mid-export can only make this digest older than the export (one extra rebuild later),
|
|
1352
1375
|
// never newer (a capture the plan would then claim to have seen)
|
|
@@ -1505,7 +1528,9 @@ function exportUiInfo(campaign, staticWs, out, maxViewports = 4, pkg = null) {
|
|
|
1505
1528
|
// The sweep state keeps its origin first even while it shows placeholders: view_scroll_N were swept
|
|
1506
1529
|
// from origin and continue view.xml only if it stays there (its placeholder flag still reaches meta).
|
|
1507
1530
|
const pinned = sweepState && truthy(origin) && sweepState.viewports[0] === origin;
|
|
1508
|
-
for (const st of states) {
|
|
1531
|
+
for (const st of states) {
|
|
1532
|
+
if (!(pinned && st === sweepState)) { st.viewports = usableFirst(loadedFirst(st.viewports, pkgName), campaign, pkgName); }
|
|
1533
|
+
}
|
|
1509
1534
|
for (const [si, st] of states.entries()) {
|
|
1510
1535
|
let slug = prevSlug.get(JSON.stringify([node.id, si]));
|
|
1511
1536
|
if (!slug) {
|
|
@@ -1514,7 +1539,13 @@ function exportUiInfo(campaign, staticWs, out, maxViewports = 4, pkg = null) {
|
|
|
1514
1539
|
slug = `page_${String(seq).padStart(4, '0')}_${safeName(node)}${suffix}`;
|
|
1515
1540
|
}
|
|
1516
1541
|
const pdir = path.join(out, slug);
|
|
1517
|
-
|
|
1542
|
+
// primary frame only; the state's other viewports are not exported (header comment)
|
|
1543
|
+
const vps = head(st.viewports, 1);
|
|
1544
|
+
// a pinned sweep origin that is loading or blocked: its loaded, unblocked twin goes along
|
|
1545
|
+
const usable = (c) => !placeholderTexts(c, pkgName).length && !screenBlocked(c, campaign);
|
|
1546
|
+
const loadedAlt = pinned && st === sweepState && vps.length && !usable(vps[0])
|
|
1547
|
+
? st.viewports.find((c, i) => i > 0 && !isScrollCapture(c) && usable(c)) ?? null : null;
|
|
1548
|
+
const unexported = st.viewports.slice(1).filter((c) => c !== loadedAlt);
|
|
1518
1549
|
const sweep = [];
|
|
1519
1550
|
if (st === sweepState) {
|
|
1520
1551
|
for (const cap of frames) {
|
|
@@ -1522,7 +1553,7 @@ function exportUiInfo(campaign, staticWs, out, maxViewports = 4, pkg = null) {
|
|
|
1522
1553
|
sweep.push(cap);
|
|
1523
1554
|
}
|
|
1524
1555
|
}
|
|
1525
|
-
const planned = [...vps, ...sweep].map((c) => req(c, 'observation_id'));
|
|
1556
|
+
const planned = [...vps, ...sweep, ...(loadedAlt ? [loadedAlt] : [])].map((c) => req(c, 'observation_id'));
|
|
1526
1557
|
const oldMeta = isFile(path.join(pdir, 'meta.json')) ? readJson(path.join(pdir, 'meta.json')) : {};
|
|
1527
1558
|
// Same observations as last export: keep the directory as it is,
|
|
1528
1559
|
// measure_pack.json and all (re-copying would drop the pack).
|
|
@@ -1558,22 +1589,18 @@ function exportUiInfo(campaign, staticWs, out, maxViewports = 4, pkg = null) {
|
|
|
1558
1589
|
// views captured before the data arrived (placeholderTexts) vs the ones with it
|
|
1559
1590
|
const loadingViews = [];
|
|
1560
1591
|
const loadedViews = [];
|
|
1561
|
-
for (const
|
|
1562
|
-
const tail = vi === 0 ? '' : `_vp${vi}`;
|
|
1592
|
+
for (const cap of vps) { // the primary frame only
|
|
1563
1593
|
if (!keep) {
|
|
1564
|
-
fs.copyFileSync(resolveAsset(req(cap, 'tree'), campaign), path.join(pdir,
|
|
1594
|
+
fs.copyFileSync(resolveAsset(req(cap, 'tree'), campaign), path.join(pdir, 'view.xml'));
|
|
1565
1595
|
}
|
|
1566
|
-
const shot = copyShot(cap,
|
|
1596
|
+
const shot = copyShot(cap, 'screenshot.png', 'view.xml');
|
|
1567
1597
|
if (shot) { shots.push(shot); }
|
|
1568
|
-
trees.push(`${slug}/view
|
|
1569
|
-
|
|
1570
|
-
// Which scroll offset each was taken at is unknown, so anything inside
|
|
1571
|
-
// a scroller may be another row there and stays per viewport.
|
|
1572
|
-
const found = clickableElements(path.join(pdir, `view${tail}.xml`), st === sweepState ? 0 : vi);
|
|
1598
|
+
trees.push(`${slug}/view.xml`);
|
|
1599
|
+
const found = clickableElements(path.join(pdir, 'view.xml'), 0);
|
|
1573
1600
|
clickable.add(found, (el) => found.scrollers.has(el));
|
|
1574
1601
|
obsIds.push(req(cap, 'observation_id'));
|
|
1575
1602
|
const ph = placeholderTexts(cap, pkgName);
|
|
1576
|
-
if (ph.length) { loadingViews.push({ view_xml: `${slug}/view
|
|
1603
|
+
if (ph.length) { loadingViews.push({ view_xml: `${slug}/view.xml`, texts: ph }); } else { loadedViews.push(`${slug}/view.xml`); }
|
|
1577
1604
|
}
|
|
1578
1605
|
let scrollFrames = 0;
|
|
1579
1606
|
if (st === sweepState) {
|
|
@@ -1604,6 +1631,16 @@ function exportUiInfo(campaign, staticWs, out, maxViewports = 4, pkg = null) {
|
|
|
1604
1631
|
scrollFrames += 1;
|
|
1605
1632
|
}
|
|
1606
1633
|
}
|
|
1634
|
+
if (loadedAlt) {
|
|
1635
|
+
if (!keep) { fs.copyFileSync(resolveAsset(req(loadedAlt, 'tree'), campaign), path.join(pdir, 'view_loaded.xml')); }
|
|
1636
|
+
const shot = copyShot(loadedAlt, 'screenshot_loaded.png', 'view_loaded.xml');
|
|
1637
|
+
if (shot) { shots.push(shot); }
|
|
1638
|
+
trees.push(`${slug}/view_loaded.xml`);
|
|
1639
|
+
const found = clickableElements(path.join(pdir, 'view_loaded.xml'), 0);
|
|
1640
|
+
clickable.add(found, (el) => found.scrollers.has(el));
|
|
1641
|
+
obsIds.push(req(loadedAlt, 'observation_id'));
|
|
1642
|
+
loadedViews.push(`${slug}/view_loaded.xml`);
|
|
1643
|
+
}
|
|
1607
1644
|
let completeness;
|
|
1608
1645
|
if (st === sweepState) {
|
|
1609
1646
|
completeness = or(get(scroll, 'outcome'), 'not-swept');
|
|
@@ -1644,7 +1681,9 @@ function exportUiInfo(campaign, staticWs, out, maxViewports = 4, pkg = null) {
|
|
|
1644
1681
|
source: { backend: 'a2h-utg-explorer', observation_ids: obsIds, scroll_completeness: completeness,
|
|
1645
1682
|
// captures with the same view signature as an exported viewport (covered
|
|
1646
1683
|
// nodes aside), not exported: under <campaign>/artifacts/<id>/
|
|
1647
|
-
...(st.duplicates.length ? { duplicate_observation_ids: st.duplicates.map((c) => req(c, 'observation_id')) } : {})
|
|
1684
|
+
...(st.duplicates.length ? { duplicate_observation_ids: st.duplicates.map((c) => req(c, 'observation_id')) } : {}),
|
|
1685
|
+
// same state, different view signature, not exported (no *_vpN): under <campaign>/artifacts/<id>/
|
|
1686
|
+
...(unexported.length ? { unexported_viewport_ids: unexported.map((c) => req(c, 'observation_id')) } : {}) },
|
|
1648
1687
|
};
|
|
1649
1688
|
if (st === sweepState) {
|
|
1650
1689
|
meta.scroll = { outcome: get(scroll, 'outcome'), frames: scrollFrames,
|
|
@@ -1705,7 +1744,6 @@ export function main(argv = process.argv.slice(2)) {
|
|
|
1705
1744
|
{ name: 'campaign', positional: true },
|
|
1706
1745
|
{ name: '--static-ws', help: 'a2h-utg-static workspace (click_paths.json)' },
|
|
1707
1746
|
{ name: '--out', required: true, help: 'ui_info_root' },
|
|
1708
|
-
{ name: '--max-viewports', type: 'int', def: 4 },
|
|
1709
1747
|
{ name: '--package', help: 'app package (default: campaign config.json `package`)' },
|
|
1710
1748
|
],
|
|
1711
1749
|
}, argv);
|
|
@@ -1713,7 +1751,7 @@ export function main(argv = process.argv.slice(2)) {
|
|
|
1713
1751
|
err(`[ERR] ${pathStr(a.campaign)}/utg.final.json missing — run the explorer's report.mjs first`);
|
|
1714
1752
|
return 2;
|
|
1715
1753
|
}
|
|
1716
|
-
const m = exportUiInfo(pathResolve(a.campaign), a.static_ws, pathResolve(a.out), a.
|
|
1754
|
+
const m = exportUiInfo(pathResolve(a.campaign), a.static_ws, pathResolve(a.out), a.package);
|
|
1717
1755
|
out(`exported ${m.pages.length} page dirs; skipped ${m.skipped.length} observed nodes; ` +
|
|
1718
1756
|
`${m.dynamic_only} unmapped dynamic nodes not exported`);
|
|
1719
1757
|
if (m.foreign_tree_captures.length) {
|
|
@@ -1144,7 +1144,7 @@ export function inlineBlock(pack, idxRows, styles, room, budget = INLINE) {
|
|
|
1144
1144
|
*
|
|
1145
1145
|
* A group's `page_dirs` are its members' own dirs plus the captured dirs of nodes attached to
|
|
1146
1146
|
* them (build_conversion_set folds a captured ui-state / panel / menu into its host's group).
|
|
1147
|
-
* One dir = one state; inside it `view.xml` + `
|
|
1147
|
+
* One dir = one state; inside it `view.xml` + `view_scroll_N.xml` are frames
|
|
1148
1148
|
* of that state, each with its screenshot unless FLAG_SECURE blocked it. Handing an agent only
|
|
1149
1149
|
* `meta.screenshot` lost every other frame and every attached state: captured states were then
|
|
1150
1150
|
* converted from source branches as if never seen.
|
|
@@ -1174,7 +1174,7 @@ export function referenceEvidence(group, uiInfo) {
|
|
|
1174
1174
|
const preData = new Map(pyIter(or(dget(or(dget(meta, 'content_loading'), {}), 'views'), []))
|
|
1175
1175
|
.map((v) => [pyStr(dget(v, 'view_xml')), pyIter(or(dget(v, 'texts'), [])).map(pyStr)]));
|
|
1176
1176
|
for (const vx of pyIter(or(dget(meta, 'view_xmls'), [])).map(pyStr)) {
|
|
1177
|
-
// view.xml <-> screenshot.png,
|
|
1177
|
+
// view.xml <-> screenshot.png, view_scroll_2.xml <-> screenshot_scroll_2.png
|
|
1178
1178
|
const shot = vx.replace(/\/view(_[^/]*)?\.xml$/, (_, t) => `/screenshot${t || ''}.png`);
|
|
1179
1179
|
const frame = { view_xml: abs(vx), screenshot: shots.has(shot) ? abs(shot) : null, blocked: blocked.get(vx) ?? null,
|
|
1180
1180
|
...(preData.has(vx) ? { pre_data: preData.get(vx) } : {}) };
|
|
@@ -1376,7 +1376,7 @@ export function renderEvidence(ev) {
|
|
|
1376
1376
|
const lines = ['## Reference evidence — one state per directory, every frame',
|
|
1377
1377
|
'',
|
|
1378
1378
|
'Each `###` is one state of this group (the member page, or a node attached to it) with ' +
|
|
1379
|
-
'every captured frame of that state. Read **all** of them:
|
|
1379
|
+
'every captured frame of that state. Read **all** of them: scroll frames are ' +
|
|
1380
1380
|
'the same state at other offsets; an attached state is converted against its own frames, ' +
|
|
1381
1381
|
'not from source branches. A `blocked` frame has a view tree but no screenshot (the app ' +
|
|
1382
1382
|
'forbids screen capture): bounds from the tree, colours from source/theme.',
|
|
@@ -1062,7 +1062,7 @@ export const PROVIDE_RULE = 'You lead shared components other groups are waiting
|
|
|
1062
1062
|
*/
|
|
1063
1063
|
export const NO_IMAGE = '⚠ IMAGE READS ARE FORBIDDEN ON THIS HOST (highest priority). Opening any '
|
|
1064
1064
|
+ '.png/.jpg/.jpeg/.webp/.gif file crashes this session permanently. Never read screenshots. Use the '
|
|
1065
|
-
+ 'text evidence instead: view.xml / view_scroll_N.xml
|
|
1065
|
+
+ 'text evidence instead: view.xml / view_scroll_N.xml (bounds, ids, texts), '
|
|
1066
1066
|
+ 'measure_summary.txt / measure_pack.json, and `measure_pack.ts --probe` for extra pixel questions. '
|
|
1067
1067
|
+ 'Every procedure step that says to look at a screenshot is done on that text evidence, and the report '
|
|
1068
1068
|
+ 'states the evidence came from tree/measurement, not from viewing. All other requirements stay.\n\n';
|
|
@@ -339,7 +339,7 @@ export function isScaffoldPage(abs: string): boolean {
|
|
|
339
339
|
}
|
|
340
340
|
let score: number = 0;
|
|
341
341
|
if (/Hello\s+World/.test(t)) { score++; }
|
|
342
|
-
if (/@State\s+message\s*:\s*string/.test(t)) { score++; }
|
|
342
|
+
if (/@(?:State|Local)\s+message\s*:\s*string/.test(t)) { score++; }
|
|
343
343
|
if (/\.id\(\s*['"]HelloWorld['"]\s*\)/.test(t)) { score++; }
|
|
344
344
|
if (/struct\s+Index\b/.test(t)) { score++; }
|
|
345
345
|
if (/RelativeContainer\s*\(/.test(t) && /__container__/.test(t)) { score++; }
|
|
@@ -31,7 +31,7 @@ Each call advances as far as existing answers allow. It prints `waiting`: the wo
|
|
|
31
31
|
`--review serial` lists one stage at a time.
|
|
32
32
|
|
|
33
33
|
**Device watchdog.** Before every device phase the cycle runs `scripts/device_health.mjs ensure`. That is a bounded `adb shell echo`, and when the device does not answer it escalates: `adb reconnect`, then an adb server restart, then an emulator restart. Every step has a timeout.
|
|
34
|
-
- The emulator restart happens only when `config.emulator.avd` is set: `emu kill`, a detached cold start (`-no-snapshot-load`) on the same port, then a wait for `sys.boot_completed` within `boot_timeout_s` (300). A real device is never restarted.
|
|
34
|
+
- The emulator restart happens only when `config.emulator.avd` is set, or `config.emulator.auto_avd: true` (the AVD name is then read with `adb emu avd name`, and remembered per boot of the emulator while it is healthy, so a hung one can still be restarted and another AVD later booted on the same port never inherits the name): `emu kill`, a detached cold start (`-no-snapshot-load`) on the same port, then a wait for `sys.boot_completed` within `boot_timeout_s` (300). A real device is never restarted.
|
|
35
35
|
- A phase that died because the device went away runs once more after recovery.
|
|
36
36
|
- A device that never comes back ends the call with `DeviceDown`, and that phase is not marked done. Restart the cycle once the device is back.
|
|
37
37
|
- While another explorer holds the device lock, `ensure` skips every recovery step (reconnect, adb restart, emulator restart would break its run) and reports it busy. The call ends with `DeviceDown` the same way, and a scheduled restart between rounds is skipped and noted.
|
|
@@ -122,7 +122,7 @@ variant JSON 必填 `id`、`requires`、`fixtures`、`probes`、`cleanup`;可
|
|
|
122
122
|
- **等待内容加载**(`content_wait_seconds`,默认 10):动作后的截图若已识别页面、但看起来仍在加载(可见的近似正方形 `ProgressBar`;本应用可见文字里还留着未格式化的占位符 `%1$s` / `%2$d` / `%.1f` / `%02d` / `%1$tY` / 独立的 `%s`(`UNFORMATTED_TEXT`,即布局 `android:text` 默认值、数据回来前的样子;无位置参数的占位符两侧不能紧挨 ASCII 字母或数字(`5%d`、URL 的 `%20` 不算),中文紧挨可以(`体感%s`、`%d天`);输入框(EditText、AutoCompleteTextView、SearchAutoComplete)、列表行和 WebView 内的文字(RecyclerView / ListView / GridView / WebView 下,是绑定的数据)、超过 40 个字符的文字(是内容,不是布局默认值)除外;WeatherApp 首页每次启动后约 8 s 都是 `Feels like %1$s`,控件树静止,`settle()` 判不出来);或页面源码有 3 条以上固定文字、屏幕上至多 2 条带文字节点且其中至多 1 条命中),先不映射,每 0.5 秒重新截图直到内容出现。等满仍在加载就照样映射,`mapping` 事件带 `loading: true`;同一页面等满过一次后不再等待,直到某次截图看到它加载完成(说明只是加载慢,如首次拉数据超时),下次再等;这种宽限每页每轮只有一次,再次等满后本轮不再等待。一直转圈、常驻 `%s`、或在加载态与已加载之间来回切换(滚动遮住转圈)的页面因此每轮最多付两次等待。只在加载态截到的页面在 `report.md` 列入「仅在加载中截到的页面」。宽条形 `ProgressBar`(存储占用、下载进度)不算加载。
|
|
123
123
|
- **首次运行页桥接**(`launch_chain_wait_seconds`,默认 6):编译时任务记下启动后自动到达的页面(`launch_chain`,如 Splash → Main 中的 Main)和启动落地页(`launch_page`,Splash)。`source()` 启动后若仍停在 `launch_page`,先等它离开;随后若落在链外的页面(首次运行的 Guide),且有一个从该页进入链内页面的已编译任务,就先执行它(事件 `launch_bridge`,失败记 `launch_bridge_failed` 后交给源页检查)。每次启动落在链外都会桥接,出口通常会写入首次运行标记,之后的启动不再经过该页。
|
|
124
124
|
- **off-path 边**:`a2h-utg-static` nl_hints 对没有 click path 终止于其上的无标签边给出的回答写在 `click_paths.json` `edge_hints`(键 `<source>|<target>|<trigger>`)。有 `nl_hint` 时编译为点击;回答 `not_clickable` 时编译为 `needs_external`,`compile_issues` 含 `edge-not-clickable`,C 类恢复跳过它。
|
|
125
|
-
- **前缀熔断**(`prefix_memo`,默认开):同一次运行里,某任务的“启动 + 前 n 步 replay”因确定性原因失败后(`selector-not-found-after-bounded-scroll`、`replay-target-unverified:`、`ambiguous selector`、`list-item
|
|
125
|
+
- **前缀熔断**(`prefix_memo`,默认开):同一次运行里,某任务的“启动 + 前 n 步 replay”因确定性原因失败后(`selector-not-found-after-bounded-scroll`、`replay-target-unverified:`、`ambiguous selector`、`list-item:`、单一滚动容器缺失),共享这个前缀的后续任务按“启动方式(清数据的 fresh / 未清的 warm)+ 落地页”判断:落地页可预知时(fresh 启动;warm 启动落在启动链页面上,或无启动链时连续两次 warm 启动落地相同)在清数据和启动之前就直接记 `failed`,否则启动一次、越过启动页(Splash)、在 `launchBridge` 之前取落地页再判断,相同才记 `failed`,原因相同,并带 `prefix_failed_from`(首个失败的任务)、`prefix_key`、`replay_index`、`prefix_before`(该步开始时的观察)。证据指向首次失败的那次观察。B 类抽取按 `replay_index` 和 `prefix_before` 定位失败步,这些任务与首个任务归入同一项,审阅一次即可。设备异常等瞬时失败不熔断。
|
|
126
126
|
- **意外弹窗(interruption)**:控件树唯一根节点面积 < `modal_max_screen_share`(默认 0.85)且含可点控件,即视为浮层(AlertDialog、权限、评分、按流量刷新确认等)。浮层若不是当前任务的源页、目标页或 `source_context`,在选择器查找前、每次搜索滚动后、回放到源页后各检查一次,并依次处理:先用 `interruption_rules`(`{id?, when: <rule>, action}`);其次,被测应用自己的首启同意弹窗(text 或 content_desc 含隐私政策/用户协议/服务协议等,`CONSENT_RE`;WebView 正文只出现在 content_desc;节点无 package 视为本应用)点确认控件接受:`android:id/button1`(按完整 id 匹配;文字为「不同意」「拒绝」「退出」等拒绝义时不算,`CONSENT_DECLINE_RE`),没有时取自定义布局里非勾选类(CheckBox/Switch 等)、整段文字为「同意」「同意并继续」「我同意」「接受」/ Agree / Accept 的唯一节点(`CONSENT_POSITIVE_RE`,整段匹配,「不同意」「我已阅读并同意」不算);只有确认控件存在但不可点时才先勾选 CheckBox(「我已阅读并同意」):优先勾文字含同意/已阅读的第一个(每次勾一个,两个必勾框分两次勾;勾选不占 `max_interruption_dismissals` 次数),否则只在仅有一个未勾选框时勾它,多个都不含同意字样(「接收推送」)时不猜(`consent_default`,默认开,事件 `rule: consent-default`)。已认定是同意弹窗、找不到可点的确认控件,且弹窗上有拒绝出口(`android:id/button2`,或整段文字为「不同意」「拒绝并退出」等的控件,`CONSENT_DECLINE_RE`)时,不退回 Back/button2,原样留着,记一条 `outcome: unresolved` 的事件;没有拒绝出口的(「登录即同意《用户协议》」的一键登录半屏弹层)仍走通用的 Back。只在启动后、除弹窗处理和等待/滚动外还没做过任何动作时生效(`_launched`,`atom()` 维护;启动失败、每个任务开始和 `run()` 开始时清零):这是应用自己弹出的首启弹窗;任务点击后才出现的含协议字样的弹窗(「撤回同意」「注销账号」「登录即同意」)是对那次点击的确认,仍走 Back/button2。同意点击无效果时不再重试、也不退回 Back;再其次 Back,Back 关不掉时点 `android:id/button2`。同意弹窗不能走 Back/button2:Back 会关闭 Activity,button2 通常是「拒绝并退出」(where2study 11-04 实测:每个任务清数据后都遇到该弹窗,64 个任务 0 个确认)。确认控件文字不在上述范围内时,写一条 `interruption_rules`;每个浮层最多处理 `max_interruption_dismissals` 次(默认 2)。每次处理记一条 `interruption` 事件,内容包括前 6 段文字和所用动作,可用来补写规则。
|
|
127
127
|
- **上滑不越过起点**:查找控件时,先向下滚,再向上滚回到起点就停(`_backAtOrigin`),不再多滑一次。列表顶部再上滑就是下拉刷新(SwipeRefreshLayout 等,开源 app 普遍使用),会触发联网、按流量提示等弹窗。AntennaPod 第 1 轮因此有 35/65 个任务失败、只覆盖 7 页。起点在列表中部、需要往上找时,设 `search_above_origin: true`。
|
|
128
128
|
- **框架文字本地化**:`More options` 等 AppCompat 无障碍文字按 `--locale` 生成本地化选择器,保留英文作为后备。
|
|
@@ -141,7 +141,7 @@ variant JSON 必填 `id`、`requires`、`fixtures`、`probes`、`cleanup`;可
|
|
|
141
141
|
目标未确认、以及回放中间页未能确认的任务,证据已经在(动作前后截图、组件树),缺的只是身份结论。`recover.mjs` 让模型看截图、组件树和源码,提出识别规则;规则经确定性校验才会被采用,模型的判断本身不作为证据。
|
|
142
142
|
|
|
143
143
|
1. `recover.mjs extract <campaign> --static <utg.json> --project <src> --package <app>`:按“期望到达的静态页”聚合成 `recovery_worklist.json`。每项最多 3 张示例截图,附裁剪后的组件树(已去掉被遮挡的节点)、当前判定和依据,以及该页的声明文件、布局文件、标题和控件 ID。
|
|
144
|
-
2. 审阅方写 `recovery_answers.json`,每项给出 `verdict`(is-target / not-target / cannot-tell)、属于目标的示例、规则(`all`/`none` 选择器,每个只含 resource_name、text、content_desc 之一),以及每个锚点的 `file:line`
|
|
144
|
+
2. 审阅方写 `recovery_answers.json`,每项给出 `verdict`(is-target / not-target / cannot-tell)、属于目标的示例、规则(`all`/`none` 选择器,每个只含 resource_name、text、content_desc 之一),以及每个锚点的 `file:line` 证据。每项只按它自己的 `page` 判断:锚点取自该项 `static.files`(声明文件、布局文件,或这些行引用的字符串资源),不能借用相邻项或打开它的页面。设置行打开同名弹窗时,两处都显示这个标题:引用弹窗自己文件里的那一行,并再取一条只在弹窗窗口里出现的文字(它的选项)作第二个锚点。
|
|
145
145
|
3. `recover.mjs apply ...` 逐条校验:
|
|
146
146
|
- **来源**:锚点值必须出现在引用的行上;ID 只能来自该页自己的声明文件或布局文件,文字只能来自字符串资源或该页自己的文件。运行时数据(标题、日期、数量)进不了源码,因此不可能成为锚点。
|
|
147
147
|
- **覆盖**:规则能匹配审阅方指认的所有示例。
|