
بيئة معزولة (Sandbox) لوكلاء البرمجة بالذكاء الاصطناعي. تشغّل Copilot CLI أو Claude Code أو OpenCode أو Gemini CLI أو Antigravity أو Pi أو goose أو صدفة (shell) عادية داخل بيئة معزولة على مستوى النواة، مع حواجز git و gh وسياسة بيئة معزولة مُودَعة في المستودع.
بيئة معزولة مفروضة على مستوى النواة لوكلاء البرمجة بالذكاء الاصطناعي. يغلّف cplt كلاً من GitHub Copilot CLI وOpenCode وGemini CLI وAntigravity CLI وPi وClaude Code وgoose وDeepSeek Harness، أو أي صدفة (shell)، بحيث يستطيع الوكيل كتابة الشيفرة لكنه لا يستطيع سرقة بيانات الاعتماد، أو الدفع إلى main، أو دمج طلبات السحب (PRs)، أو تسريب الأسرار.
sandbox-exec
ينفّذ وكلاء الذكاء الاصطناعي شيفرة عشوائية. يمكن لوكيل مخترق، سواء عبر حقن الأوامر (prompt injection)، أو هجوم على سلسلة التوريد، أو خادم MCP خبيث، أن يقرأ ~/.ssh، أو يدفع إلى main، أو يدمج طلبات السحب، أو يسرّب شيفرتك، ما لم يقل نظام التشغيل نفسه لا.
يمنحك cplt فرضًا على مستوى النواة مع سياسة قابلة للتهيئة على مستوى الفريق:
.cplt.toml، مُلتزَم بها في نظام التحكم بالإصدارات، بحيث تكون محصّنة ضد التلاعب وقابلة للتدقيقوثائق مفصّلة: التهيئة · الوكيل وتصفية النطاقات · حارس أمر gh · حارس أمر git · التأثيرات المعروفة · تفاصيل الأمان · نموذج الأمان
brew install navikt/tap/cplt # macOS. On Debian or Ubuntu, see apt below
cplt --shell-install # make 'copilot' run sandboxed (persistent)
# --agent opencode for any other agent
cplt doctor # check your environment
cplt -- -p "fix the tests" # run Copilot in sandbox
وكلاء آخرون وأوامر sandbox:
cplt --agent opencode # OpenCode (Copilot subscription)
cplt --agent opencode --pass-env ANTHROPIC_API_KEY # third-party provider
cplt --agent shell # interactive sandboxed shell (no AI)
cplt exec -- npm install # sandbox any command directly
cplt exec -c "npm install && npm test" # compound commands in sandbox
alias npm="cplt exec -- npm" # sandboxed npm for every invocation
# 1. Generate per-repo policy
cplt init --write
# 2. Developers approve on first run
cplt trust accept --all
# 3. Tune the command guards (both block by default)
cplt config set git_guard.protect_default_branch_only false # block every push, not just main
cplt config set git_guard.mode warn # observe instead of blocking
يحجب الـ sandbox الوصول إلى بيانات الاعتماد والأسرار في النواة. تحجب حرّاس الأوامر العمليات المدمّرة. كل قيد يُطبَّق على الوكيل وعلى كل عملية يُشغّلها.