> ## Documentation Index
> Fetch the complete documentation index at: https://docs.truthlocks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# الإبلاغ عن شذوذ

> الإبلاغ عن شذوذ سلوكي تم اكتشافه في نشاط وكيل الذكاء الاصطناعي.

يبلغ عن شذوذ سلوكي تم اكتشافه في نشاط وكيل الذكاء الاصطناعي. الشذوذ هو ملاحظات تم وضع علامة عليها تشير إلى أن الوكيل قد يعمل خارج نطاق سلوكه المتوقع - مثل الارتفاعات المفاجئة في المعدل، أو انتهاكات النطاق، أو انخفاض نقاط الثقة، أو شذوذ الوصول الجغرافي.

تنشئ تقارير الشذوذ تنبيهات قابلة للتنفيذ لفرق الأمن ويمكن أن تؤدي إلى سياسات استجابة آلية (مثل التقييد، أو إلغاء الجلسة، أو تعليق الوكيل) اعتمادًا على الخطورة وتكوين المستأجر.

### أنواع الشذوذ

| النوع | الوصف |
| :- | :- |
| `rate_spike` | يتجاوز معدل طلبات الوكيل بشكل كبير خط الأساس التاريخي |
| `scope_violation` | حاول الوكيل الوصول إلى مورد خارج نطاقاته الممنوحة |
| `trust_drop` | انخفضت درجة ثقة الوكيل المحسوبة إلى ما دون الحد الأدنى |
| `pattern_deviation` | نمط سلوك الوكيل ينحرف عن خط الأساس المدرب عليه |
| `geographic_anomaly` | تم الوصول إلى الوكيل من موقع جغرافي غير متوقع أو نطاق IP |

### مستويات الخطورة

| الخطورة | اتفاقية مستوى الخدمة | الاستجابة التلقائية |
| :- | :- | :- |
| `low` | مراجعة 24 ساعة | مسجل فقط |
| `medium` | مراجعة 4 ساعات | تم تقييد الوكيل |
| `high` | مراجعة ساعة واحدة | الجلسات معلقة |
| `critical` | مراجعة 15 دقيقة | تم إلغاء الوكيل بانتظار التحقيق |

### الاستجابة

**id** `string`

معرف شذوذ فريد بتنسيق MAIP (`maip-anom:ULID`).

**agent\_id** `string`

الوكيل المرتبط بالشذوذ.

**anomaly\_type** `string`

نوع الشذوذ المبلغ عنه.

**severity** `string`

مستوى الخطورة.

**status** `string`

حالة الشذوذ. دائمًا `open` عند الإنشاء.

**auto\_response** `string`

إجراء الاستجابة الآلي المتخذ (إن وجد)، بناءً على الخطورة وسياسة المستأجر.

**created\_at** `string`

طابع زمني ISO 8601 للإنشاء.


## OpenAPI

````yaml ar/mint-openapi.yaml POST /v1/agents/{agentId}/anomalies
openapi: 3.0.3
info:
  title: Truthlocks API
  description: >
    Truthlocks هي بنية تحتية عالمية للتحقق من المستندات وبيانات الاعتماد والأصول
    الرقمية.يحدد هذا المواصفات واجهة برمجة التطبيقات (API) الأساسية للتفاعل مع
    خدمات Truthlocks.


    ## عناوين URL الأساسية

    - **الإنتاج**: `https://api.truthlocks.com`

    - **البيئة التجريبية (Sandbox)**: `https://sandbox-api.truthlocks.com`


    ## المصادقة

    - **مفاتيح API**: استخدم رأس `X-API-Key` للعمليات من جهاز إلى جهاز

    - **رموز Bearer**: استخدم `Authorization: Bearer <jwt>` للعمليات التي يبدأها
    المستخدم


    ## هوية المستأجر

    في بيئة الإنتاج، تُستمد هوية المستأجر من السياق المصادق عليه (مفتاح API أو
    JWT).

    يتم تجاهل رأس `X-Tenant-ID` في بيئة الإنتاج لمنع الانتحال.
  version: 1.0.0
  contact:
    name: Truthlocks Support
    url: https://truthlocks.com/support
    email: support@truthlocks.com
servers:
  - url: https://api.truthlocks.com
    description: واجهة برمجة تطبيقات الإنتاج
  - url: https://sandbox-api.truthlocks.com
    description: بيئة اختبار (Sandbox)
security:
  - APIKey: []
  - BearerAuth: []
