إضافة مادة بواسطة وكيلك
بروتوكول المادة التعليمية، الإصدار 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. لا يُنشر شيء دون مراجعة
- مسودةيعيد الإرسال رابط مراجعة خاصًا للمحاضرة كما ستظهر.
- تحقّقزر في صفحة المراجعة يشغّل كل برنامج في المحاضرة على JVM حقيقي، ويقارن الناتج بما تدّعيه المادة.
- نشرينشر المحرر هذه النسخة بالأداة publish_revision، وتظهر فورًا دون إعادة بناء. يُرفض النشر إن لم تنجح كل البرامج.
الأدوار
| الدور | يستطيع |
|---|---|
author | القراءة، والتحقق، وإرسال المسودات |
editor | ما سبق، مع النشر والرفض وسحب المحاضرات |
أنواع المحتوى
| type | الوصف |
|---|---|
text | A paragraph. Fields: text. |
list | Bullets, or numbers with ordered:true. Fields: items[], ordered?. |
callout | A highlighted note. Fields: kind (note|tip|warn|activity|teacher), title?, text. "teacher" appears only in teacher view. |
cards | Side-by-side cards. Fields: items[{title, text?, code?}]. |
steps | Numbered procedure. Fields: items[{title, text?}]. |
table | A table. Fields: headers[], rows[][]. |
boxes | Variables drawn as named boxes. Fields: items[{type, name, value}]. |
code | A read-only fragment that need not compile. Fields: code, caption?. |
lab | An 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). |
predict | Students predict the output, then reveal or run it. Fields: id, code, question?, options?[], output, stdin?, why. |
quiz | Multiple choice. Fields: id, question, code?, options[], answer (zero-based index), why. |
fixit | A 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. |
exercise | An 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}