ديـرDeerالدليلDocs

النموذج الهجين

كيف يتيح دير للأشخاص وAI وعملاء MCP والأتمتة إنجاز العمل نفسه عبر إجراء واحد وفحص صلاحية واحد وسجل تدقيق واحد.

إجراء واحد لكل منفّـذ

كل ما يغيّر البيانات في دير إجراء: إنشاء مهمة، أو إرسال رسالة، أو إلغاء اتصال MCP. يُعرَّف الإجراء مرة واحدة، وتستخدم كل الواجهات هذا التعريف نفسه:

  • الواجهة، عندما يختار الشخص زراً أو يرسل نموذجاً.
  • AI، عندما يقترح استدعاء أداة في محادثة.
  • عملاء MCP، عبر أدوات خادم MCP في مساحة العمل.
  • الأتمتة، عندما تشغّل خطوة من خطواتها.

ولأن التعريف واحد، يملأ الشخص والوكيل الحقول نفسها، ويمران بفحص الصلاحية نفسه، ويتركان النوع نفسه من سجلات التدقيق. فلا يمكن أن تتوفر قدرة للأشخاص وتغيب عن AI، ولا العكس. ولا شيء يكتب في مساحة العمل من خارج الإجراءات.

مكوّنات الإجـراء

المكوّنمثالالغرض
idtasks.createاسم ثابت بصيغة module.verb، وهو أيضاً اسم أداة MCP.
moduletasksالوحدة التي يتبع لها.
title وdescriptionإنشاء مهمةيظهران للأشخاص بالعربية والإنجليزية، وللنماذج حين تختار الأداة.
scopetasks:writeالصلاحية التي يتطلبها.
riskwriteدرجة خطورته، وعليها يتحدد التأكيد والموافقة.
مخطط المدخلاتtitle وdue وassigneesمخطط صارم يرفض أي حقل غير معروف.

يتحقق الخادم من كل المدخلات وفق المخطط قبل أن يبدأ أي تنفيذ. وتحمل النتيجة دائماً ok ورسالة message بالعربية والإنجليزية، ورابطاً إلى السجل إذا أُنشئ أو تغيّر.

المنفّذون

لكل تشغيل منفّذ. والمنفّذ غير البشري يعمل دائماً باسم شخص، ولا تتجاوز صلاحيته صلاحية ذلك الشخص أبداً.

المنفّذمن هويعمل باسمالصلاحية التي يحصل عليهاأين تجري الموافقة
userشخص مسجّل الدخول.نفسه.دوره وما عُدّل من صلاحياته.لا موافقة، لكن إجراءات الحذف تطلب منه التأكيد.
aiAI أو وكيل ذكاء اصطناعي في محادثة.الشخص الذي طلب.صلاحية ذلك الشخص، مقيّدة أكثر بجمهور المحادثة.في المحادثة، يوافق عليها صاحب الطلب.
mcpعميل خارجي يستخدم اتصال MCP.الشخص الذي أنشأ الاتصال.صلاحية ذلك الشخص، في حدود صلاحية المهام في الاتصال.في الإعدادات ثم MCP، يوافق عليها صاحب الاتصال.
automationخطوة في سير عمل أو مهمة مجدولة.مالك الأتمتة.صلاحية المالك، في حدود ما مُنح للأتمتة.سير العمل قريباً.
systemدير نفسه، لأعمال الصيانة.لا أحد.يحددها الخادم.لا ينطبق.

لم تتوفر الأتمتة بسير العمل في النسخة السحابية التجريبية بعد قريباً. راجع خريطة الطريق. أما المهام المجدولة التي يشغّلها دير نفسه، كتسليم التذكير في موعده، فتُسجَّل اليوم باسم الأتمتة.

وتحمل السجلات التي أنشأها AI أو MCP أو عدّلاها علامة المنفّذ في الواجهة، فيعرف الجميع دائماً ما لم يفعله شخص.

الصلاحيات

الصلاحية نطاق يجمع وحدة ومستوى وصول، ويُكتب بالصيغة module:access. والمستويات مرتبة: read ثم write ثم admin، وكل مستوى يشمل ما دونه، فـ tasks:write تسمح بكل ما تسمح به tasks:read.

ولكل دور وصول افتراضي في كل وحدة:

الدورالوصول الافتراضي
المالكadmin في كل الوحدات، ولا يمكن تقييده.
المشرفadmin في كل الوحدات عدا سجل التدقيق، فوصوله إليه read.
العضوwrite في أغلب الوحدات، وread في الإعدادات والموارد البشرية، ولا وصول له إلى MCP ولا إلى سجل التدقيق.
الضيفread في المهام والمحادثات والملفات والملفات الشخصية، ولا شيء غيرها.

ويستطيع المالك والمشرفون تعديل الوصول لدور معيّن أو لشخص واحد، في كل وحدة على حدة، من صلاحيات مساحة العمل. راجع الأدوار والصلاحيات.

أما المنفّذ غير البشري فصلاحيته الفعلية هي التقاطع بين أمرين:

  1. أن يملك الشخص الذي يعمل باسمه صلاحية الإجراء.
  2. أن يكون المنفّذ نفسه قد مُنح هذه الصلاحية.

فاتصال MCP بصلاحية tasks:write يملكه مشرف خُفّض وصوله إلى المهام إلى read، لا يستطيع إلا القراءة. وتُفحص الصلاحيات من جديد مع كل استدعاء، فيسري أي تغيير في الدور من الطلب التالي.

الخطـورة

الخطورةمعناهاالشخصAI وMCP والأتمتة
readلا يغيّر شيئاً.يُنفَّذ.يُنفَّذ.
writeينشئ أو يعدّل داخل مساحة العمل، ويمكن التراجع عنه.يُنفَّذ.يُنفَّذ، ويمكن لمساحة العمل فرض الموافقة على تعديلات AI.
destructiveيحذف، أو لا يمكن التراجع عنه.يؤكّده أولاً.يتوقف حتى يوافق شخص.
externalيخرج من مساحة العمل: يرسل بريداً، أو يستدعي تطبيقاً، أو يجدول لدى مزوّد.يُنفَّذ، ويعرض النموذج تنبيهاً.يتوقف حتى يوافق شخص.

لا يمكن تخفيف قاعدة الموافقة في destructive وexternal. ويطلب AI الموافقة كذلك قبل الإجراءات الإدارية، وقبل أي تغيير في الوصول إلى القنوات أو الفرق أو الملفات. راجع الموافقات.

الموافقات

ترتبط الموافقة بالطلب نفسه تماماً: الإجراء ومدخلاته والنسخة الحالية من السجل المستهدف. فإذا تغيّر السجل قبل التنفيذ سقطت الموافقة، ولزم تقديم الطلب من جديد. وهكذا لا يعمل طلب موافَق عليه على شيء لم يره من وافق.

  • AI يعرض الإجراء المقترح في المحادثة، فيوافق عليه صاحب الطلب أو يرفضه هناك.
  • MCP يعيد MCP_APPROVAL_REQUIRED ومعه رقم موافقة. يقرر صاحب الاتصال من الإعدادات، ثم يعيد العميل المحاولة بالرقم. راجع أدوات MCP.

يستطيع صاحب طلب AI أو صاحب اتصال MCP مراجعة الطلبات التي تنتظر قراره من الإجراءات ثم الموافقات.

سجلات التدقيق

يُكتب سجلُّ تدقيق لكل محاولة لتشغيل إجراء، حتى المحاولات المرفوضة:

الحالةمتى
successنُفّذ الإجراء.
deniedلم يملك المنفّذ الصلاحية، أو كانت الوحدة معطّلة.
failedبدأ الإجراء ولم يكتمل.
pending-approvalتوقف الإجراء بانتظار شخص.
rejectedرفض شخص طلباً من AI.

يحفظ كل سجل معرّف الإجراء والشخص ونوع المنفّذ، ويحفظ في حالتي AI وMCP الوكيل أو الاتصال الذي نفّذ. ويطّلع المالك والمشرفون على هذه السجلات في سجل التدقيق.

منع التكـرار

ترسل واجهة دير مفتاحاً فريداً مع كل تعديل. فإذا وصل المفتاح نفسه مرة أخرى بالمدخلات نفسها، بعد إعادة إرسال بسبب الشبكة مثلاً، أعاد دير النتيجة المحفوظة دون أن ينفّذ الإجراء مرتين. أما المفتاح نفسه بمدخلات مختلفة فيُرفض بالرمز IDEMPOTENCY_CONFLICT.

تقبل أدوات التعديل التي تعمل دون موافقة مفتاحاً اختيارياً لمنع التكرار من اتصال MCP نفسه خلال 24 ساعة. ويستخدم الحذف رقم موافقة صالحاً لمرة واحدة. راجع إعادة محاولة التعديل.

والعمل الذي يخرج من دير، كإرسال البريد أو تشغيل أداة تطبيق، لا يُعاد تلقائياً أبداً إذا لم تتأكد نتيجته، بل يُعلَّم ليراجعه شخص.

أين تعمل الإجراءات اليـوم

الواجهةما تستطيع تشغيله في النسخة السحابية التجريبية
الواجهةكل إجراء في مرجع الإجراءات يسمح به دورك.
AIإجراءات دير الأصلية داخل المحادثة، بصلاحيتك وموافقاتك. ولا يشمل ذلك البريد والتطبيقات المرتبطة وتقاويم المزوّدين.
MCPثماني أدوات للمهام. راجع أدوات MCP.
الأتمتةسير العمل قريباً.
العنوان العامإجراء واحد: settings.join_waitlist. راجع API.

The hybrid model

How Deer lets people, AI, MCP clients and automations do the same work through one action, one permission check and one audit record.

One action for every actor

Everything that changes data in Deer is an action: create a task, send a message, revoke an MCP connection. An action is defined once, and every surface uses that definition:

  • the interface, when a person selects a button or submits a form,
  • AI, when it proposes a tool call in a conversation,
  • MCP clients, through the tools on the workspace MCP server,
  • automations, when they run a step.

