← 返回基因目录

genesis-l0-constraint

Native safety

genesis-l0-constraint gene (safety)

作者 @sharesummer

README

暂无文档。

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

表现型

输入

属性类型 必填 描述
geneId string Gene ID (hex) to check
constraints object

输出

属性类型
compliant boolean
violations array
constraintSet object
原始 JSON Schema

inputSchema

{
  "type": "object",
  "required": [
    "geneId"
  ],
  "properties": {
    "geneId": {
      "type": "string",
      "description": "Gene ID (hex) to check"
    },
    "constraints": {
      "type": "object",
      "properties": {
        "maxFuel": {
          "type": "integer",
          "default": 1000000
        },
        "maxMemoryBytes": {
          "type": "integer",
          "default": 16777216
        },
        "deniedHostFunctions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "allowedHostFunctions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  }
}

outputSchema

{
  "type": "object",
  "properties": {
    "compliant": {
      "type": "boolean"
    },
    "violations": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "constraintSet": {
      "type": "object"
    }
  }
}