feat: add SceneKind::Monitoring and scene_kind_hint param to analyzer
- Add SceneKind::Monitoring enum variant with from_str/as_str helpers - Add analyze_scene_source_with_hint function accepting optional scene kind hint - User hint takes priority over meta tag, defaults to ReportCollection - ReportCollection requires target_url, expected_domain, entry_script - Monitoring type has optional fields - Add test cases for hint parameter behavior - Update non_report fixture with required meta tags for ReportCollection 🤖 Generated with [Qoder][https://qoder.com]
This commit is contained in:
15
tests/fixtures/generated_scene/non_report/index.html
vendored
Normal file
15
tests/fixtures/generated_scene/non_report/index.html
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>普通门户页面</title>
|
||||
<!-- No sgclaw-scene-kind meta tag - user must specify via hint -->
|
||||
<meta name="sgclaw-tool-kind" content="browser_script">
|
||||
<meta name="sgclaw-target-url" content="http://example.com/dashboard">
|
||||
<meta name="sgclaw-expected-domain" content="example.com">
|
||||
<meta name="sgclaw-entry-script" content="js/monitor.js">
|
||||
</head>
|
||||
<body>
|
||||
<button>打开菜单</button>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user