Because there is one definition, a person and an agent fill in the same fields, pass the same permission check and leave the same kind of audit record. A capability cannot exist for people and be missing for AI, or the other way round. Nothing writes to a workspace around an action.

Anatomy of an action

PartExamplePurpose
idtasks.createA stable name, module.verb. It is also the MCP tool name.
moduletasksThe module that owns it.
title, descriptionCreate taskShown to people in Arabic and English, and to models choosing a tool.
scopetasks:writeThe permission it requires.
riskwriteHow dangerous it is: decides confirmation and approval.
Input schematitle, due, assigneesA strict schema. Unknown fields are rejected.

The server validates every input against the schema before anything runs. A result always has ok, a bilingual message and, when a record was created or changed, a link to it.

Actors

Every run has an actor. Non-human actors always act on behalf of a person and never hold more permission than that person.

ActorWho it isActs forPermission it getsWhere approvals happen
userA signed-in person.Themselves.Their role and overrides.No approval. Destructive actions ask them to confirm.
aiAI or an AI agent in a conversation.The person who asked.That person's permission, limited further by the conversation's audience.In the conversation, by the person who asked.
mcpAn external client using an MCP connection.The person who created the connection.That person's permission, limited to the connection's task scope.In Settings, MCP, by the connection owner.
automationA workflow step or a scheduled job.The automation's owner.The owner's permission, limited to the automation's grants.Workflows Soon.
systemDeer itself, for maintenance.Nobody.Server-defined.Not applicable.

Workflow automations are not available in the cloud beta yet Soon. See the roadmap. Today, Deer's own scheduled jobs, such as delivering a reminder when it is due, are recorded as automation.

Records created or changed by AI or MCP carry the actor's mark in the interface, so people can always tell what was not done by a person.

Permissions

A permission is a scope: a module and an access level, written module:access. The levels are ordered read < write < admin, and a higher level includes the lower ones. tasks:write allows everything tasks:read allows.

Each role has default access per module:

RoleDefault access
Owneradmin on every module. Cannot be restricted.
Adminadmin on every module except the audit log, which is read.
Memberwrite on most modules. read on Settings and People. No access to MCP or the audit log.
Guestread on Tasks, Chat, Files and profiles. Nothing else.

Owners and admins can override access for a role or for one person, per module, in the workspace permissions. See Roles and permissions.

For a non-human actor, the effective permission is the intersection:

  1. The person it acts for must hold the action's scope.
  2. The actor must also have been granted that scope.

An MCP connection with tasks:write, owned by an admin whose task access was lowered to read, can only read. Checks run again on every call, so a change of role takes effect on the next request.

Risk

RiskMeaningA personAI, MCP, automation
readChanges nothing.Runs.Runs.
writeCreates or edits inside the workspace. Reversible.Runs.Runs. A workspace can require approval for AI writes.
destructiveDeletes, or cannot be undone.Confirms first.Stops for a person's approval.
externalLeaves the workspace: sends email, calls an app, schedules with a provider.Runs, and the form warns.Stops for a person's approval.

The approval rule for destructive and external cannot be loosened. AI also asks for approval before administrative actions and before changes to channel, team or file access. See Approvals.

Approvals

An approval is bound to the exact request: the action, its arguments and the current version of the record it targets. If the record changes before the action runs, the approval no longer applies and the request must be made again. This stops an approved request from acting on something the approver never saw.

  • AI shows the proposed action in the conversation. The person who asked approves or rejects it there.
  • MCP returns MCP_APPROVAL_REQUIRED with an approval id. The connection owner decides in Settings, and the client retries with the id. See MCP tools.

The AI requester or MCP connection owner can review their pending requests in Actions, under Approvals.

Audit events

Every attempt to run an action writes an audit event, including attempts that are refused:

StatusWhen
successThe action ran.
deniedThe actor lacked permission, or the module is disabled.
failedThe action started but could not complete.
pending-approvalThe action stopped to wait for a person.
rejectedA person rejected a request from AI.

Each event records the action id, the person, the actor kind and, for AI and MCP, which agent or connection acted. Owners and admins read these in the audit log.

Idempotency

The Deer interface sends a unique key with every write. If the same key arrives again with the same input, for example after a network retry, Deer returns the stored result instead of running the action twice. The same key with different input is refused with IDEMPOTENCY_CONFLICT.

MCP write tools that run without approval accept an optional key to deduplicate calls from the same connection for 24 hours. Deletion uses a single-use approval ID. See Retry a write.

Work that leaves Deer, such as sending mail or running an app tool, is never retried automatically when its outcome is uncertain. It is flagged for a person to check.

Where actions run today

SurfaceWhat it can run in the cloud beta
InterfaceEvery action in the actions reference that your role allows.
AINative Deer actions in the conversation, under your permission and approvals. Mail, connected apps and provider calendars are excluded.
MCPEight task tools. See MCP tools.
AutomationsWorkflows Soon.
Public endpointOne action: settings.join_waitlist. See API.