{
  "repo": "tidbcloud/gotty",
  "binary": "gotty",
  "binary_path": "main.go",
  "surface_kind": "http_service",
  "type": "http_service",
  "services": [
    {
      "name": "GoTTYHTTP",
      "type": "http",
      "methods": [
        {
          "name": "Index",
          "name_key": "HTTP GET /",
          "path": "/",
          "method": "GET",
          "description": "Serve the terminal web UI and static frontend assets.",
          "implementation": "server.handleIndex + server.setupHandlers"
        },
        {
          "name": "AuthToken",
          "name_key": "HTTP GET /auth_token.js",
          "path": "/auth_token.js",
          "method": "GET",
          "description": "Serve the JavaScript auth token bootstrap used by the browser client.",
          "implementation": "server.handleAuthToken"
        },
        {
          "name": "Config",
          "name_key": "HTTP GET /config.js",
          "path": "/config.js",
          "method": "GET",
          "description": "Serve terminal runtime configuration for the browser client.",
          "implementation": "server.handleConfig"
        },
        {
          "name": "TerminalWebSocket",
          "name_key": "HTTP GET /ws",
          "path": "/ws",
          "method": "GET",
          "description": "Upgrade HTTP to WebSocket and relay terminal I/O between browser and spawned command.",
          "implementation": "server.generateHandleWS + server.processWSConn"
        }
      ]
    }
  ],
  "extensions": {
    "notes": [
      "The binary is started from a CLI entrypoint but remains a long-lived HTTP/WebSocket server after startup.",
      "Every client connection spawns a local command backend and binds it to a browser terminal session."
    ]
  }
}
