docs(agent): update SCADA protocol docs

This commit is contained in:
2026-07-15 18:31:09 +08:00
parent 155513fdbc
commit c6231f7b00
2 changed files with 10 additions and 27 deletions
+8 -12
View File
@@ -51,7 +51,7 @@ Defaults:
```text
AGENT_LOCAL_USER_ID=local-user
AGENT_LOCAL_PROJECT_ID=<UUID returned as project_id by /api/v1/meta/projects>
AGENT_LOCAL_PROJECT_ID=<UUID returned as project_id by /api/v1/projects>
AGENT_LOCAL_NETWORK=local-network
```
@@ -63,13 +63,10 @@ enabled Server tools while `TJWATER_AUTH_MODE=disabled`.
Available domain tools:
- `get_project_context`
- `list_monitoring_assets`
- `query_monitoring_readings` with required `observed_from` and `observed_to`
- `list_scada_assets`
- `query_scada_readings` with required `observed_from` and `observed_to`
ISO8601 timestamps. The server rejects reversed or unbounded historical
queries.
- `start_data_quality_analysis` (requires approval)
- `start_simulation` (requires approval)
- `get_job_status`
Optional request headers can override the local context during experiments:
@@ -91,13 +88,12 @@ GET /api/v1/agent/chat/ui-registry
Visual opencode tools are mapped by the service:
- `show_chart` -> `chart`
- `locate_features`, `zoom_to_map`, `render_junctions`, `apply_layer_style` -> `map_action`
- `view_history`, `view_scada` -> `registered_component`
- `zoom_to_map` -> `map_action`
- `view_scada` -> `registered_component`
`view_history` opens the historical data/result panel and must include
`start_time` and `end_time` ISO8601 timestamps. Use `query_monitoring_readings`
first when the answer needs actual monitoring values; use `view_history` only to
ask the frontend to display the selected feature history panel.
Use `query_scada_readings` first when the answer needs actual SCADA values.
Use `view_scada` only to ask the frontend to display the selected SCADA asset
panel.
See [docs/agent-ui-protocol.md](docs/agent-ui-protocol.md).
+2 -15
View File
@@ -80,26 +80,13 @@ fall back to `fallbackText`.
Initial mappings:
- `show_chart` -> `chart`
- `locate_features` -> `map_action`
- `zoom_to_map` -> `map_action`
- `render_junctions` -> `map_action`
- `apply_layer_style` -> `map_action`
- `view_history` -> `registered_component: HistoryPanel`
- `view_scada` -> `registered_component: ScadaPanel`
`view_history` parameters must include `start_time` and `end_time` ISO8601
timestamps with `start_time < end_time`. When the Agent needs historical
monitoring values for analysis or a chart, it should call
`query_monitoring_readings` first, then use `view_history` only to open the
When the Agent needs historical SCADA values for a chart or explanation, it
should call `query_scada_readings` first, then use `view_scada` only to open the
frontend panel.
`render_junctions` accepts only a `render_ref`. The frontend must resolve the
full payload through:
```text
GET /api/v1/agent/chat/render-ref/:render_ref?session_id=:session_id
```
## State Persistence
Assistant messages may contain: