hap-cli 0.9.9__tar.gz → 0.9.10__tar.gz
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.
- {hap_cli-0.9.9 → hap_cli-0.9.10}/MANIFEST.in +6 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/PKG-INFO +1 -1
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/__init__.py +1 -1
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/v3_registry.py +41 -1
- hap_cli-0.9.10/hap_cli/core/record_discussions.py +137 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli.egg-info/PKG-INFO +1 -1
- hap_cli-0.9.10/hap_cli.egg-info/SOURCES.txt +211 -0
- hap_cli-0.9.10/hap_cli.egg-info/top_level.txt +1 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/setup.py +18 -7
- hap_cli-0.9.9/app_live_tests/__init__.py +0 -11
- hap_cli-0.9.9/app_live_tests/__main__.py +0 -32
- hap_cli-0.9.9/app_live_tests/config.py +0 -20
- hap_cli-0.9.9/app_live_tests/fixtures/__init__.py +0 -1
- hap_cli-0.9.9/app_live_tests/fixtures/feedback_scenario.py +0 -256
- hap_cli-0.9.9/app_live_tests/harness.py +0 -76
- hap_cli-0.9.9/app_live_tests/smoke.py +0 -4937
- hap_cli-0.9.9/app_live_tests/state.py +0 -91
- hap_cli-0.9.9/hap_cli/tests/__init__.py +0 -1
- hap_cli-0.9.9/hap_cli/tests/conftest.py +0 -234
- hap_cli-0.9.9/hap_cli/tests/test_action_mdpublic_parity.py +0 -289
- hap_cli-0.9.9/hap_cli/tests/test_advanced_setting_guard.py +0 -514
- hap_cli-0.9.9/hap_cli/tests/test_app_creator.py +0 -119
- hap_cli-0.9.9/hap_cli/tests/test_app_editor.py +0 -304
- hap_cli-0.9.9/hap_cli/tests/test_app_export_usage.py +0 -224
- hap_cli-0.9.9/hap_cli/tests/test_app_light_color.py +0 -42
- hap_cli-0.9.9/hap_cli/tests/test_app_section_name.py +0 -97
- hap_cli-0.9.9/hap_cli/tests/test_approval_submit_fill_cli.py +0 -143
- hap_cli-0.9.9/hap_cli/tests/test_approval_wire.py +0 -259
- hap_cli-0.9.9/hap_cli/tests/test_atomic_write.py +0 -202
- hap_cli-0.9.9/hap_cli/tests/test_attachment_share.py +0 -434
- hap_cli-0.9.9/hap_cli/tests/test_auth_prerelease.py +0 -154
- hap_cli-0.9.9/hap_cli/tests/test_batch_add_atomic.py +0 -381
- hap_cli-0.9.9/hap_cli/tests/test_bug_036430.py +0 -167
- hap_cli-0.9.9/hap_cli/tests/test_bug_036750.py +0 -130
- hap_cli-0.9.9/hap_cli/tests/test_calendar_date_range.py +0 -51
- hap_cli-0.9.9/hap_cli/tests/test_calendar_discussion_cli.py +0 -89
- hap_cli-0.9.9/hap_cli/tests/test_chart.py +0 -433
- hap_cli-0.9.9/hap_cli/tests/test_chart_filter_merge.py +0 -200
- hap_cli-0.9.9/hap_cli/tests/test_chat_args_and_tables.py +0 -106
- hap_cli-0.9.9/hap_cli/tests/test_chat_attachment_send.py +0 -501
- hap_cli-0.9.9/hap_cli/tests/test_chat_messages_cli.py +0 -28
- hap_cli-0.9.9/hap_cli/tests/test_chat_recall_cli.py +0 -161
- hap_cli-0.9.9/hap_cli/tests/test_chat_send_socket.py +0 -122
- hap_cli-0.9.9/hap_cli/tests/test_cli_access.py +0 -738
- hap_cli-0.9.9/hap_cli/tests/test_coded_responses.py +0 -152
- hap_cli-0.9.9/hap_cli/tests/test_command_catalog_in_sync.py +0 -40
- hap_cli-0.9.9/hap_cli/tests/test_condition_dsl.py +0 -451
- hap_cli-0.9.9/hap_cli/tests/test_condition_dsl_entries.py +0 -239
- hap_cli-0.9.9/hap_cli/tests/test_condition_dsl_readback.py +0 -131
- hap_cli-0.9.9/hap_cli/tests/test_config_cmd.py +0 -217
- hap_cli-0.9.9/hap_cli/tests/test_content_language.py +0 -120
- hap_cli-0.9.9/hap_cli/tests/test_control_lookup_guard.py +0 -179
- hap_cli-0.9.9/hap_cli/tests/test_core.py +0 -11508
- hap_cli-0.9.9/hap_cli/tests/test_create_worksheet_partial.py +0 -231
- hap_cli-0.9.9/hap_cli/tests/test_destructive_confirm_cli.py +0 -178
- hap_cli-0.9.9/hap_cli/tests/test_dsl_existing_node_refs.py +0 -372
- hap_cli-0.9.9/hap_cli/tests/test_dsl_multi_record_guard.py +0 -444
- hap_cli-0.9.9/hap_cli/tests/test_editor_inline_subtable.py +0 -239
- hap_cli-0.9.9/hap_cli/tests/test_engine_core_parity.py +0 -121
- hap_cli-0.9.9/hap_cli/tests/test_fb_arg_consistency.py +0 -236
- hap_cli-0.9.9/hap_cli/tests/test_fb_bidirectional.py +0 -155
- hap_cli-0.9.9/hap_cli/tests/test_fb_discussion_mentions.py +0 -227
- hap_cli-0.9.9/hap_cli/tests/test_fb_entry_module.py +0 -122
- hap_cli-0.9.9/hap_cli/tests/test_fb_field_record_ref.py +0 -380
- hap_cli-0.9.9/hap_cli/tests/test_fb_http_error_body.py +0 -85
- hap_cli-0.9.9/hap_cli/tests/test_fb_json_anywhere.py +0 -123
- hap_cli-0.9.9/hap_cli/tests/test_fb_json_file_arg.py +0 -65
- hap_cli-0.9.9/hap_cli/tests/test_fb_layout_check.py +0 -206
- hap_cli-0.9.9/hap_cli/tests/test_fb_node_get_detail.py +0 -188
- hap_cli-0.9.9/hap_cli/tests/test_fb_node_summary.py +0 -226
- hap_cli-0.9.9/hap_cli/tests/test_fb_post_cursor.py +0 -119
- hap_cli-0.9.9/hap_cli/tests/test_fb_publish_reasons.py +0 -193
- hap_cli-0.9.9/hap_cli/tests/test_fb_replicate_workflow.py +0 -587
- hap_cli-0.9.9/hap_cli/tests/test_fb_save_fields_shape.py +0 -167
- hap_cli-0.9.9/hap_cli/tests/test_fb_subgroups.py +0 -73
- hap_cli-0.9.9/hap_cli/tests/test_fb_subtable_read.py +0 -281
- hap_cli-0.9.9/hap_cli/tests/test_fb_worksheet_references.py +0 -262
- hap_cli-0.9.9/hap_cli/tests/test_fb_worksheet_visibility.py +0 -133
- hap_cli-0.9.9/hap_cli/tests/test_fb_worksheet_workflows.py +0 -159
- hap_cli-0.9.9/hap_cli/tests/test_fields_mdpublic_parity.py +0 -335
- hap_cli-0.9.9/hap_cli/tests/test_full_e2e.py +0 -179
- hap_cli-0.9.9/hap_cli/tests/test_g1_chart_parity.py +0 -200
- hap_cli-0.9.9/hap_cli/tests/test_g1_record_parity.py +0 -206
- hap_cli-0.9.9/hap_cli/tests/test_g1_upload_parity.py +0 -163
- hap_cli-0.9.9/hap_cli/tests/test_g1_worksheet_parity.py +0 -237
- hap_cli-0.9.9/hap_cli/tests/test_g2_coverage_parity.py +0 -484
- hap_cli-0.9.9/hap_cli/tests/test_g3_workflow_parity.py +0 -348
- hap_cli-0.9.9/hap_cli/tests/test_g4_approval_parity.py +0 -403
- hap_cli-0.9.9/hap_cli/tests/test_g5_low_frequency_parity.py +0 -500
- hap_cli-0.9.9/hap_cli/tests/test_g6_advanced_fields.py +0 -465
- hap_cli-0.9.9/hap_cli/tests/test_g6_fields_roundtrip.py +0 -102
- hap_cli-0.9.9/hap_cli/tests/test_g7_misc_gaps.py +0 -342
- hap_cli-0.9.9/hap_cli/tests/test_g7b_permanent_delete.py +0 -348
- hap_cli-0.9.9/hap_cli/tests/test_g8_filter_operator.py +0 -305
- hap_cli-0.9.9/hap_cli/tests/test_g8b_pivot_operators.py +0 -106
- hap_cli-0.9.9/hap_cli/tests/test_g8c_empty_filter_and_help_truth.py +0 -329
- hap_cli-0.9.9/hap_cli/tests/test_g9_appid_resolve.py +0 -166
- hap_cli-0.9.9/hap_cli/tests/test_global_meta.py +0 -309
- hap_cli-0.9.9/hap_cli/tests/test_guide.py +0 -364
- hap_cli-0.9.9/hap_cli/tests/test_guide_sections.py +0 -322
- hap_cli-0.9.9/hap_cli/tests/test_i18n.py +0 -423
- hap_cli-0.9.9/hap_cli/tests/test_inner_flow_batch_add.py +0 -151
- hap_cli-0.9.9/hap_cli/tests/test_instance_envelope.py +0 -127
- hap_cli-0.9.9/hap_cli/tests/test_instance_history_cli.py +0 -89
- hap_cli-0.9.9/hap_cli/tests/test_integration.py +0 -866
- hap_cli-0.9.9/hap_cli/tests/test_integration_approval.py +0 -320
- hap_cli-0.9.9/hap_cli/tests/test_integration_approval_actions.py +0 -261
- hap_cli-0.9.9/hap_cli/tests/test_integration_calendar.py +0 -283
- hap_cli-0.9.9/hap_cli/tests/test_integration_destructive.py +0 -357
- hap_cli-0.9.9/hap_cli/tests/test_integration_misc.py +0 -171
- hap_cli-0.9.9/hap_cli/tests/test_integration_post.py +0 -118
- hap_cli-0.9.9/hap_cli/tests/test_integration_social.py +0 -191
- hap_cli-0.9.9/hap_cli/tests/test_integration_v3.py +0 -177
- hap_cli-0.9.9/hap_cli/tests/test_integration_workflow.py +0 -145
- hap_cli-0.9.9/hap_cli/tests/test_integration_worksheet_extra.py +0 -154
- hap_cli-0.9.9/hap_cli/tests/test_jsonschema_mini_copy.py +0 -84
- hap_cli-0.9.9/hap_cli/tests/test_member_relation_array_wrap.py +0 -103
- hap_cli-0.9.9/hap_cli/tests/test_multi_profile.py +0 -434
- hap_cli-0.9.9/hap_cli/tests/test_no_workflow_unsupported.py +0 -92
- hap_cli-0.9.9/hap_cli/tests/test_noninteractive_confirm.py +0 -153
- hap_cli-0.9.9/hap_cli/tests/test_org_approval_v3_semantic_cli.py +0 -266
- hap_cli-0.9.9/hap_cli/tests/test_org_id_cli.py +0 -123
- hap_cli-0.9.9/hap_cli/tests/test_org_id_docs.py +0 -35
- hap_cli-0.9.9/hap_cli/tests/test_page_filters_group_read.py +0 -243
- hap_cli-0.9.9/hap_cli/tests/test_page_filters_group_update.py +0 -290
- hap_cli-0.9.9/hap_cli/tests/test_page_save_page_id.py +0 -76
- hap_cli-0.9.9/hap_cli/tests/test_parameter_conventions.py +0 -41
- hap_cli-0.9.9/hap_cli/tests/test_parameter_mapping_registry.py +0 -96
- hap_cli-0.9.9/hap_cli/tests/test_post_attachments.py +0 -182
- hap_cli-0.9.9/hap_cli/tests/test_post_group_friction.py +0 -205
- hap_cli-0.9.9/hap_cli/tests/test_post_scope_cli.py +0 -203
- hap_cli-0.9.9/hap_cli/tests/test_record_batch_v3_semantic_cli.py +0 -279
- hap_cli-0.9.9/hap_cli/tests/test_record_business_rules.py +0 -999
- hap_cli-0.9.9/hap_cli/tests/test_record_defaults.py +0 -723
- hap_cli-0.9.9/hap_cli/tests/test_record_doc_id_hidden.py +0 -199
- hap_cli-0.9.9/hap_cli/tests/test_record_field_alias.py +0 -146
- hap_cli-0.9.9/hap_cli/tests/test_record_form_checks.py +0 -481
- hap_cli-0.9.9/hap_cli/tests/test_record_run_action.py +0 -345
- hap_cli-0.9.9/hap_cli/tests/test_record_v3_semantic_cli.py +0 -96
- hap_cli-0.9.9/hap_cli/tests/test_record_write_fixes.py +0 -125
- hap_cli-0.9.9/hap_cli/tests/test_relation_scope.py +0 -440
- hap_cli-0.9.9/hap_cli/tests/test_relogin.py +0 -234
- hap_cli-0.9.9/hap_cli/tests/test_rmw_mdpublic_parity.py +0 -183
- hap_cli-0.9.9/hap_cli/tests/test_role_app_scope.py +0 -101
- hap_cli-0.9.9/hap_cli/tests/test_rule_filters_and_field_warning.py +0 -199
- hap_cli-0.9.9/hap_cli/tests/test_save_action_silent_drop.py +0 -66
- hap_cli-0.9.9/hap_cli/tests/test_save_rule_spec.py +0 -274
- hap_cli-0.9.9/hap_cli/tests/test_select_add_option.py +0 -78
- hap_cli-0.9.9/hap_cli/tests/test_select_rejects_relation_value.py +0 -182
- hap_cli-0.9.9/hap_cli/tests/test_semantic_types_registry.py +0 -92
- hap_cli-0.9.9/hap_cli/tests/test_subtable_mdpublic_parity.py +0 -82
- hap_cli-0.9.9/hap_cli/tests/test_update.py +0 -424
- hap_cli-0.9.9/hap_cli/tests/test_update_mode.py +0 -90
- hap_cli-0.9.9/hap_cli/tests/test_upload_allow_down.py +0 -118
- hap_cli-0.9.9/hap_cli/tests/test_upload_host_resolution.py +0 -93
- hap_cli-0.9.9/hap_cli/tests/test_upload_mdpublic_parity.py +0 -137
- hap_cli-0.9.9/hap_cli/tests/test_v3_api_schema_loader.py +0 -359
- hap_cli-0.9.9/hap_cli/tests/test_v3_bool_flags.py +0 -195
- hap_cli-0.9.9/hap_cli/tests/test_v3_dispatcher.py +0 -410
- hap_cli-0.9.9/hap_cli/tests/test_v3_registry_coverage.py +0 -139
- hap_cli-0.9.9/hap_cli/tests/test_v3_response_format_json.py +0 -276
- hap_cli-0.9.9/hap_cli/tests/test_v3_session.py +0 -332
- hap_cli-0.9.9/hap_cli/tests/test_v3_yaml_translation.py +0 -322
- hap_cli-0.9.9/hap_cli/tests/test_view_mdpublic_parity.py +0 -197
- hap_cli-0.9.9/hap_cli/tests/test_wf_config_keys.py +0 -153
- hap_cli-0.9.9/hap_cli/tests/test_wf_inner_scope.py +0 -155
- hap_cli-0.9.9/hap_cli/tests/test_wf_json_file_arg.py +0 -86
- hap_cli-0.9.9/hap_cli/tests/test_wf_node_delete_missing.py +0 -98
- hap_cli-0.9.9/hap_cli/tests/test_wf_save_action_dsl_fields.py +0 -184
- hap_cli-0.9.9/hap_cli/tests/test_wf_structure_listing.py +0 -79
- hap_cli-0.9.9/hap_cli/tests/test_wf_trigger_outcome.py +0 -72
- hap_cli-0.9.9/hap_cli/tests/test_wf_trigger_preserve.py +0 -99
- hap_cli-0.9.9/hap_cli/tests/test_wo4_result_handling.py +0 -184
- hap_cli-0.9.9/hap_cli/tests/test_workflow_code_node.py +0 -324
- hap_cli-0.9.9/hap_cli/tests/test_workflow_condition_field_types.py +0 -360
- hap_cli-0.9.9/hap_cli/tests/test_workflow_condition_slots.py +0 -180
- hap_cli-0.9.9/hap_cli/tests/test_workflow_delete_cascade.py +0 -137
- hap_cli-0.9.9/hap_cli/tests/test_workflow_envelope_errors.py +0 -112
- hap_cli-0.9.9/hap_cli/tests/test_workflow_lifecycle_wire.py +0 -179
- hap_cli-0.9.9/hap_cli/tests/test_workflow_list_cli.py +0 -73
- hap_cli-0.9.9/hap_cli/tests/test_workflow_node_wire.py +0 -349
- hap_cli-0.9.9/hap_cli/tests/test_workflow_publish_inner.py +0 -349
- hap_cli-0.9.9/hap_cli/tests/test_workflow_read_write_keys.py +0 -71
- hap_cli-0.9.9/hap_cli/tests/test_workflow_v3_semantic_cli.py +0 -668
- hap_cli-0.9.9/hap_cli/tests/test_worksheet_create_section.py +0 -91
- hap_cli-0.9.9/hap_cli/tests/test_worksheet_crud_cli.py +0 -79
- hap_cli-0.9.9/hap_cli/tests/test_worksheet_filter_read.py +0 -203
- hap_cli-0.9.9/hap_cli/tests/test_worksheet_switch.py +0 -186
- hap_cli-0.9.9/hap_cli/tests/test_worksheet_v3_semantic_cli.py +0 -378
- hap_cli-0.9.9/hap_cli.egg-info/SOURCES.txt +0 -417
- hap_cli-0.9.9/hap_cli.egg-info/top_level.txt +0 -3
- hap_cli-0.9.9/live_tests/__init__.py +0 -16
- hap_cli-0.9.9/live_tests/__main__.py +0 -39
- hap_cli-0.9.9/live_tests/_wftest.py +0 -72
- hap_cli-0.9.9/live_tests/charts.py +0 -454
- hap_cli-0.9.9/live_tests/cleanup.py +0 -67
- hap_cli-0.9.9/live_tests/compiler.py +0 -129
- hap_cli-0.9.9/live_tests/config.py +0 -33
- hap_cli-0.9.9/live_tests/errors.py +0 -51
- hap_cli-0.9.9/live_tests/executor.py +0 -152
- hap_cli-0.9.9/live_tests/fields.py +0 -430
- hap_cli-0.9.9/live_tests/hap.py +0 -147
- hap_cli-0.9.9/live_tests/recording/__init__.py +0 -4
- hap_cli-0.9.9/live_tests/recording/console.py +0 -59
- hap_cli-0.9.9/live_tests/recording/jsonl.py +0 -41
- hap_cli-0.9.9/live_tests/recording/mirror.py +0 -45
- hap_cli-0.9.9/live_tests/recording/report.py +0 -127
- hap_cli-0.9.9/live_tests/schema.py +0 -223
- hap_cli-0.9.9/live_tests/seed/__init__.py +0 -21
- hap_cli-0.9.9/live_tests/seed/cli.py +0 -81
- hap_cli-0.9.9/live_tests/seed/executor.py +0 -264
- hap_cli-0.9.9/live_tests/seed/template.py +0 -154
- hap_cli-0.9.9/live_tests/selftest.py +0 -272
- hap_cli-0.9.9/live_tests/smoke.py +0 -123
- hap_cli-0.9.9/live_tests/step.py +0 -86
- hap_cli-0.9.9/live_tests/steps.py +0 -1125
- hap_cli-0.9.9/live_tests/store.py +0 -332
- hap_cli-0.9.9/live_tests/workflow_dsl.py +0 -456
- {hap_cli-0.9.9 → hap_cli-0.9.10}/README.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/README.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/README_CN.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/__main__.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/_entry.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/__init__.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/app_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/app_creator_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/app_editor_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/attachment_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/auth_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/calendar_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/chart_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/chat_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/chatbot_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/config_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/contact_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/department_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/group_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/guide_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/icon_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/instance_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/node_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/optionset_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/page_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/post_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/record_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/region_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/role_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/update_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/upload_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/workflow_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/commands/worksheet_cmd.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/context.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/__init__.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/action_spec_adapter.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/__init__.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/_hapmeta/__init__.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/_hapmeta/control_type_codes.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/_hapmeta/worksheet_templates.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/charts.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/cleanup.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/compiler.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/config.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/design/design.schema.json +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/errors.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/examples/minimal.design.json +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/executor.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/fields.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/hap.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/merge.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/recording/__init__.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/recording/console.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/recording/jsonl.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/recording/mirror.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/recording/report.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/schema.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/seed/INSTRUCTIONS.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/seed/__init__.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/seed/cli.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/seed/executor.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/seed/resources/attachments.json +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/seed/resources/sample.docx +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/seed/resources/sample.pdf +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/seed/resources/sample_images.json +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/seed/template.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/selftest.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/smoke.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/steps.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/store.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/validate.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/app_creator/workflow_dsl.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/attachment.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/auth.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/calendar_mod.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/chart.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/chat.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/chatbot.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/cli_access.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/condition_dsl.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/contact.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/control_type_codes.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/department.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/editor/__init__.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/editor/_hapmeta/__init__.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/editor/_hapmeta/control_type_codes.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/editor/apply.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/editor/componentlower.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/editor/editspec/component.schema.json +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/editor/editspec/custom-action.schema.json +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/editor/editspec/envelope.schema.json +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/editor/editspec/field.schema.json +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/editor/editspec.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/editor/errors.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/editor/fieldlower.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/editor/jsonschema_mini.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/editor/models.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/editor/ops.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/editor/planner.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/editor/reader.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/field_normalizer.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/field_spec_adapter.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/filter_translator.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/filter_v3.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/flow_node.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/global_meta.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/group.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/guide.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/icon_index.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/instance.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/layout_check.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/logger.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/optionset.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/page.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/post.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/record.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/record_defaults.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/record_form_checks.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/record_lookups.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/record_rules.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/relation_scope.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/relogin.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/response_crypto.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/role.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/role_perm_builder.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/rule_spec_adapter.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/session.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/token_crypto.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/update.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/upload.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/v3/__init__.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/v3/dispatcher.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/v3/render.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/v3/schema.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/view_spec_adapter.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/workflow.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/workflow_node_dsl.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/worksheet.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/worksheet_form.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/worksheet_reference.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/core/worksheet_templates.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/guide/en/approval.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/guide/en/chart.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/guide/en/messages.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/guide/en/overview.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/guide/en/post.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/guide/en/record.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/guide/en/setup.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/guide/en/skills.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/guide/en/workflow.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/guide/en/worksheet.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/guide/index.json +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/guide/zh-Hans/approval.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/guide/zh-Hans/chart.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/guide/zh-Hans/messages.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/guide/zh-Hans/overview.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/guide/zh-Hans/post.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/guide/zh-Hans/record.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/guide/zh-Hans/setup.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/guide/zh-Hans/skills.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/guide/zh-Hans/workflow.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/guide/zh-Hans/worksheet.md +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/i18n.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/locale/__init__.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/locale/messages.json +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/locale/messages.schema.json +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/utils/__init__.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/utils/atomic_write.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/utils/confirm.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/utils/formatting.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/utils/options.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli/utils/parameter_mapping.py +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli.egg-info/dependency_links.txt +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli.egg-info/entry_points.txt +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/hap_cli.egg-info/requires.txt +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/setup.cfg +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/INDEX.json +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/add_member_to_role.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/batch_delete_records.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/create_optionset.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/create_role.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/delete_optionset.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/delete_record.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/delete_role.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/delete_worksheet.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/get_app_info.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/get_app_knowledge_list.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/get_app_worksheets_list.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/get_optionset_list.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/get_record_details.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/get_record_discussions.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/get_record_list.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/get_record_logs.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/get_record_pivot_data.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/get_record_relations.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/get_record_share_link.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/get_regions.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/get_role_details.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/get_role_list.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/knowledge_search.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/leave_all_roles.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/remove_member_from_role.yaml +0 -0
- {hap_cli-0.9.9 → hap_cli-0.9.10}/sources/v3-api-schema/update_optionset.yaml +0 -0
|
@@ -13,3 +13,9 @@ include hap_cli/README_CN.md
|
|
|
13
13
|
recursive-include hap_cli/locale *.json
|
|
14
14
|
include hap_cli/guide/index.json
|
|
15
15
|
recursive-include hap_cli/guide *.md
|
|
16
|
+
|
|
17
|
+
# Development-only trees stay out of the sdist too (see setup.py _PACKAGES).
|
|
18
|
+
prune hap_cli/tests
|
|
19
|
+
prune live_tests
|
|
20
|
+
prune app_live_tests
|
|
21
|
+
global-exclude __pycache__ *.py[cod]
|
|
@@ -21,6 +21,8 @@ re-implementation on legacy endpoints.
|
|
|
21
21
|
|
|
22
22
|
from __future__ import annotations
|
|
23
23
|
|
|
24
|
+
import logging
|
|
25
|
+
|
|
24
26
|
import click
|
|
25
27
|
|
|
26
28
|
from hap_cli.commands.app_cmd import app
|
|
@@ -34,8 +36,11 @@ from hap_cli.core.v3.render import render_v3_response
|
|
|
34
36
|
from hap_cli.core import worksheet as _ws_mod
|
|
35
37
|
from hap_cli.core import workflow as _wf_mod
|
|
36
38
|
from hap_cli.core import record_lookups as _lookups
|
|
39
|
+
from hap_cli.core import record_discussions as _discussions
|
|
37
40
|
from hap_cli.i18n import t
|
|
38
41
|
|
|
42
|
+
_logger = logging.getLogger("hap_cli.record")
|
|
43
|
+
|
|
39
44
|
|
|
40
45
|
def _drop(group, *names):
|
|
41
46
|
"""Remove legacy commands from a Click group before re-registering.
|
|
@@ -324,7 +329,42 @@ register_v3(record, "get", tool="get_record_details", subtable_guard=True)
|
|
|
324
329
|
# (record_cmd.py) — not V3.
|
|
325
330
|
register_v3(record, "delete", tool="batch_delete_records", # multi-id via batch
|
|
326
331
|
confirm="Delete the selected record(s) from worksheet {worksheet_id}?")
|
|
327
|
-
|
|
332
|
+
def _record_discussions_mentions(ctx, response, options):
|
|
333
|
+
"""Show mentions as @name, in both the JSON and the md form.
|
|
334
|
+
|
|
335
|
+
How the two forms differ, and why md may cost a second read, is in
|
|
336
|
+
``hap_cli.core.record_discussions``."""
|
|
337
|
+
payload = response.get("data") if isinstance(response, dict) else None
|
|
338
|
+
if not isinstance(payload, dict):
|
|
339
|
+
return response
|
|
340
|
+
discussions = payload.get("discussions")
|
|
341
|
+
if isinstance(discussions, list):
|
|
342
|
+
_discussions.render_json(discussions)
|
|
343
|
+
return response
|
|
344
|
+
if not isinstance(discussions, str):
|
|
345
|
+
return response
|
|
346
|
+
names = _discussions.names_from_md(discussions)
|
|
347
|
+
if any(i not in names for i in _discussions.mentioned_ids(discussions)):
|
|
348
|
+
params = click.get_current_context().params
|
|
349
|
+
query = {
|
|
350
|
+
"pageIndex": params.get("page_index"),
|
|
351
|
+
"pageSize": params.get("page_size"),
|
|
352
|
+
"search": params.get("search"),
|
|
353
|
+
"onlyWithAttachments": params.get("only_with_attachments"),
|
|
354
|
+
}
|
|
355
|
+
try:
|
|
356
|
+
names.update(_discussions.fetch_names(
|
|
357
|
+
ctx.get_session(), params.get("worksheet_id") or "",
|
|
358
|
+
params.get("row_id") or "", app_id=_resolve_list_app_id(ctx),
|
|
359
|
+
query={k: v for k, v in query.items() if v not in (None, "")}))
|
|
360
|
+
except Exception as exc:
|
|
361
|
+
_logger.warning("Could not look up mentioned names: %s", exc)
|
|
362
|
+
payload["discussions"] = _discussions.render_md(discussions, names)
|
|
363
|
+
return response
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
register_v3(record, "discussions", tool="get_record_discussions",
|
|
367
|
+
post_process=_record_discussions_mentions)
|
|
328
368
|
register_v3(record, "logs", tool="get_record_logs")
|
|
329
369
|
register_v3(record, "relations", tool="get_record_relations")
|
|
330
370
|
register_v3(record, "pivot", tool="get_record_pivot_data",
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"""Readable record discussions: mention markers rendered as ``@name``.
|
|
2
|
+
|
|
3
|
+
A discussion stores its mentions inside the text: ``[aid]<accountId>[/aid]``
|
|
4
|
+
per person (external portal users have ids like ``a#6805…``) and
|
|
5
|
+
``[all]atAll[/all]`` for everyone. The web renders them through
|
|
6
|
+
``createLinksForMessage`` (MDPublic src/components/comment/utils/
|
|
7
|
+
createLinksForMessage.js:86-109): a person becomes ``@<name>`` and the
|
|
8
|
+
everyone marker becomes ``@`` + AT_ALL_TEXT[WORKSHEETROW] = "全体参与者"
|
|
9
|
+
(src/components/comment/config.js:22). An id it cannot name stays as-is.
|
|
10
|
+
|
|
11
|
+
The V3 discussions endpoint answers JSON with a ``mentions`` list that
|
|
12
|
+
names every ``[aid]`` in the message, so the JSON form is rendered from
|
|
13
|
+
the response alone. Its ``md`` form drops that list and writes each author
|
|
14
|
+
as ``{"AccountId":…,"FullNmae":…}`` (sic — a server-side typo), so the md
|
|
15
|
+
form is rendered from a name map the caller supplies.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from __future__ import annotations
|
|
19
|
+
|
|
20
|
+
import json
|
|
21
|
+
import re
|
|
22
|
+
from typing import Any, Iterable
|
|
23
|
+
|
|
24
|
+
AT_ALL_TEXT = "全体参与者"
|
|
25
|
+
|
|
26
|
+
_AID_RE = re.compile(r"\[aid\]([^\[\]]+?)\[/aid\]")
|
|
27
|
+
_ALL_RE = re.compile(r"\[all\]atAll\[/all\]", re.IGNORECASE)
|
|
28
|
+
# One author as the md form writes it; tolerant of the server ever fixing
|
|
29
|
+
# the misspelt key.
|
|
30
|
+
_MD_AUTHOR_RE = re.compile(
|
|
31
|
+
r'\{"AccountId":"([^"]*)","(?:FullNmae|FullName)":"((?:[^"\\]|\\.)*)"\}')
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def render_markers(text: str, names: dict[str, str]) -> str:
|
|
35
|
+
"""Replace mention markers with ``@name``; unknown ids stay visible."""
|
|
36
|
+
if not text:
|
|
37
|
+
return text or ""
|
|
38
|
+
|
|
39
|
+
def _person(m: re.Match) -> str:
|
|
40
|
+
name = names.get(m.group(1).strip())
|
|
41
|
+
return f"@{name}" if name else m.group(0)
|
|
42
|
+
|
|
43
|
+
return _AID_RE.sub(_person, _ALL_RE.sub(f"@{AT_ALL_TEXT}", text))
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def mentioned_ids(text: str) -> list[str]:
|
|
47
|
+
seen: list[str] = []
|
|
48
|
+
for aid in _AID_RE.findall(text or ""):
|
|
49
|
+
aid = aid.strip()
|
|
50
|
+
if aid not in seen:
|
|
51
|
+
seen.append(aid)
|
|
52
|
+
return seen
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def _people(item: dict) -> Iterable[dict]:
|
|
56
|
+
for key in ("_createdBy", "replyToAuthor"):
|
|
57
|
+
if isinstance(item.get(key), dict):
|
|
58
|
+
yield item[key]
|
|
59
|
+
for person in item.get("mentions") or []:
|
|
60
|
+
if isinstance(person, dict):
|
|
61
|
+
yield person
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def names_from_json(discussions: Any) -> dict[str, str]:
|
|
65
|
+
"""Account id → name from every author, reply target and mention."""
|
|
66
|
+
names: dict[str, str] = {}
|
|
67
|
+
for item in discussions or []:
|
|
68
|
+
if not isinstance(item, dict):
|
|
69
|
+
continue
|
|
70
|
+
for person in _people(item):
|
|
71
|
+
aid = person.get("accountId")
|
|
72
|
+
name = person.get("fullname") or person.get("name")
|
|
73
|
+
if aid and name:
|
|
74
|
+
names[aid] = name
|
|
75
|
+
return names
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def render_json(discussions: Any) -> Any:
|
|
79
|
+
"""Render each discussion's ``message`` in place.
|
|
80
|
+
|
|
81
|
+
The stored text moves to ``rawMessage``; ``mentionsEveryone`` is set
|
|
82
|
+
when the message mentions everyone. The server's ``mentions`` list
|
|
83
|
+
(id and name of each person mentioned) is left as it is."""
|
|
84
|
+
if not isinstance(discussions, list):
|
|
85
|
+
return discussions
|
|
86
|
+
names = names_from_json(discussions)
|
|
87
|
+
for item in discussions:
|
|
88
|
+
if not isinstance(item, dict) or not isinstance(item.get("message"), str):
|
|
89
|
+
continue
|
|
90
|
+
raw = item["message"]
|
|
91
|
+
rendered = render_markers(raw, names)
|
|
92
|
+
if rendered != raw:
|
|
93
|
+
item["rawMessage"] = raw
|
|
94
|
+
item["message"] = rendered
|
|
95
|
+
if _ALL_RE.search(raw):
|
|
96
|
+
item["mentionsEveryone"] = True
|
|
97
|
+
return discussions
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def names_from_md(text: str) -> dict[str, str]:
|
|
101
|
+
names: dict[str, str] = {}
|
|
102
|
+
for aid, name in _MD_AUTHOR_RE.findall(text or ""):
|
|
103
|
+
if aid and name:
|
|
104
|
+
names[aid] = _unescape(name)
|
|
105
|
+
return names
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def _unescape(value: str) -> str:
|
|
109
|
+
try:
|
|
110
|
+
return json.loads(f'"{value}"')
|
|
111
|
+
except ValueError:
|
|
112
|
+
return value
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def render_md(text: str, names: dict[str, str]) -> str:
|
|
116
|
+
"""Write authors as plain names and mentions as ``@name``."""
|
|
117
|
+
if not isinstance(text, str):
|
|
118
|
+
return text
|
|
119
|
+
text = _MD_AUTHOR_RE.sub(lambda m: _unescape(m.group(2)), text)
|
|
120
|
+
return render_markers(text, names)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
DISCUSSIONS_PATH = "/v3/app/worksheets/{worksheet_id}/rows/{row_id}/discussions"
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def fetch_names(
|
|
127
|
+
session: Any, worksheet_id: str, row_id: str, *, app_id: str,
|
|
128
|
+
query: dict[str, Any],
|
|
129
|
+
) -> dict[str, str]:
|
|
130
|
+
"""Names for the md form: the same page asked for again as JSON, whose
|
|
131
|
+
``mentions`` list names everyone the md text only gives ids for."""
|
|
132
|
+
params = dict(query, responseFormat="json")
|
|
133
|
+
response = session.v3_call(
|
|
134
|
+
"GET", DISCUSSIONS_PATH, app_id=app_id, query=params,
|
|
135
|
+
path_params={"worksheet_id": worksheet_id, "row_id": row_id})
|
|
136
|
+
data = response.get("data") if isinstance(response, dict) else None
|
|
137
|
+
return names_from_json((data or {}).get("discussions"))
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
MANIFEST.in
|
|
2
|
+
README.md
|
|
3
|
+
setup.py
|
|
4
|
+
hap_cli/README.md
|
|
5
|
+
hap_cli/README_CN.md
|
|
6
|
+
hap_cli/__init__.py
|
|
7
|
+
hap_cli/__main__.py
|
|
8
|
+
hap_cli/_entry.py
|
|
9
|
+
hap_cli/context.py
|
|
10
|
+
hap_cli/i18n.py
|
|
11
|
+
hap_cli.egg-info/PKG-INFO
|
|
12
|
+
hap_cli.egg-info/SOURCES.txt
|
|
13
|
+
hap_cli.egg-info/dependency_links.txt
|
|
14
|
+
hap_cli.egg-info/entry_points.txt
|
|
15
|
+
hap_cli.egg-info/requires.txt
|
|
16
|
+
hap_cli.egg-info/top_level.txt
|
|
17
|
+
hap_cli/commands/__init__.py
|
|
18
|
+
hap_cli/commands/app_cmd.py
|
|
19
|
+
hap_cli/commands/app_creator_cmd.py
|
|
20
|
+
hap_cli/commands/app_editor_cmd.py
|
|
21
|
+
hap_cli/commands/attachment_cmd.py
|
|
22
|
+
hap_cli/commands/auth_cmd.py
|
|
23
|
+
hap_cli/commands/calendar_cmd.py
|
|
24
|
+
hap_cli/commands/chart_cmd.py
|
|
25
|
+
hap_cli/commands/chat_cmd.py
|
|
26
|
+
hap_cli/commands/chatbot_cmd.py
|
|
27
|
+
hap_cli/commands/config_cmd.py
|
|
28
|
+
hap_cli/commands/contact_cmd.py
|
|
29
|
+
hap_cli/commands/department_cmd.py
|
|
30
|
+
hap_cli/commands/group_cmd.py
|
|
31
|
+
hap_cli/commands/guide_cmd.py
|
|
32
|
+
hap_cli/commands/icon_cmd.py
|
|
33
|
+
hap_cli/commands/instance_cmd.py
|
|
34
|
+
hap_cli/commands/node_cmd.py
|
|
35
|
+
hap_cli/commands/optionset_cmd.py
|
|
36
|
+
hap_cli/commands/page_cmd.py
|
|
37
|
+
hap_cli/commands/post_cmd.py
|
|
38
|
+
hap_cli/commands/record_cmd.py
|
|
39
|
+
hap_cli/commands/region_cmd.py
|
|
40
|
+
hap_cli/commands/role_cmd.py
|
|
41
|
+
hap_cli/commands/update_cmd.py
|
|
42
|
+
hap_cli/commands/upload_cmd.py
|
|
43
|
+
hap_cli/commands/v3_registry.py
|
|
44
|
+
hap_cli/commands/workflow_cmd.py
|
|
45
|
+
hap_cli/commands/worksheet_cmd.py
|
|
46
|
+
hap_cli/core/__init__.py
|
|
47
|
+
hap_cli/core/action_spec_adapter.py
|
|
48
|
+
hap_cli/core/app.py
|
|
49
|
+
hap_cli/core/attachment.py
|
|
50
|
+
hap_cli/core/auth.py
|
|
51
|
+
hap_cli/core/calendar_mod.py
|
|
52
|
+
hap_cli/core/chart.py
|
|
53
|
+
hap_cli/core/chat.py
|
|
54
|
+
hap_cli/core/chatbot.py
|
|
55
|
+
hap_cli/core/cli_access.py
|
|
56
|
+
hap_cli/core/condition_dsl.py
|
|
57
|
+
hap_cli/core/contact.py
|
|
58
|
+
hap_cli/core/control_type_codes.py
|
|
59
|
+
hap_cli/core/department.py
|
|
60
|
+
hap_cli/core/field_normalizer.py
|
|
61
|
+
hap_cli/core/field_spec_adapter.py
|
|
62
|
+
hap_cli/core/filter_translator.py
|
|
63
|
+
hap_cli/core/filter_v3.py
|
|
64
|
+
hap_cli/core/flow_node.py
|
|
65
|
+
hap_cli/core/global_meta.py
|
|
66
|
+
hap_cli/core/group.py
|
|
67
|
+
hap_cli/core/guide.py
|
|
68
|
+
hap_cli/core/icon_index.py
|
|
69
|
+
hap_cli/core/instance.py
|
|
70
|
+
hap_cli/core/layout_check.py
|
|
71
|
+
hap_cli/core/logger.py
|
|
72
|
+
hap_cli/core/optionset.py
|
|
73
|
+
hap_cli/core/page.py
|
|
74
|
+
hap_cli/core/post.py
|
|
75
|
+
hap_cli/core/record.py
|
|
76
|
+
hap_cli/core/record_defaults.py
|
|
77
|
+
hap_cli/core/record_discussions.py
|
|
78
|
+
hap_cli/core/record_form_checks.py
|
|
79
|
+
hap_cli/core/record_lookups.py
|
|
80
|
+
hap_cli/core/record_rules.py
|
|
81
|
+
hap_cli/core/relation_scope.py
|
|
82
|
+
hap_cli/core/relogin.py
|
|
83
|
+
hap_cli/core/response_crypto.py
|
|
84
|
+
hap_cli/core/role.py
|
|
85
|
+
hap_cli/core/role_perm_builder.py
|
|
86
|
+
hap_cli/core/rule_spec_adapter.py
|
|
87
|
+
hap_cli/core/session.py
|
|
88
|
+
hap_cli/core/token_crypto.py
|
|
89
|
+
hap_cli/core/update.py
|
|
90
|
+
hap_cli/core/upload.py
|
|
91
|
+
hap_cli/core/view_spec_adapter.py
|
|
92
|
+
hap_cli/core/workflow.py
|
|
93
|
+
hap_cli/core/workflow_node_dsl.py
|
|
94
|
+
hap_cli/core/worksheet.py
|
|
95
|
+
hap_cli/core/worksheet_form.py
|
|
96
|
+
hap_cli/core/worksheet_reference.py
|
|
97
|
+
hap_cli/core/worksheet_templates.py
|
|
98
|
+
hap_cli/core/app_creator/__init__.py
|
|
99
|
+
hap_cli/core/app_creator/charts.py
|
|
100
|
+
hap_cli/core/app_creator/cleanup.py
|
|
101
|
+
hap_cli/core/app_creator/compiler.py
|
|
102
|
+
hap_cli/core/app_creator/config.py
|
|
103
|
+
hap_cli/core/app_creator/errors.py
|
|
104
|
+
hap_cli/core/app_creator/executor.py
|
|
105
|
+
hap_cli/core/app_creator/fields.py
|
|
106
|
+
hap_cli/core/app_creator/hap.py
|
|
107
|
+
hap_cli/core/app_creator/merge.py
|
|
108
|
+
hap_cli/core/app_creator/schema.py
|
|
109
|
+
hap_cli/core/app_creator/selftest.py
|
|
110
|
+
hap_cli/core/app_creator/smoke.py
|
|
111
|
+
hap_cli/core/app_creator/steps.py
|
|
112
|
+
hap_cli/core/app_creator/store.py
|
|
113
|
+
hap_cli/core/app_creator/validate.py
|
|
114
|
+
hap_cli/core/app_creator/workflow_dsl.py
|
|
115
|
+
hap_cli/core/app_creator/_hapmeta/__init__.py
|
|
116
|
+
hap_cli/core/app_creator/_hapmeta/control_type_codes.py
|
|
117
|
+
hap_cli/core/app_creator/_hapmeta/worksheet_templates.py
|
|
118
|
+
hap_cli/core/app_creator/design/design.schema.json
|
|
119
|
+
hap_cli/core/app_creator/examples/minimal.design.json
|
|
120
|
+
hap_cli/core/app_creator/recording/__init__.py
|
|
121
|
+
hap_cli/core/app_creator/recording/console.py
|
|
122
|
+
hap_cli/core/app_creator/recording/jsonl.py
|
|
123
|
+
hap_cli/core/app_creator/recording/mirror.py
|
|
124
|
+
hap_cli/core/app_creator/recording/report.py
|
|
125
|
+
hap_cli/core/app_creator/seed/INSTRUCTIONS.md
|
|
126
|
+
hap_cli/core/app_creator/seed/__init__.py
|
|
127
|
+
hap_cli/core/app_creator/seed/cli.py
|
|
128
|
+
hap_cli/core/app_creator/seed/executor.py
|
|
129
|
+
hap_cli/core/app_creator/seed/template.py
|
|
130
|
+
hap_cli/core/app_creator/seed/resources/attachments.json
|
|
131
|
+
hap_cli/core/app_creator/seed/resources/sample.docx
|
|
132
|
+
hap_cli/core/app_creator/seed/resources/sample.pdf
|
|
133
|
+
hap_cli/core/app_creator/seed/resources/sample_images.json
|
|
134
|
+
hap_cli/core/editor/__init__.py
|
|
135
|
+
hap_cli/core/editor/apply.py
|
|
136
|
+
hap_cli/core/editor/componentlower.py
|
|
137
|
+
hap_cli/core/editor/editspec.py
|
|
138
|
+
hap_cli/core/editor/errors.py
|
|
139
|
+
hap_cli/core/editor/fieldlower.py
|
|
140
|
+
hap_cli/core/editor/jsonschema_mini.py
|
|
141
|
+
hap_cli/core/editor/models.py
|
|
142
|
+
hap_cli/core/editor/ops.py
|
|
143
|
+
hap_cli/core/editor/planner.py
|
|
144
|
+
hap_cli/core/editor/reader.py
|
|
145
|
+
hap_cli/core/editor/_hapmeta/__init__.py
|
|
146
|
+
hap_cli/core/editor/_hapmeta/control_type_codes.py
|
|
147
|
+
hap_cli/core/editor/editspec/component.schema.json
|
|
148
|
+
hap_cli/core/editor/editspec/custom-action.schema.json
|
|
149
|
+
hap_cli/core/editor/editspec/envelope.schema.json
|
|
150
|
+
hap_cli/core/editor/editspec/field.schema.json
|
|
151
|
+
hap_cli/core/v3/__init__.py
|
|
152
|
+
hap_cli/core/v3/dispatcher.py
|
|
153
|
+
hap_cli/core/v3/render.py
|
|
154
|
+
hap_cli/core/v3/schema.py
|
|
155
|
+
hap_cli/guide/index.json
|
|
156
|
+
hap_cli/guide/en/approval.md
|
|
157
|
+
hap_cli/guide/en/chart.md
|
|
158
|
+
hap_cli/guide/en/messages.md
|
|
159
|
+
hap_cli/guide/en/overview.md
|
|
160
|
+
hap_cli/guide/en/post.md
|
|
161
|
+
hap_cli/guide/en/record.md
|
|
162
|
+
hap_cli/guide/en/setup.md
|
|
163
|
+
hap_cli/guide/en/skills.md
|
|
164
|
+
hap_cli/guide/en/workflow.md
|
|
165
|
+
hap_cli/guide/en/worksheet.md
|
|
166
|
+
hap_cli/guide/zh-Hans/approval.md
|
|
167
|
+
hap_cli/guide/zh-Hans/chart.md
|
|
168
|
+
hap_cli/guide/zh-Hans/messages.md
|
|
169
|
+
hap_cli/guide/zh-Hans/overview.md
|
|
170
|
+
hap_cli/guide/zh-Hans/post.md
|
|
171
|
+
hap_cli/guide/zh-Hans/record.md
|
|
172
|
+
hap_cli/guide/zh-Hans/setup.md
|
|
173
|
+
hap_cli/guide/zh-Hans/skills.md
|
|
174
|
+
hap_cli/guide/zh-Hans/workflow.md
|
|
175
|
+
hap_cli/guide/zh-Hans/worksheet.md
|
|
176
|
+
hap_cli/locale/__init__.py
|
|
177
|
+
hap_cli/locale/messages.json
|
|
178
|
+
hap_cli/locale/messages.schema.json
|
|
179
|
+
hap_cli/utils/__init__.py
|
|
180
|
+
hap_cli/utils/atomic_write.py
|
|
181
|
+
hap_cli/utils/confirm.py
|
|
182
|
+
hap_cli/utils/formatting.py
|
|
183
|
+
hap_cli/utils/options.py
|
|
184
|
+
hap_cli/utils/parameter_mapping.py
|
|
185
|
+
sources/v3-api-schema/INDEX.json
|
|
186
|
+
sources/v3-api-schema/add_member_to_role.yaml
|
|
187
|
+
sources/v3-api-schema/batch_delete_records.yaml
|
|
188
|
+
sources/v3-api-schema/create_optionset.yaml
|
|
189
|
+
sources/v3-api-schema/create_role.yaml
|
|
190
|
+
sources/v3-api-schema/delete_optionset.yaml
|
|
191
|
+
sources/v3-api-schema/delete_record.yaml
|
|
192
|
+
sources/v3-api-schema/delete_role.yaml
|
|
193
|
+
sources/v3-api-schema/delete_worksheet.yaml
|
|
194
|
+
sources/v3-api-schema/get_app_info.yaml
|
|
195
|
+
sources/v3-api-schema/get_app_knowledge_list.yaml
|
|
196
|
+
sources/v3-api-schema/get_app_worksheets_list.yaml
|
|
197
|
+
sources/v3-api-schema/get_optionset_list.yaml
|
|
198
|
+
sources/v3-api-schema/get_record_details.yaml
|
|
199
|
+
sources/v3-api-schema/get_record_discussions.yaml
|
|
200
|
+
sources/v3-api-schema/get_record_list.yaml
|
|
201
|
+
sources/v3-api-schema/get_record_logs.yaml
|
|
202
|
+
sources/v3-api-schema/get_record_pivot_data.yaml
|
|
203
|
+
sources/v3-api-schema/get_record_relations.yaml
|
|
204
|
+
sources/v3-api-schema/get_record_share_link.yaml
|
|
205
|
+
sources/v3-api-schema/get_regions.yaml
|
|
206
|
+
sources/v3-api-schema/get_role_details.yaml
|
|
207
|
+
sources/v3-api-schema/get_role_list.yaml
|
|
208
|
+
sources/v3-api-schema/knowledge_search.yaml
|
|
209
|
+
sources/v3-api-schema/leave_all_roles.yaml
|
|
210
|
+
sources/v3-api-schema/remove_member_from_role.yaml
|
|
211
|
+
sources/v3-api-schema/update_optionset.yaml
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
hap_cli
|
|
@@ -21,18 +21,29 @@ def _read_version():
|
|
|
21
21
|
# V3 schemas live at <repo>/sources/v3-api-schema/*.yaml + INDEX.json
|
|
22
22
|
# (canonical for development). For wheel installs we copy them into
|
|
23
23
|
# <package>/sources/v3-api-schema/ so the runtime loader
|
|
24
|
-
# (hap_cli/core/v3/schema.py) finds them by walking up.
|
|
24
|
+
# (hap_cli/core/v3/schema.py) finds them by walking up. Only inside the
|
|
25
|
+
# package: a copy at the build root installed a top-level ``sources``
|
|
26
|
+
# directory into the user's site-packages.
|
|
25
27
|
class _CopyV3Schemas(build_py):
|
|
26
28
|
def run(self):
|
|
27
29
|
super().run()
|
|
28
30
|
repo_root = Path(__file__).parent.resolve()
|
|
29
31
|
src = repo_root / "sources" / "v3-api-schema"
|
|
30
32
|
if src.is_dir():
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
target = Path(self.build_lib) / "hap_cli" / "sources" / "v3-api-schema"
|
|
34
|
+
target.mkdir(parents=True, exist_ok=True)
|
|
35
|
+
for f in (*src.glob("*.yaml"), *src.glob("INDEX.json")):
|
|
36
|
+
shutil.copy2(f, target / f.name)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# Ship the CLI only. The test suite (a third of the package) and the
|
|
40
|
+
# repo's live-test harnesses are development tools: installing them put
|
|
41
|
+
# packages named ``live_tests`` / ``app_live_tests`` into site-packages
|
|
42
|
+
# and got a compiled test module quarantined by antivirus software.
|
|
43
|
+
_PACKAGES = find_packages(
|
|
44
|
+
include=["hap_cli", "hap_cli.*"],
|
|
45
|
+
exclude=["hap_cli.tests", "hap_cli.tests.*"],
|
|
46
|
+
)
|
|
36
47
|
|
|
37
48
|
|
|
38
49
|
setup(
|
|
@@ -43,7 +54,7 @@ setup(
|
|
|
43
54
|
long_description_content_type="text/markdown",
|
|
44
55
|
author="hap-cli",
|
|
45
56
|
license="Apache-2.0",
|
|
46
|
-
packages=
|
|
57
|
+
packages=_PACKAGES,
|
|
47
58
|
python_requires=">=3.10",
|
|
48
59
|
install_requires=[
|
|
49
60
|
"click>=8.0",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"""Repeatable live smoke tests for the hap-cli-app-editor skill.
|
|
2
|
-
|
|
3
|
-
This is a top-level, stdlib-only package (no ``test_*.py`` files, so the
|
|
4
|
-
default pytest run never collects it — mirror of ``live_tests/``). It
|
|
5
|
-
drives the *real* editor entry point (``python3 -m scripts apply`` inside
|
|
6
|
-
the skill) plus the ``hap`` binary for setup/assertions, against a
|
|
7
|
-
persistent test app that it creates on first run and reuses thereafter.
|
|
8
|
-
|
|
9
|
-
python3 -m app_live_tests smoke # run all scenarios
|
|
10
|
-
python3 -m app_live_tests cleanup # delete the persistent app
|
|
11
|
-
"""
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"""``python -m app_live_tests <smoke|cleanup> ...`` dispatch."""
|
|
2
|
-
from __future__ import annotations
|
|
3
|
-
|
|
4
|
-
import sys
|
|
5
|
-
|
|
6
|
-
_USAGE = (
|
|
7
|
-
"usage: python -m app_live_tests <command>\n"
|
|
8
|
-
" smoke [--case worksheet|field|view] run live scenarios on the persistent app\n"
|
|
9
|
-
" cleanup delete the persistent test app\n"
|
|
10
|
-
)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def main(argv: list[str] | None = None) -> int:
|
|
14
|
-
argv = list(sys.argv[1:] if argv is None else argv)
|
|
15
|
-
if not argv or argv[0] in ("-h", "--help"):
|
|
16
|
-
print(_USAGE)
|
|
17
|
-
return 0 if argv else 1
|
|
18
|
-
cmd, rest = argv[0], argv[1:]
|
|
19
|
-
if cmd == "smoke":
|
|
20
|
-
from app_live_tests.smoke import main as run
|
|
21
|
-
return run(rest)
|
|
22
|
-
if cmd == "cleanup":
|
|
23
|
-
from app_live_tests import state
|
|
24
|
-
app_id = state.delete_app()
|
|
25
|
-
print(f"deleted {app_id}" if app_id else "no persistent app to delete")
|
|
26
|
-
return 0
|
|
27
|
-
print(f"unknown command: {cmd}\n{_USAGE}", file=sys.stderr)
|
|
28
|
-
return 1
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if __name__ == "__main__":
|
|
32
|
-
raise SystemExit(main())
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"""Paths and binary config for the app_live_tests harness."""
|
|
2
|
-
from __future__ import annotations
|
|
3
|
-
|
|
4
|
-
import os
|
|
5
|
-
from pathlib import Path
|
|
6
|
-
|
|
7
|
-
# The installed CLI (PATH lookup by default; override with HAP_BIN).
|
|
8
|
-
HAP_BIN = os.environ.get("HAP_BIN", "hap")
|
|
9
|
-
|
|
10
|
-
# Python used to invoke the editor skill (defaults to the running one).
|
|
11
|
-
PYTHON_BIN = os.environ.get("HAP_EDITOR_PYTHON", "") # "" -> sys.executable
|
|
12
|
-
|
|
13
|
-
_PKG_DIR = Path(__file__).resolve().parent
|
|
14
|
-
REPO_ROOT = _PKG_DIR.parent
|
|
15
|
-
SKILL_DIR = REPO_ROOT / "skills" / "hap-cli-app-editor"
|
|
16
|
-
|
|
17
|
-
STATE_DIR = _PKG_DIR / "state"
|
|
18
|
-
STATE_FILE = STATE_DIR / "current_app.json"
|
|
19
|
-
|
|
20
|
-
TIMEOUT = int(os.environ.get("HAP_EDITOR_TIMEOUT", "120"))
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"""Long-lived live fixtures. Built once, kept, reused by later work."""
|