agent-window 1.0.8 → 1.0.9
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/config/config.example.json +3 -3
- package/package.json +1 -1
- package/src/bot.js +5 -3
- package/src/core/config.js +3 -3
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
|
|
13
13
|
"_comment_workspace": "=== Workspace Configuration ===",
|
|
14
14
|
"workspace": {
|
|
15
|
-
"containerName": "claude-
|
|
16
|
-
"dockerImage": "
|
|
17
|
-
"portMappings": [
|
|
15
|
+
"containerName": "claude-sandbox",
|
|
16
|
+
"dockerImage": "ghcr.io/anthropics/anthropic-quick-sandbox",
|
|
17
|
+
"portMappings": []
|
|
18
18
|
},
|
|
19
19
|
|
|
20
20
|
"_comment_cli": "=== CLI Configuration ===",
|
package/package.json
CHANGED
package/src/bot.js
CHANGED
|
@@ -122,7 +122,9 @@ function ensureContainer() {
|
|
|
122
122
|
} catch (e) {}
|
|
123
123
|
|
|
124
124
|
// Start new persistent container
|
|
125
|
-
const portArgs = PORT_MAPPINGS
|
|
125
|
+
const portArgs = PORT_MAPPINGS && PORT_MAPPINGS.length > 0
|
|
126
|
+
? PORT_MAPPINGS.map(p => `-p ${p}`).join(' ')
|
|
127
|
+
: '';
|
|
126
128
|
const envArgs = Object.entries(config.docker.env)
|
|
127
129
|
.map(([k, v]) => `-e '${k}=${v}'`)
|
|
128
130
|
.join(' ');
|
|
@@ -130,7 +132,7 @@ function ensureContainer() {
|
|
|
130
132
|
const dockerCmd = [
|
|
131
133
|
'docker', 'run', '-d',
|
|
132
134
|
'--name', CONTAINER_NAME,
|
|
133
|
-
portArgs,
|
|
135
|
+
...(portArgs ? [portArgs] : []),
|
|
134
136
|
'--user', `${process.getuid()}:${process.getgid()}`,
|
|
135
137
|
'-v', `${PROJECT_DIR}:${CONTAINER_WORKSPACE}:rw`,
|
|
136
138
|
'-v', `${config.backend.configDir}:${CONTAINER_CONFIG_DIR}:rw`,
|
|
@@ -141,7 +143,7 @@ function ensureContainer() {
|
|
|
141
143
|
'--entrypoint', 'tail',
|
|
142
144
|
DOCKER_IMAGE,
|
|
143
145
|
'-f', '/dev/null'
|
|
144
|
-
].join(' ');
|
|
146
|
+
].filter(Boolean).join(' ');
|
|
145
147
|
|
|
146
148
|
execSync(dockerCmd);
|
|
147
149
|
console.log('[Docker] Container started successfully');
|
package/src/core/config.js
CHANGED
|
@@ -80,9 +80,9 @@ function loadConfig() {
|
|
|
80
80
|
// === Workspace Configuration ===
|
|
81
81
|
workspace: {
|
|
82
82
|
projectDir: expandPath(fileConfig.PROJECT_DIR) || process.cwd(),
|
|
83
|
-
containerName: fileConfig.workspace?.containerName || 'claude-
|
|
84
|
-
dockerImage: fileConfig.workspace?.dockerImage || '
|
|
85
|
-
portMappings: fileConfig.workspace?.portMappings || [
|
|
83
|
+
containerName: fileConfig.workspace?.containerName || 'claude-sandbox',
|
|
84
|
+
dockerImage: fileConfig.workspace?.dockerImage || 'ghcr.io/anthropics/anthropic-quick-sandbox',
|
|
85
|
+
portMappings: fileConfig.workspace?.portMappings || [],
|
|
86
86
|
},
|
|
87
87
|
|
|
88
88
|
// === Paths (derived from PROJECT_ROOT) ===
|