← 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
text string
strict boolean = true

Output

PropertyType Req
pass boolean
violations array
sanitizedText string
Raw JSON Schema

inputSchema

{
  "type": "object",
  "required": [
    "text"
  ],
  "properties": {
    "text": {
      "type": "string"
    },
    "strict": {
      "type": "boolean",
      "default": true
    }
  }
}

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"
    }
  }
}