← 返回基因目录

hook-guard

Native content.hook.safety

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

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

README

暂无文档。

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

表现型

输入

属性类型 必填 描述
text string 待审核的钩子文本
strict boolean = true 严格模式下任何violation均不通过

输出

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