الكلية الجامعية للعلوم التطبيقيةبرمجة 1
English

إضافة مادة بواسطة وكيلك

بروتوكول المادة التعليمية، الإصدار 1: يتصل وكيل كل زميل بالمساق عبر MCP، فيقرأ المادة ويقترح الجديد منها.

1. اربط وكيلك

اطلب رمز وصول خاصًا بك من مسؤول المساق، ثم نفّذ:

claude mcp add --transport http prog1 https://prog1.ucas.app/mcp \
  --header "Authorization: Bearer YOUR_TOKEN"

أو أضف هذا إلى إعدادات أي وكيل يدعم MCP:

{
  "mcpServers": {
    "prog1": {
      "type": "http",
      "url": "https://prog1.ucas.app/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      }
    }
  }
}

2. اطلب ما تريد

مثلًا: «أضف محاضرة عن الوراثة بعد المصفوفات». يقرأ الوكيل القواعد بالأداة get_protocol، ويتحقق من عمله بالأداة validate_lecture، ثم يرسله بالأداة submit_lecture.

3. لا يُنشر شيء دون مراجعة

  1. مسودةيعيد الإرسال رابط مراجعة خاصًا للمحاضرة كما ستظهر.
  2. تحقّقزر في صفحة المراجعة يشغّل كل برنامج في المحاضرة على JVM حقيقي، ويقارن الناتج بما تدّعيه المادة.
  3. نشرينشر المحرر هذه النسخة بالأداة publish_revision، وتظهر فورًا دون إعادة بناء. يُرفض النشر إن لم تنجح كل البرامج.

الأدوار

الدوريستطيع
authorالقراءة، والتحقق، وإرسال المسودات
editorما سبق، مع النشر والرفض وسحب المحاضرات

أنواع المحتوى

typeالوصف
textA paragraph. Fields: text.
listBullets, or numbers with ordered:true. Fields: items[], ordered?.
calloutA highlighted note. Fields: kind (note|tip|warn|activity|teacher), title?, text. "teacher" appears only in teacher view.
cardsSide-by-side cards. Fields: items[{title, text?, code?}].
stepsNumbered procedure. Fields: items[{title, text?}].
tableA table. Fields: headers[], rows[][].
boxesVariables drawn as named boxes. Fields: items[{type, name, value}].
codeA read-only fragment that need not compile. Fields: code, caption?.
labAn editable program students run and debug in place. Fields: id, title?, text?, files[] or code, stdin?, output? (exact stdout, checked by the verifier; omit only for interactive labs).
predictStudents predict the output, then reveal or run it. Fields: id, code, question?, options?[], output, stdin?, why.
quizMultiple choice. Fields: id, question, code?, options[], answer (zero-based index), why.
fixitA broken program to repair. Fields: id, title?, text?, code (must fail to compile), error (text of the javac message), fix (a corrected program), output (stdout of fix), why.
exerciseAn autograded task. Fields: id, title, text, starter, tests[{stdin?, output}], hints[], solution.

قراءة عامة دون رمز

GET https://prog1.ucas.app/api/lectures
GET https://prog1.ucas.app/api/lectures/{id}