-
Notifications
You must be signed in to change notification settings - Fork 0
Add sandbox/gym environment for safe AI development #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Dax Raad <d@ironbay.co>
…if not current day (anomalyco#4503) Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: Dax Raad <d@ironbay.co> Co-authored-by: opencode <opencode@sst.dev>
Co-authored-by: ferg-cod3s <28580642+ferg-cod3s@users.noreply.github.com>
Co-authored-by: ferg-cod3s <28580642+ferg-cod3s@users.noreply.github.com>
Co-authored-by: ferg-cod3s <28580642+ferg-cod3s@users.noreply.github.com>
|
@copilot review the failing checks and address the problems |
Co-authored-by: ferg-cod3s <28580642+ferg-cod3s@users.noreply.github.com>
Co-authored-by: ferg-cod3s <28580642+ferg-cod3s@users.noreply.github.com>
Co-authored-by: ferg-cod3s <28580642+ferg-cod3s@users.noreply.github.com>
Fixed the TypeScript typecheck failures in commit |
4b65759 to
d7c4c3b
Compare
4b65759 to
8ed4027
Compare
src/sandbox/filesystem.ts)src/sandbox/process.ts)src/sandbox/commands.ts)src/sandbox/config.ts)src/sandbox/instance.ts)src/sandbox/index.ts)src/cli/cmd/gym.ts)Original prompt
Summary
Implement a sandbox/gym environment for OpenCode that allows safe development and testing without risking accidental file system damage. This is the local-first implementation focusing on directory isolation and process-level sandboxing.
Goals
opencode gymcommandArchitecture
1. Sandbox Filesystem (
packages/opencode/src/sandbox/filesystem.ts)/tmp/opencode-sandbox-*)2. Process Isolation (
packages/opencode/src/sandbox/process.ts)3. Command Validation (
packages/opencode/src/sandbox/commands.ts)Block dangerous commands by default:
rm -rf /,rm -rf ~,rm -rf *sudo *chmod 777 /mkfs.*dd if=* of=/dev/*curl * | sh,wget * | sh> /dev/sda, etc.4. Gym Configuration (
packages/opencode/src/sandbox/config.ts)5. Sandbox Instance (
packages/opencode/src/sandbox/instance.ts)Wrap the existing
Instancesystem to provide sandbox context:6. Main Sandbox Module (
packages/opencode/src/sandbox/index.ts)Export unified interface:
7. CLI Command (
packages/opencode/src/cli/cmd/gym.ts)