وثائق بوابة القرار

تقييم بوابة حتمي وقابل لإعادة التشغيل مع قرارات قابلة للتدقيق.

وثائق Asset Core

typedprovidersregister

تسجيل عقد مزود مكتوب مسبقًا + ملفات تعريف وقت التشغيل.

ملاحظات رئيسية

  • يتطلب حقول tenant_id و namespace_id.
  • يتحقق من اتساق هوية الناقل/المزود المدخلة.
  • يتحقق من سلامة ملخص ملف تعريف وقت التشغيل قبل التسجيل.
  • يسجل بيانات دورة حياة النسخة ويفعل النسخة بشكل اختياري.

مدخلات

  • activate (اختياري): قم بتفعيل هذه النسخة بعد التسجيل.
  • عقد (مطلوب): النوع: كائن.
  • namespace_id (مطلوب): معرف مساحة الاسم.
  • provider_id (مطلوب): معرف المزود المكتوب.
  • runtime_profile (مطلوب): عنصر ملف تعريف وقت التشغيل المخصص.
  • tenant_id (مطلوب): معرف المستأجر.
  • version (مطلوب): معرف إصدار دورة الحياة.

مخطط الإدخال

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "activate": {
      "description": "Activate this version after registration.",
      "type": "boolean"
    },
    "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",
            "typed"
          ],
          "type": "string"
        }
      },
      "required": [
        "provider_id",
        "name",
        "description",
        "transport",
        "config_schema",
        "checks",
        "notes"
      ],
      "type": "object"
    },
    "namespace_id": {
      "description": "Namespace identifier.",
      "minimum": 1,
      "type": "integer"
    },
    "provider_id": {
      "description": "Typed provider identifier.",
      "type": "string"
    },
    "runtime_profile": {
      "description": "Typed runtime profile artifact.",
      "type": [
        "null",
        "boolean",
        "number",
        "string",
        "array",
        "object"
      ]
    },
    "tenant_id": {
      "description": "Tenant identifier.",
      "minimum": 1,
      "type": "integer"
    },
    "version": {
      "description": "Lifecycle version identifier.",
      "type": "string"
    }
  },
  "required": [
    "tenant_id",
    "namespace_id",
    "provider_id",
    "version",
    "contract",
    "runtime_profile"
  ],
  "type": "object"
}

المخرجات

  • active_version (مطلوب): واحدة من نسختين من المخطط.
  • contract_hash (مطلوب): النوع: object.
  • operation_count (مطلوب): النوع: عدد صحيح.
  • profile_digest (مطلوب): النوع: كائن.
  • provider_id (مطلوب): معرف المزود المكتوب.
  • register_outcome (مطلوب): نتيجة تسجيل دورة حياة الملف الشخصي المطبوع.
  • source_digest (مطلوب): النوع: كائن.
  • version (مطلوب): معرف إصدار دورة الحياة.

مخطط الإخراج

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "active_version": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "description": "Current active lifecycle version.",
          "type": "string"
        }
      ]
    },
    "contract_hash": {
      "additionalProperties": false,
      "properties": {
        "algorithm": {
          "enum": [
            "sha256"
          ],
          "type": "string"
        },
        "value": {
          "description": "Lowercase hex digest.",
          "type": "string"
        }
      },
      "required": [
        "algorithm",
        "value"
      ],
      "type": "object"
    },
    "operation_count": {
      "minimum": 0,
      "type": "integer"
    },
    "profile_digest": {
      "additionalProperties": false,
      "properties": {
        "algorithm": {
          "enum": [
            "sha256"
          ],
          "type": "string"
        },
        "value": {
          "description": "Lowercase hex digest.",
          "type": "string"
        }
      },
      "required": [
        "algorithm",
        "value"
      ],
      "type": "object"
    },
    "provider_id": {
      "description": "Typed provider identifier.",
      "type": "string"
    },
    "register_outcome": {
      "description": "Typed profile lifecycle registration outcome.",
      "enum": [
        "registered",
        "already_registered"
      ],
      "type": "string"
    },
    "source_digest": {
      "additionalProperties": false,
      "properties": {
        "algorithm": {
          "enum": [
            "sha256"
          ],
          "type": "string"
        },
        "value": {
          "description": "Lowercase hex digest.",
          "type": "string"
        }
      },
      "required": [
        "algorithm",
        "value"
      ],
      "type": "object"
    },
    "version": {
      "description": "Lifecycle version identifier.",
      "type": "string"
    }
  },
  "required": [
    "provider_id",
    "version",
    "register_outcome",
    "active_version",
    "source_digest",
    "profile_digest",
    "contract_hash",
    "operation_count"
  ],
  "type": "object"
}

أمثلة

تسجيل فنون مزود مكتوبة مسبقًا.

مدخل:

{
  "activate": false,
  "contract": {
    "checks": [],
    "config_schema": {
      "additionalProperties": false,
      "type": "object"
    },
    "description": "Typed API provider",
    "name": "Asset API",
    "notes": [],
    "provider_id": "asset_api",
    "transport": "typed"
  },
  "namespace_id": 1,
  "provider_id": "asset_api",
  "runtime_profile": {
    "anchors": {
      "anchor_type": "typed_request"
    },
    "operations": [
      {
        "allowed_status_codes": [
          200
        ],
        "auth": {
          "alternatives": [
            {
              "kind": "none"
            }
          ]
        },
        "bindings": [],
        "check_id": "listAssets",
        "content_types": [
          "application/json"
        ],
        "extraction": {
          "kind": "json_body"
        },
        "method": "GET",
        "operation_id": "listAssets",
        "target": "https://api.example.com/assets"
      }
    ],
    "profile_digest": {
      "algorithm": "sha256",
      "value": "5c3a5b6bce0f4a2c9e22c4fa6a1e6d8d90b0f2dfed1b7f1e9b3d3b3d1f0c9b21"
    },
    "profile_version": "typed-runtime-v4",
    "protocol": "openapi_http",
    "provider_id": "asset_api",
    "security": {
      "allow_http": false,
      "allow_private_networks": false,
      "allowed_hosts": null,
      "max_response_bytes": 1048576,
      "outbound_max_inflight": 32,
      "retry": {
        "initial_backoff_ms": 100,
        "max_attempts": 3,
        "max_backoff_ms": 2000
      },
      "timeout_ms": 5000
    },
    "source_digest": {
      "algorithm": "sha256",
      "value": "5c3a5b6bce0f4a2c9e22c4fa6a1e6d8d90b0f2dfed1b7f1e9b3d3b3d1f0c9b21"
    }
  },
  "tenant_id": 1,
  "version": "2026-02-17.2"
}

Output:

{
  "active_version": null,
  "contract_hash": {
    "algorithm": "sha256",
    "value": "5c3a5b6bce0f4a2c9e22c4fa6a1e6d8d90b0f2dfed1b7f1e9b3d3b3d1f0c9b21"
  },
  "operation_count": 1,
  "profile_digest": {
    "algorithm": "sha256",
    "value": "5c3a5b6bce0f4a2c9e22c4fa6a1e6d8d90b0f2dfed1b7f1e9b3d3b3d1f0c9b21"
  },
  "provider_id": "asset_api",
  "register_outcome": "registered",
  "source_digest": {
    "algorithm": "sha256",
    "value": "5c3a5b6bce0f4a2c9e22c4fa6a1e6d8d90b0f2dfed1b7f1e9b3d3b3d1f0c9b21"
  },
  "version": "2026-02-17.2"
}