@kokorolx/ai-sandbox-wrapper 2.0.1 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,46 +8,26 @@ AI coding tools like Claude, Gemini, and Aider have full access to your filesyst
8
8
 
9
9
  **What you get:** Peace of mind using AI coding tools without risking your personal and system data.
10
10
 
11
- *Last updated: Wednesday, January 29, 2026*
11
+ *Last updated: Tuesday, February 3, 2026*
12
12
 
13
- ## ⚠️ Breaking Change: v2.0.0 - Config Directory Reorganization
13
+ ## New in v2.1.0: Stability & Native Persistence
14
14
 
15
- **Version 2.0.0** reorganizes the directory structure to a tool-centric layout and introduces a unified `config.json`.
15
+ The **v2.1.0 release** focuses on architectural stability and a more intuitive persistence model.
16
16
 
17
- ### New Structure (v2)
18
- ```
19
- ~/.ai-sandbox/
20
- ├── config.json # Unified config (workspaces, git, networks)
21
- ├── tools/ # Tool-centric organization
22
- │ ├── claude/
23
- │ │ ├── home/ # Tool config (was: ~/.ai-sandbox/home/claude/)
24
- │ │ └── cache/ # Tool cache (was: ~/.ai-sandbox/cache/claude/)
25
- │ ├── gemini/
26
- │ │ ├── home/
27
- │ │ └── cache/
28
- │ └── ... (other tools)
29
- └── shared/
30
- └── git/ # Shared git config
31
- ├── ssh/ # SSH keys and config
32
- └── keys/ # Per-workspace key selections
33
- ```
34
-
35
- ### Automatic Migration
36
-
37
- When you run any AI tool, the wrapper automatically migrates:
38
-
39
- | Old Location | New Location |
40
- |--------------|-------------|
41
- | `~/.ai-sandbox/home/<tool>/` | `~/.ai-sandbox/tools/<tool>/home/` |
42
- | `~/.ai-sandbox/cache/<tool>/` | `~/.ai-sandbox/tools/<tool>/cache/` |
43
- | `~/.ai-sandbox/cache/git/` | `~/.ai-sandbox/shared/git/` |
44
- | `~/.ai-sandbox/git-keys/` | `~/.ai-sandbox/shared/git/keys/` |
45
- | `~/.ai-sandbox/workspaces` (file) | `config.json.workspaces` |
46
- | `~/.ai-sandbox/git-allowed` (file) | `config.json.git.allowedWorkspaces` |
47
-
48
- **No action required** - migration happens automatically on first run.
49
-
50
- **Legacy file compatibility**: Old files (`workspaces`, `git-allowed`) are still read as fallback.
17
+ - ✅ **Stable Node 22 LTS**: Switched to a robust Node 22 base image for maximum compatibility and performance.
18
+ - ✅ **Direct Mount Persistence**: Changes made *inside* the container (logins, settings, sessions) now save directly to your host's native folders.
19
+ - ✅ **Cache Isolation**: Heavy caches (`node_modules`, `.npm`, `.cache`) are isolated using anonymous volumes to prevent "cache poisoning" and runtime conflicts.
20
+
21
+ ### Native Config Mapping
22
+ Your tool configurations are now directly linked from your Mac/PC:
23
+ - Host: `~/.config/opencode` Container: `/home/agent/.config/opencode`
24
+ - Host: `~/.local/share/opencode` Container: `/home/agent/.local/share/opencode`
25
+
26
+ ---
27
+
28
+ ## ⚠️ Breaking Change: v2.0.0 - Config Directory Reorganization
29
+
30
+ **Version 2.0.0** reorganized the directory structure to a tool-centric layout and introduced a unified `config.json`.
51
31
 
52
32
  ## 🛡️ Why Use This?
53
33
 
@@ -100,7 +80,7 @@ npx @kokorolx/ai-sandbox-wrapper setup --no-cache
100
80
  ```
101
81
 
102
82
  ### Step 3: Follow the Interactive Prompts
103
- 1. **Whitelist workspaces** - Enter the directories where you want AI tools to access (e.g., `~/projects,~/code`)
83
+ 1. **Whitelist workspaces (Optional)** - Enter directories AI tools can access, or just hit **Enter** to whitelist on-demand later.
104
84
  2. **Select tools** - Use arrow keys to move, space to select, Enter to confirm
105
85
  3. **Choose image source** - Select registry (faster) or build locally
106
86
 
@@ -182,7 +162,7 @@ docker pull registry.gitlab.com/kokorolee/ai-sandbox-wrapper/ai-aider:latest
182
162
  ```
