chore: disable external and frontend tools

This commit is contained in:
2026-07-20 17:27:46 +08:00
parent c6231f7b00
commit 72019ac1f2
31 changed files with 63 additions and 899 deletions
+10 -24
View File
@@ -13,8 +13,8 @@ real auth provider through `src/context/`.
- No required `Authorization` or `X-Project-Id` headers.
- No `cli/`, no `tjwater_cli` opencode tool, no free-form CLI command bridge.
- Agent visual output is expressed through `agent-ui@1` UIEnvelope events.
- Backend business data is available through typed, allowlisted domain tools.
Arbitrary URLs, SQL, shell commands, and filesystem paths remain unavailable.
- Tools that depend on the TJWater Server are disabled. Arbitrary URLs, SQL,
shell commands, and filesystem paths remain unavailable.
## Main API
@@ -51,22 +51,14 @@ Defaults:
```text
AGENT_LOCAL_USER_ID=local-user
AGENT_LOCAL_PROJECT_ID=<UUID returned as project_id by /api/v1/projects>
AGENT_LOCAL_PROJECT_ID=local-project
AGENT_LOCAL_NETWORK=local-network
```
Local domain tools are enabled by default. Set `TJWATER_API_BASE_URL` to the
Server address and `AGENT_LOCAL_PROJECT_ID` to an enabled project UUID. Setting
`TJWATER_API_ENABLED=false` disables all Server calls. Production startup rejects
enabled Server tools while `TJWATER_AUTH_MODE=disabled`.
Available domain tools:
- `get_project_context`
- `list_scada_assets`
- `query_scada_readings` with required `observed_from` and `observed_to`
ISO8601 timestamps. The server rejects reversed or unbounded historical
queries.
Monitoring time-series data is read from the agent project's `source/`
directory and analyzed through validated local skills. `get_project_context`,
`list_scada_assets`, `query_scada_readings`, `web_search`, and `geocode` are not
exposed because they depend on the TJWater Server.
Optional request headers can override the local context during experiments:
@@ -85,15 +77,9 @@ The registry is exposed at:
GET /api/v1/agent/chat/ui-registry
```
Visual opencode tools are mapped by the service:
- `show_chart` -> `chart`
- `zoom_to_map` -> `map_action`
- `view_scada` -> `registered_component`
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.
No visual or frontend-action tools are currently exposed to the Agent. The
registry endpoints remain available for protocol compatibility and return no
registered charts, components, or actions.
See [docs/agent-ui-protocol.md](docs/agent-ui-protocol.md).