tags:
  - name: Authentication
    description: إدارة مفاتيح ورموز API
  - name: Issuers
    description: تسجيل المصدر وإدارة الثقة
  - name: Keys
    description: إدارة المفاتيح التشفيرية لجهات الإصدار
  - name: Attestations
    description: دورة حياة الإشهاد (السك، الإلغاء، الاستبدال)
  - name: Verification
    description: حزم التحقق والإثبات للإشهاد
  - name: Governance
    description: سير عمل حوكمة المصدر (للمسؤول فقط)
  - name: Identity
    description: إدارة المنظمة والمستخدمين والأدوار
  - name: Audit
    description: استعلامات أحداث التدقيق
  - name: Tenant Console
    description: ملف تعريف المستأجر ونقاط نهاية دورة الحياة
  - name: Health
    description: نقاط نهاية صحة الخدمة وجاهزيتها
  - name: Risk
    description: استيعاب إشارة المخاطر واكتشاف الاحتيال
  - name: Risk Enforcement
    description: إجراءات إنفاذ المخاطر — الحظر والتحدي والحجر والتكوين
  - name: Billing
    description: إدارة الفوترة والاشتراكات والإضافات
  - name: Machine Identity
    description: >-
      بروتوكول هوية وكيل الآلة (MAIP) — تسجيل الوكيل، الجلسات، الثقة، الشهادة،
      الامتثال، التنسيق، والمراقبة
externalDocs:
  description: واجهة برمجة تطبيقات الشفافية للقراءة فقط (مواصفات خدمة منفصلة)
  url: >-
    https://github.com/truthlocks/truthlock/blob/main/docs/transparency/openapi.yaml
paths:
  /v1/agents/{agentId}/anomalies:
    post:
      tags:
        - Machine Identity
      summary: الإبلاغ عن شذوذ
      description: |
        يبلغ عن شذوذ سلوكي أو أمني تم اكتشافه لوكيل.
        يتم تتبع الشذوذ وقد يؤثر على درجة ثقة الوكيل.
      operationId: maip.anomalies.report
      parameters:
        - name: agentId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: معرف الوكيل
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                actual_value:
                  nullable: true
                  type: number
                anomaly_score:
                  type: number
                anomaly_type:
                  type: string
                  description: >-
                    التصنيف (مثل scope_escalation، unusual_volume،
                    auth_failure_burst)
                baseline_value:
                  nullable: true
                  type: number
                description:
                  type: string
                  description: وصف مقروء بشريًا للشذوذ
              type: object
              required:
                - anomaly_type
      responses:
        '201':
          description: تم الإبلاغ عن شذوذ
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MaipAnomaly'
        '400':
          description: خطأ في التحقق
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: المصادقة مطلوبة
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: لم يتم العثور على الوكيل
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: تجاوز حد المعدل
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      security:
        - APIKey: []
components:
  schemas:
    MaipAnomaly:
      type: object
      properties:
        anomaly_id:
          type: string
          format: uuid
        agent_id:
          type: string
          format: uuid
        anomaly_type:
          type: string
        severity:
          type: string
          enum:
            - low
            - medium
            - high
            - critical
        details:
          type: object
          additionalProperties: true
        status:
          type: string
          enum:
            - open
            - investigating
            - resolved
            - dismissed
        resolution:
          type: string
        resolved_by:
          type: string
        created_at:
          type: string
          format: date-time
        resolved_at:
          type: string
          format: date-time
    ErrorEnvelope:
      type: object
      required:
        - code
        - message
        - http_status
      properties:
        code:
          type: string
          description: رمز خطأ قابل للقراءة آليًا
          enum:
            - AUTH_REQUIRED
            - AUTH_INVALID
            - PERMISSION_DENIED
            - TENANT_IDENTITY_UNVERIFIED
            - NOT_FOUND
            - VALIDATION_ERROR
            - CONFLICT
            - PAYLOAD_TOO_LARGE
            - RATE_LIMIT_EXCEEDED
            - QUOTA_EXCEEDED
            - SERVICE_UNAVAILABLE
            - INTERNAL_ERROR
        message:
          type: string
          description: رسالة خطأ مقروءة بشريًا
        http_status:
          type: integer
          description: رمز حالة HTTP
        retry_after_ms:
          type: integer
          description: عدد المللي ثانية للانتظار قبل إعادة المحاولة (لحدود المعدل)
        details:
          type: object
          description: سياق خطأ إضافي
      example:
        code: AUTH_REQUIRED
        message: Authentication required
        http_status: 401
  securitySchemes:
    APIKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: مفتاح API للمصادقة من جهاز إلى جهاز
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT للعمليات التي يبدأها المستخدم

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.