Develop and update plugins for the mochi_htf project. Use when the user asks to create, modify, debug, or document plugins in plugins/, add plugin actions, wire config/self_check, return result.artifacts, add plugin testcases, or fix plugin-report compatibility.
Implement plugin-related changes in mochi_htf with minimal breakage and predictable behavior across:
mochi_htf project:plugins/, testcases/, mochi_htf/plugin_manager.py exist.插件开发文档.md at repository root.mochi_htf/plugin_manager.py__htf_context): mochi_htf/executor.pyweb/report.htmlmochi_htf/reporting.pyplugins/<plugin_name>.py.class Plugin + create_plugin().actions() aligned with real run() branches.testcases/*.json to demonstrate new action(s).python -m py_compile for changed Python files.README.md使用说明.md硬件测试框架_规格v1.mdrun(action: str, params: dict) -> Anynameactions()default_config()config_schema()set_config(config)self_check(...)params as user business parameters.params.__htf_context is framework-reserved runtime context (auto-injected).__htf_context manually.__htf_* keys.result.artifacts: [] for displayable artifacts.imagelogcsvwaveformmetricmetric quick shape{
"artifacts": [
{"type": "metric", "name": "voltage", "value": 13.5, "unit": "V"}
]
}
Multi-channel metric:
{
"artifacts": [
{
"type": "metric",
"items": [
{"name": "CH1_voltage", "value": 13.5, "unit": "V"},
{"name": "CH2_voltage", "value": 13.3, "unit": "V"}
]
}
]
}
plugins/.name, actions(), run().default_config/config_schema/set_config/self_check.testcases/.actions() and run() together.artifacts[] instead of custom ad-hoc top-level fields.reports/<run_id>/artifacts/ and return path/url.actions().run() exceptions and timeout behavior.default_config + saved config)./api/plugins.