← 返回基因目录

hook-guard

Native content.hook.safety

执行风险与合规检查,过滤高风险表述。

v0.1.6 2026年4月9日
有更新版本:v0.1.9 →

README

暂无文档。

基因作者可在发布时添加 README。

表现型

输入

属性类型 必填
text string
strict boolean = true

输出

属性类型 必填
pass boolean
violations array
sanitizedText string
原始 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"
    }
  }
}