← Back to Gene Catalog

hook-guard

Native content.hook.safety

安全合规过滤:硬拦截违规词(金融/医疗/虚假承诺)+ 高风险心理触发检测,保障钩子内容合规输出。

README

No documentation yet.

Gene authors can add a README when publishing.

Phenotype

Input

PropertyType Req Description
text string 待审核的钩子文本
strict boolean = true 严格模式下任何violation均不通过

Output

PropertyType Req
pass boolean
violations array
sanitizedText string
Raw JSON Schema

inputSchema

{
  "type": "object",
  "required": [
    "text"
  ],
  "properties": {
    "text": {
      "type": "string",
      "description": "待审核的钩子文本"
    },
    "strict": {
      "type": "boolean",
      "default": true,
      "description": "严格模式下任何violation均不通过"
    }
  }
}

outputSchema

{
  "type": "object",
  "required": [
    "pass",
    "violations"
  ],
  "properties": {
    "pass": {
      "type": "boolean"
    },
    "violations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "riskLevel": {
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "type": "string"
          }
        }
      }
    },
    "sanitizedText": {
      "type": "string"
    }
  }
}