04

Sandbox SDK Sandbox SDK Sandbox SDK

Ship AI code executor an toàn Ship a secure AI code executor Ship AI code executor សុវត្ថិភាព

Chạy code trong container cô lập, preview live, gắn Workers AI — từ zero. Run code in isolated containers, live preview, Workers AI — from scratch. រត់ code ក្នុង container បំបែក preview ផ្ទាល់ ភ្ជាប់ Workers AI — ពីសូន្យ។

Sau Phần 5 (AI) và Phần 4 (vận hành/secret). Lab bảo mật khớp golden rules: secret không lên client. After Part 5 (AI) and Part 4 (operate/secrets). The security labs match the golden rules: secrets stay off the client. បន្ទាប់ពីផ្នែក 5 (AI) និងផ្នែក 4 (ដំណើរការ/secret)។ Lab សុវត្ថិភាពសមនឹងច្បាប់៖ secret មិនឡើង client។

  1. 01 Project sandbox đầu tiên First sandbox project Project sandbox ដំបូង Scaffold, đọc cấu trúc, chạy local, exec lệnh đầu tiên. Scaffold, read the layout, run locally, exec the first command. Scaffold អានរចនាសម្ព័ន្ធ រត់ local exec ពាក្យបញ្ជាដំបូង។ 20 phút 20 min 20 នាទី
  2. 02 exec() và file exec() and files exec() និង file API exec(), thao tác file, endpoint tùy chỉnh, xử lý lỗi. The exec() API, file ops, a custom endpoint, and error handling. API exec() ប្រតិបត្តិការ file endpoint ផ្ទាល់ខ្លួន និងដោះស្រាយ error។ 20 phút 20 min 20 នាទី
  3. 03 Code executor Code executor Code executor Context chạy code, runCode(), nhận input động, bắt exception. A code context, runCode(), dynamic input, catch execution errors. Context រត់ code, runCode(), input ថាមវន្ត ចាប់ exception។ 25 phút 25 min 25 នាទី
  4. 04 Sinh code bằng Workers AI AI-powered code generation AI-powered code generation AI binding + endpoint /vibe — pipeline generate → execute. AI binding + /vibe endpoint — generate → execute pipeline. AI binding + endpoint /vibe — pipeline generate → execute។ 30 phút 30 min 30 នាទី
  5. 05 Live preview Live app preview Live app preview Cài deps, start server trong sandbox, expose port, stream log. Install deps, start a server in the sandbox, expose a port, stream logs. ដំឡើង deps start server ក្នុង sandbox expose port stream log។ 30 phút 30 min 30 នាទី
  6. 06 Bảo mật sandbox Sandbox security សុវត្ថិភាព sandbox Validate input, isolate theo user, env/secret, auth — sandbox không phải ACL. Validate input, per-user isolation, env/secrets, auth — a sandbox is not an ACL. Validate input បំបែកតាម user env/secret auth — sandbox មិនមែន ACL។ 25 phút 25 min 25 នាទី
  7. 07 Deploy và lifecycle Deploy and lifecycle Deploy និង lifecycle Deploy, cleanup sandbox, config production, monitor. Deploy, clean up sandboxes, production config, monitor. Deploy cleanup sandbox កំណត់ production monitor។ 15 phút 15 min 15 នាទី