Documentos de Decision Gate

Evaluación de puertas determinista, reproducible con decisiones auditables.

Documentación de Asset Core

providercontractget

Obtén el JSON del contrato del proveedor canónico y el hash para un proveedor.

Notas clave

  • Devuelve el contrato del proveedor tal como lo carga el servidor MCP.
  • Incluye un hash canónico para auditoría y reproducibilidad.
  • Sujeto a la política de divulgación del proveedor y autorización.

Entradas

  • provider_id (required): Identificador del proveedor.

Esquema de Entrada

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "provider_id": {
      "description": "Provider identifier.",
      "type": "string"
    }
  },
  "required": [
    "provider_id"
  ],
  "type": "object"
}

Salidas

  • contrato (requerido): Tipo: object.
  • contract_hash (requerido): Tipo: object.
  • provider_id (required): Identificador del proveedor.
  • source (required): Origen de la fuente del contrato.
  • version (requerido): Etiqueta de versión de contrato opcional.

Esquema de Salida

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "contract": {
      "additionalProperties": false,
      "properties": {
        "checks": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "allowed_comparators": {
                "description": "Comparator allow-list for this check.",
                "items": {
                  "description": "Comparator applied to evidence values.",
                  "enum": [
                    "equals",
                    "not_equals",
                    "greater_than",
                    "greater_than_or_equal",
                    "less_than",
                    "less_than_or_equal",
                    "lex_greater_than",
                    "lex_greater_than_or_equal",
                    "lex_less_than",
                    "lex_less_than_or_equal",
                    "contains",
                    "in_set",
                    "deep_equals",
                    "deep_not_equals",
                    "exists",
                    "not_exists"
                  ],
                  "type": "string"
                },
                "type": "array"
              },
              "anchor_types": {
                "description": "Anchor types emitted by this check.",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "check_id": {
                "description": "Check identifier.",
                "type": "string"
              },
              "content_types": {
                "description": "Content types for check output.",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "description": {
                "description": "Check description.",
                "type": "string"
              },
              "determinism": {
                "description": "Determinism classification for provider checks.",
                "enum": [
                  "deterministic",
                  "time_dependent",
                  "external"
                ],
                "type": "string"
              },
              "examples": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "description": {
                      "description": "Short example description.",
                      "type": "string"
                    },
                    "params": {
                      "description": "Example params payload.",
                      "type": [
                        "null",
                        "boolean",
                        "number",
                        "string",
                        "array",
                        "object"
                      ]
                    },
                    "result": {
                      "description": "Example result value.",
                      "type": [
                        "null",
                        "boolean",
                        "number",
                        "string",
                        "array",
                        "object"
                      ]
                    }
                  },
                  "required": [
                    "description",
                    "params",
                    "result"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "params_required": {
                "description": "Whether params are required for this check.",
                "type": "boolean"
              },
              "params_schema": {
                "description": "JSON schema for check params.",
                "type": [
                  "null",
                  "boolean",
                  "number",
                  "string",
                  "array",
                  "object"
                ]
              },
              "result_schema": {
                "description": "JSON schema for check result values.",
                "type": [
                  "null",
                  "boolean",
                  "number",
                  "string",
                  "array",
                  "object"
                ]
              }
            },
            "required": [
              "check_id",
              "description",
              "determinism",
              "params_required",
              "params_schema",
              "result_schema",
              "allowed_comparators",
              "anchor_types",
              "content_types",
              "examples"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "config_schema": {
          "description": "Provider configuration schema.",
          "type": [
            "null",
            "boolean",
            "number",
            "string",
            "array",
            "object"
          ]
        },
        "description": {
          "description": "Provider description.",
          "type": "string"
        },
        "name": {
          "description": "Provider display name.",
          "type": "string"
        },
        "notes": {
          "description": "Provider notes and guidance.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "provider_id": {
          "description": "Provider identifier.",
          "type": "string"
        },
        "transport": {
          "description": "Provider transport kind.",
          "enum": [
            "builtin",
            "mcp"
          ],
          "type": "string"
        }
      },
      "required": [
        "provider_id",
        "name",
        "description",
        "transport",
        "config_schema",
        "checks",
        "notes"
      ],
      "type": "object"
    },
    "contract_hash": {
      "additionalProperties": false,
      "properties": {
        "algorithm": {
          "enum": [
            "sha256"
          ],
          "type": "string"
        },
        "value": {
          "description": "Lowercase hex digest.",
          "type": "string"
        }
      },
      "required": [
        "algorithm",
        "value"
      ],
      "type": "object"
    },
    "provider_id": {
      "description": "Provider identifier.",
      "type": "string"
    },
    "source": {
      "description": "Contract source origin.",
      "enum": [
        "builtin",
        "file"
      ],
      "type": "string"
    },
    "version": {
      "description": "Optional contract version label.",
      "oneOf": [
        {
          "type": "null"
        },
        {
          "type": "string"
        }
      ]
    }
  },
  "required": [
    "provider_id",
    "contract",
    "contract_hash",
    "source",
    "version"
  ],
  "type": "object"
}

Ejemplos

Obtén el JSON del contrato para un proveedor.

Entrada:

{
  "provider_id": "json"
}

Output:

{
  "contract": {
    "checks": [],
    "config_schema": {
      "additionalProperties": false,
      "type": "object"
    },
    "description": "Reads JSON or YAML files and evaluates JSONPath.",
    "name": "JSON Provider",
    "notes": [],
    "provider_id": "json",
    "transport": "builtin"
  },
  "contract_hash": {
    "algorithm": "sha256",
    "value": "5c3a5b6bce0f4a2c9e22c4fa6a1e6d8d90b0f2dfed1b7f1e9b3d3b3d1f0c9b21"
  },
  "provider_id": "json",
  "source": "builtin",
  "version": null
}