{
  "repo": "tidbcloud/cloud-finops-system",
  "binary": "dbaas-ai-insights",
  "binary_path": "dbaas-ai-insights/main.py",
  "dependencies": {
    "HTTP GET /": {
      "infrastructure": {
        "bigquery": {
          "conditions": [
            "When the web app executes generated SQL"
          ],
          "operations": [
            {
              "operation": "QUERY DATA",
              "trigger": "Run resource-analysis SQL against BigQuery",
              "conditions": [
                "The GET / handler executes the generated query"
              ],
              "implementation": "google.cloud.bigquery usage in main.py"
            }
          ]
        },
        "gcs": {
          "conditions": [
            "When reading or writing prompt history"
          ],
          "operations": [
            {
              "operation": "READ / WRITE OBJECTS",
              "trigger": "Persist conversation history blobs",
              "conditions": [
                "The handler loads or uploads history"
              ],
              "implementation": "google.cloud.storage usage in main.py"
            }
          ]
        },
        "secret_manager": {
          "conditions": [
            "When loading credentials or prompt configuration"
          ],
          "operations": [
            {
              "operation": "ACCESS SECRETS",
              "trigger": "Resolve runtime secrets",
              "conditions": [
                "Secret-dependent helper code is reached"
              ],
              "implementation": "google.cloud.secretmanager usage in main.py"
            }
          ]
        },
        "openai_http": {
          "conditions": [
            "When generating completions"
          ],
          "operations": [
            {
              "operation": "POST /v1/completions",
              "trigger": "Call OpenAI to turn the question into SQL or explanations",
              "conditions": [
                "OpenAIClient.complete() is invoked"
              ],
              "implementation": "requests.post(...) in OpenAIClient.complete()"
            }
          ]
        }
      },
      "services": []
    }
  }
}