183
163
 
184
164
  **Available pre-built images:**
185
- - `ai-base:latest` - Base image with Bun runtime
165
+ - `ai-base:latest` - Base image with Node.js 22 LTS runtime
186
166
  - `ai-amp:latest` - Sourcegraph Amp
187
167
  - `ai-claude:latest` - Claude Code CLI
188
168
  - `ai-droid:latest` - Factory CLI
@@ -211,22 +191,34 @@ docker pull registry.gitlab.com/kokorolee/ai-sandbox-wrapper/ai-aider:latest
211
191
  |------|--------|--------------|-------------|
212
192
  | **claude** | ✅ | Native binary | Anthropic Claude Code |
213
193
  | **opencode** | ✅ | Native Go | Open-source AI coding |
214
- | **gemini** | ✅ | npm/Bun | Google Gemini CLI (free tier) |
194
+ | **gemini** | ✅ | npm/Node | Google Gemini CLI (free tier) |
215
195
  | **aider** | ✅ | Python | AI pair programmer (Git-native) |
216
- | **kilo** | ✅ | npm/Bun | Kilo Code (500+ models) |
217
- | **codex** | ✅ | npm/Bun | OpenAI Codex agent |
218
- | **amp** | ✅ | npm/Bun | Sourcegraph Amp |
219
- | **qwen** | ✅ | npm/Bun | Alibaba Qwen CLI (1M context) |
196
+ | **kilo** | ✅ | npm/Node | Kilo Code (500+ models) |
197
+ | **codex** | ✅ | npm/Node | OpenAI Codex agent |
198
+ | **amp** | ✅ | npm/Node | Sourcegraph Amp |
199
+ | **qwen** | ✅ | npm/Node | Alibaba Qwen CLI (1M context) |
220
200
  | **droid** | ✅ | Custom | Factory CLI |
221
201
 
222
- ### GUI Tools (IDE/Editor)
202
+ > **Note:** GUI tools (VSCode, codeserver) have been removed in v2.0.1. Use your native IDE with AI tools running in the sandbox.
203
+
204
+ ## ⚠️ Known Issues
205
+
206
+ ### Native Tool Config Compatibility
207
+
208
+ In v2.1.0+, tool configurations are **directly bind-mounted** from your host. This ensures 100% compatibility with your native tool settings and authentications.
223
209
 
