跳转至

Vigolium API Reference — Diagnostics

GET /api/diagnostics — System Readiness Check

返回 a diagnostic report checking database connectivity, agent provider readiness, third-party tools, and directory configuration. Useful for verifying the scanner is ready to operate before starting scans.

Auth: Viewer (requires Bearer token)

curl -s -H "Authorization: Bearer $TOKEN" http://localhost:9002/api/diagnostics | jq .
{
  "status": "degraded",
  "timestamp": "2026-03-29T03:40:08+08:00",
  "database": {
    "status": "ok",
    "message": "driver=sqlite"
  },
  "queue": {
    "status": "ok",
    "message": "depth=0"
  },
  "agent": {
    "status": "ok",
    "name": "claude",
    "binary": "/opt/homebrew/bin/claude",
    "protocol": "sdk"
  },
  "browser": {
    "status": "warning",
    "message": "disabled in config"
  },
  "tools": {
    "chromium": {
      "status": "ok",
      "path": "/opt/homebrew/bin/chromium"
    }
  },
  "templates_dir": {
    "status": "ok",
    "message": "path=~/.vigolium/prompts, templates=38"
  },
  "sessions_dir": {
    "status": "ok",
    "message": "path=~/.vigolium/agent-sessions, writable=true"
  }
}

Top-Level Status

Value Meaning
ready All checks passed
degraded Some non-critical checks failed (e.g., optional tool missing, browser disabled)
not_ready Critical checks failed (database or agent unavailable)

Check Statuses

Each individual check returns one of: ok, warning, error.

Checks Performed

Check Critical Description
database Yes Pings the database with a 2s timeout
agent Yes 解析 配置的 olium provider and confirms credentials are available
queue No Reports queue depth and error counts
browser No 检查 agent-browser binary 如果启用 in config
tools.chromium No 检查 for chromium/chrome binary (fallbacks: chromium-browser, google-chrome, google-chrome-stable)
templates_dir No 验证 prompt templates directory exists and contains .md files
sessions_dir No 验证 agent sessions directory exists and is writable

CLI Equivalent

The same checks are available 通过 the CLI without a running server:

# Colored console output
vigolium doctor

# JSON output
vigolium doctor --json

The CLI version omits the queue check since the queue is only available when the server is running.