{
  "version": 1,
  "compaction": {
    "mode": "ask"
  },
  "detection": {
    "enabled": false,
    "model": {
      "endpoint": "http://127.0.0.1:8080/v1/systemone",
      "apiKeyEnv": "PI_PROTECTER_SYSTEMONE_KEY",
      "concurrency": 4,
      "timeoutMs": 30000,
      "imageTimeoutMs": 120000
    },
    "action": "log",
    "onError": "block",
    "targets": {
      "input": true,
      "toolResults": true,
      "request": true
    },
    "images": true,
    "maxChars": 4000,
    "maxChunks": 8,
    "maxImageBytes": 8388608,
    "rules": [
      {
        "id": "credential",
        "instructions": "Does the content contain an actual secret credential value, such as a literal password, API key, access token, private key, or a connection string with an embedded password? Variable names, environment variable references and placeholders without the real value do not count.",
        "threshold": 0.8,
        "action": "block"
      },
      {
        "id": "pii",
        "instructions": "Does the content contain personal information of a real person, such as a national ID number, phone number, home address, bank card number, or personal email address?",
        "threshold": 0.8
      },
      {
        "id": "id-document",
        "instructions": "Does the content show an identity document, passport, driver's license, bank card or similar personal certificate, or its number?",
        "threshold": 0.85,
        "action": "block"
      },
      {
        "id": "internal",
        "instructions": "Does the content reveal internal infrastructure details such as private IP addresses, internal hostnames, or internal system URLs?",
        "threshold": 0.85
      },
      {
        "id": "business",
        "instructions": "内容是否包含未公开的商业机密，例如合同金额、客户名单、未发布的财务数据或产品路线图？公开信息和普通技术讨论不算。",
        "threshold": 0.85,
        "images": false
      }
    ]
  },
  "sensitiveWords": [
    "张三",
    {
      "type": "literal",
      "value": "Apple Inc.",
      "replacement": "Alphabet Inc."
    },
    {
      "type": "literal",
      "value": "example-private-key-123",
      "replacement": "MyPrivateKey"
    },
    {
      "type": "literal",
      "value": "replace-with-your-real-password"
    },
    {
      "type": "regex",
      "pattern": "https?://[^\\s\\\"<>/:]+",
      "flags": "i"
    },
    {
      "type": "literal",
      "value": "vpn.internal.example",
      "replacement": "gateway.internal.example"
    },
    {
      "type": "regex",
      "pattern": "(?<![\\w.-])(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+(?:corp|internal|intra|lan|local)(?![\\w.-])",
      "flags": "i"
    },
    {
      "type": "regex",
      "pattern": "(?<![\\w.-])[A-Za-z0-9._%+-]+@[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\.[A-Za-z]{2,}(?![\\w.-])"
    },
    {
      "type": "regex",
      "pattern": "(?<![\\w.])(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?![\\w.])"
    },
    {
      "type": "regex",
      "pattern": "(?<![\\w:.])(?:[0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4}(?![\\w:.])"
    },
    {
      "type": "regex",
      "pattern": "(?<![\\w:.])(?:[0-9A-Fa-f]{1,4}:){1,6}:(?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4}){0,5})?(?![\\w:.])"
    },
    {
      "type": "regex",
      "pattern": "(?<!\\d)1[3-9]\\d{9}(?!\\d)"
    },
    {
      "type": "regex",
      "pattern": "(?<![0-9A-Za-z])\\d{17}[0-9Xx](?![0-9A-Za-z])"
    },
    {
      "type": "regex",
      "pattern": "(?<=Bearer )[A-Za-z0-9._~+/-]{16,}={0,2}",
      "flags": "i"
    }
  ]
}
