Hardcode Python default empty response

This commit is contained in:
Brandon Zhang
2026-03-27 17:54:38 +08:00
parent 8a0dffbcae
commit 372e30ff6f
5 changed files with 22 additions and 25 deletions

View File

@@ -146,15 +146,14 @@ All routes are local-only and intended for `localhost` usage.
**Purpose**
- Return the next pending instruction, if one exists.
- If none exists, wait for a configurable duration, then return either an empty response or a configured default response.
- If none exists, wait for a configurable duration, then return the server-controlled default response.
- Record agent activity so the UI can infer whether an agent is currently connected/recently active.
**Suggested input schema**
```json
{
"agent_id": "optional-string",
"default_response_override": "optional-string"
"agent_id": "optional-string"
}
```
@@ -194,7 +193,7 @@ All routes are local-only and intended for `localhost` usage.
"status": "ok",
"result_type": "default_response",
"instruction": null,
"response": "No new instructions available.",
"response": "call this tool `get_user_request` again to fetch latest user input...",
"remaining_pending": 0,
"waited_seconds": 10
}
@@ -250,7 +249,7 @@ Returns current server and agent summary.
},
"settings": {
"default_wait_seconds": 10,
"default_empty_response": "No new instructions available.",
"default_empty_response": "call this tool `get_user_request` again to fetch latest user input...",
"agent_stale_after_seconds": 30
}
}
@@ -347,7 +346,7 @@ Returns editable runtime settings.
```json
{
"default_wait_seconds": 10,
"default_empty_response": "No new instructions available.",
"default_empty_response": "call this tool `get_user_request` again to fetch latest user input...",
"agent_stale_after_seconds": 30
}
```
@@ -562,7 +561,7 @@ The server starts on `http://localhost:8000` by default.
| `DB_PATH` | `data/local_mcp.sqlite3` | SQLite database path |
| `LOG_LEVEL` | `INFO` | Logging level |
| `DEFAULT_WAIT_SECONDS` | `10` | Default tool wait timeout |
| `DEFAULT_EMPTY_RESPONSE` | _(empty)_ | Default response when queue is empty |
| `DEFAULT_EMPTY_RESPONSE` | `call this tool \`get_user_request\` again to fetch latest user input...` | Default response when queue is empty |
| `AGENT_STALE_AFTER_SECONDS` | `30` | Seconds of inactivity before agent shown as idle |
| `MCP_STATELESS` | `true` | `true` for stateless sessions (survives restarts, recommended); `false` for stateful |
| `API_TOKEN` | _(empty)_ | When set, all `/api/*` and `/mcp` requests require `Authorization: Bearer <token>`; web UI prompts for the token on first load |