{
  "repo": "tidbcloud/aiops",
  "binary": "investibook-backend",
  "binary_path": "platform/investibook/backend/main.py",
  "surface_kind": "mixed_service",
  "type": "mixed_service",
  "extensions": {},
  "services": [
    {
      "name": "InvestibookBackendLifecycle",
      "package": "investibook.main",
      "methods": [
        {
          "name": "StartupLifespan",
          "name_key": "InvestibookBackendLifecycle.StartupLifespan",
          "input": "workspace paths + templates + runtime config + sqlite/db state",
          "output": "initialized workspace directories, migrated DB, seeded templates, loaded clinic credentials, and started evaluation scheduler",
          "type": "local"
        },
        {
          "name": "ShutdownLifespan",
          "name_key": "InvestibookBackendLifecycle.ShutdownLifespan",
          "input": "shutdown event",
          "output": "stopped scheduler and ACP sessions",
          "type": "local"
        }
      ]
    },
    {
      "name": "InvestibookBackendHTTP",
      "type": "http",
      "methods": [
        {
          "name": "GET /health",
          "name_key": "HTTP GET /health",
          "input": "health probe",
          "output": "backend health status",
          "path": "/health",
          "type": "http"
        },
        {
          "name": "POST /api/chat",
          "name_key": "HTTP POST /api/chat",
          "input": "chat request payload",
          "output": "non-streaming ACP chat response",
          "path": "/api/chat",
          "type": "http"
        },
        {
          "name": "GET /api/chat/stream",
          "name_key": "HTTP GET /api/chat/stream",
          "input": "chat stream request",
          "output": "SSE chat stream",
          "path": "/api/chat/stream",
          "type": "http"
        },
        {
          "name": "GET /api/session/new",
          "name_key": "HTTP GET /api/session/new",
          "input": "new session request",
          "output": "created session metadata",
          "path": "/api/session/new",
          "type": "http"
        },
        {
          "name": "GET /api/session/{id}/history",
          "name_key": "HTTP GET /api/session/{id}/history",
          "input": "session history request",
          "output": "stored message history",
          "path": "/api/session/{id}/history",
          "type": "http"
        },
        {
          "name": "DELETE /api/session/{id}",
          "name_key": "HTTP DELETE /api/session/{id}",
          "input": "session deletion request",
          "output": "deleted session acknowledgement",
          "path": "/api/session/{id}",
          "type": "http"
        },
        {
          "name": "GET /screenshots/*",
          "name_key": "HTTP GET /screenshots/*",
          "input": "diagnostic screenshot path",
          "output": "static screenshot asset",
          "path": "/screenshots/*",
          "type": "http"
        },
        {
          "name": "GET /workspace-screenshots/*",
          "name_key": "HTTP GET /workspace-screenshots/*",
          "input": "workspace screenshot path",
          "output": "workspace screenshot asset",
          "path": "/workspace-screenshots/*",
          "type": "http"
        }
      ]
    }
  ]
}
