{
  "schemaVersion": "agent9-managed-tool-package-v1",
  "name": "managed_auto_oncall_manus",
  "version": 7,
  "description": "Manus-backed read-only evidence Tool for ticket-bound OP metrics, logs, and SQL queries. The Manus connector and credentials remain inside its isolated Tool Sandbox.",
  "parameters": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "accountAlias",
      "issueKey",
      "target",
      "operation",
      "start",
      "end"
    ],
    "properties": {
      "accountAlias": {
        "const": "Manus"
      },
      "issueKey": {
        "type": "string",
        "pattern": "^APID-[0-9]+$"
      },
      "target": {
        "enum": [
          "vida",
          "monica"
        ]
      },
      "operation": {
        "enum": [
          "metrics",
          "topsql",
          "slow_query",
          "statements",
          "logs"
        ]
      },
      "query": {
        "type": "string",
        "minLength": 1,
        "maxLength": 8192,
        "description": "PromQL authored by the Agent. Use the literal {{instance}} placeholder when instanceRef is supplied."
      },
      "queryName": {
        "type": "string",
        "maxLength": 80
      },
      "unit": {
        "type": "string",
        "maxLength": 32
      },
      "instanceRef": {
        "type": "string",
        "maxLength": 2048
      },
      "start": {
        "type": "integer"
      },
      "end": {
        "type": "integer"
      },
      "step": {
        "type": "integer",
        "minimum": 15,
        "maximum": 300
      },
      "limit": {
        "type": "integer",
        "minimum": 1,
        "maximum": 20
      },
      "component": {
        "enum": [
          "tidb",
          "tikv",
          "tiflash",
          "pd"
        ]
      },
      "level": {
        "enum": [
          "debug",
          "info",
          "warn",
          "critical",
          "error"
        ]
      },
      "keywords": {
        "type": "array",
        "maxItems": 3,
        "items": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        }
      },
      "filter": {
        "type": "string",
        "maxLength": 128
      }
    }
  },
  "entrypoint": "index.mjs",
  "entrypointSha256": "d79f7ff09da94d7b8d1a4bd1445cc88703b6deea557bb5bbca7d3b75792fdf05",
  "files": [
    {
      "path": "credential-redaction.mjs",
      "sha256": "0da0064a6a4c658ef935f4ffd25f48d7c499e9837e2e9fb7bc023359f27ed3ed"
    },
    {
      "path": "index.mjs",
      "sha256": "d79f7ff09da94d7b8d1a4bd1445cc88703b6deea557bb5bbca7d3b75792fdf05"
    },
    {
      "path": "targets.json",
      "sha256": "0498d0344fcf4df9c8fab675fbe4dc1a8305f8e86d536005cb2cae5aa8c4a5bc"
    }
  ],
  "packageSha256": "f05b12ac7f44f7697029fc774cf5c3f6f11dc22f1e0e62820f903553d9a7e845",
  "secretEnv": [
    "MANUS_GRAFANA_USERNAME",
    "MANUS_GRAFANA_PASSWORD",
    "MANUS_DASHBOARD_USERNAME",
    "MANUS_DASHBOARD_PASSWORD",
    "MANUS_MONICA_DASHBOARD_USERNAME",
    "MANUS_MONICA_DASHBOARD_PASSWORD",
    "MANUS_REFERENCE_KEY"
  ],
  "timeoutMs": 120000,
  "maxOutputBytes": 131072,
  "network": {
    "mode": "restricted",
    "allowedHosts": [
      "tidb-grafana-manus.prod.ops.butterfly-effect.dev",
      "tidb-dashboard-manus.prod.ops.butterfly-effect.dev",
      "tidb-prometheus-monica.prod.ops.butterfly-effect.dev",
      "tidb-dashboard-monica.prod.ops.butterfly-effect.dev"
    ]
  },
  "egress": []
}