224
- | Tool | Status | Description |
225
- |------|--------|-------------|
226
- | **codeserver** | ✅ | VSCode in browser (localhost:8080) |
227
- | **vscode** | ⚠️ Experimental | VSCode Desktop via X11 |
228
- | **cursor** | 🔜 Planned | Cursor IDE sandbox |
229
- | **antigravity** | 🔜 Planned | Antigravity IDE sandbox |
210
+ 1. **Host Config**: `~/.config/<tool>/` or `~/.<tool>/`
211
+ 2. **Container Mount**: `/home/agent/.config/<tool>` (Automatic)
212
+
213
+ **Currently Supported for Direct Mount:**
214
+ - `claude`
215
+ - `opencode`
216
+ - ✅ `amp`
217
+ - ✅ `gemini`
218
+ - ✅ `aider`
219
+ - ... and all other supported tools.
220
+
221
+ Please [open an issue](https://github.com/kokorolx/ai-sandbox-wrapper/issues) if you encounter problems with specific tools.
230
222
 
231
223
  ## 🖥️ Platform Support
232
224
 
@@ -252,26 +244,17 @@ AI Sandbox Wrapper creates and manages a single consolidated directory in your h
252
244
 
253
245
  ```
254
246
  ~/.ai-sandbox/
255
- ├── cache/ # Tool-specific cache directories
256
- ├── claude/ # Claude Code cache
257
- ├── gemini/ # Gemini CLI cache
258
- ├── aider/ # Aider cache
259
- │ └── git/ # Git credentials cache (when enabled)
260
- └── ssh/ # SSH keys and config for allowed workspace
261
- ├── home/ # Tool home directories with persistent configs
262
- │ ├── claude/ # .claude.json and settings
263
- │ ├── gemini/ # Gemini configuration
264
- │ ├── aider/ # Aider config and history
265
- │ └── .gitconfig # Git configuration (when Git access enabled)
266
- ├── config.json # Network configuration
267
- ├── workspaces # List of whitelisted directories AI can access
268
- ├── env # API keys (format: KEY=value, one per line)
269
- ├── git-allowed # Workspaces with persistent Git access
270
- ├── git-keys/ # Saved SSH key selections for each workspace
271
- │ └── {hash} # MD5-hashed workspace path
272
- └── .migrated # Migration marker (prevents re-migration)
247
+ ├── config.json # Unified config (workspaces, git, networks)
248
+ ├── tools/ # Isolated sandbox environments
249
+ └── <tool>/
250
+ └── home/ # Sandbox home directory (excludes native configs)
251
+ ├── shared/ # Shared assets
252
+ └── git/ # Shared git config and keys
253
+ └── env # API keys (format: KEY=value)
273
254
  ```
274
255
 
256
+ **Note:** Tools also bind-mount your **native** `~/.config/<tool>` directories for persistence.
257
+
275
258
  ### Key Files
276
259
 
277
260
  | File | Purpose |
@@ -283,6 +266,18 @@ AI Sandbox Wrapper creates and manages a single consolidated directory in your h
283
266
 
284
267
  ## ⚙️ Configuration
285
268
 
269
+ ### Tool-Specific Configuration
270
+
271
+ Each tool has its own persistent home directory inside `~/.ai-sandbox/tools/<tool>/home/`.
272
+
273
+ ```bash
274
+ # View configuration paths for a specific tool (Recommended)
275
+ npx @kokorolx/ai-sandbox-wrapper config tool claude
276
+
277
+ # View configuration content
278
+ npx @kokorolx/ai-sandbox-wrapper config tool claude --show
279
+ ```
280
+
286
281
  ### API Keys
287
282
  ```bash
288
283
  # Edit environment file
@@ -466,21 +461,19 @@ GOOGLE_API_KEY=AIza...
466
461
 
467
462
  ### Per-Project Config
468
463
 
469
- Each tool supports project-specific config files that override global settings:
464
+ Each tool supports project-specific config files that override global settings. These files are located in your workspace and are accessible to the tool:
470
465
 
471
- | Tool | Project Config | Global Config Location |
472
- |------|----------------|------------------------|
473
- | Claude | `.claude.json` | `~/.ai-sandbox/home/claude/.claude/` |
474
- | Gemini | `.gemini.json` | `~/.ai-sandbox/home/gemini/.config/gemini/` |
475
- | Aider | `.aider.conf` | `~/.ai-sandbox/home/aider/.config/aider/` |
476
- | Opencode | `.opencode.json` | `~/.ai-sandbox/home/opencode/.config/opencode/` |
477
- | Kilo | `.kilo.json` | `~/.ai-sandbox/home/kilo/.config/kilo/` |
478
- | Codex | `.codex.json` | `~/.ai-sandbox/home/codex/.config/codex/` |
479
- | Amp | `.amp.json` | `~/.ai-sandbox/home/amp/.config/amp/` |
466
+ | Tool | Project Config | Native Global Config |
467
+ |------|----------------|----------------------|
468
+ | Claude | `.claude.json` | `~/.config/claude/` |
469
+ | Gemini | `.gemini.json` | `~/.config/gemini/` |
470
+ | Aider | `.aider.conf` | `~/.config/aider/` |
471
+ | Opencode | `.opencode.json` | `~/.config/opencode/` |
472
+ | Amp | `.amp.json` | `~/.config/amp/` |
480
473
 
481
- **Priority:** Project config > Global config > Container defaults
474
+ **Persistence:** Since v2.1.0, changes to global settings *inside* the container are automatically saved back to your **Native Global Config** on the host.
482
475
 
483
- **Note:** Existing configs from `~/.config/{tool}/` or `~/.claude/` are automatically migrated to the new location on first run.
476
+ **Priority:** Project config > Native Global config > Container defaults
484
477
 
485
478
  ```bash
486
479
  # Example: Project-specific Claude config
@@ -640,9 +633,12 @@ nano ~/.ai-sandbox/git-allowed # Delete the line
640
633
  - Reload your shell: `source ~/.zshrc`
641
634
  - Verify setup completed: check if `~/bin/ai-run` exists
642
635
 
643
- **"Workspaces not configured"**
644
- - Run setup again: `./setup.sh`
645
- - Make sure you entered workspace directories during setup
636
+ **"Workspaces not configured"** (Legacy)
637
+ - Note: This error is resolved in v2.1.0+.
638
+ - Run setup again: `./setup.sh` or simply run an AI tool in your project folder to trigger interactive whitelisting.
639
+
640
+ **"BunInstallFailedError"** (Resolved in v2.1.0)
641
+ - This was caused by stale caches. We now use **Cache Isolation** via anonymous volumes. If you still see this, run `./setup.sh --no-cache` to force a clean build.
646
642
 
647
643
  **Tool doesn't start**
648
644
  - Check if you selected the tool during setup