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.
@@ -12,9 +12,9 @@
12
12
 
13
13
  "_comment_workspace": "=== Workspace Configuration ===",
14
14
  "workspace": {
15
- "containerName": "claude-discord-bot",
16
- "dockerImage": "claude-sandbox",
17
- "portMappings": ["5173:5173"]
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-window",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "A window to interact with AI agents through chat interfaces. Simplified interaction, powerful backend capabilities.",
5
5
  "type": "module",
6
6
  "main": "src/bot.js",
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.map(p => `-p ${p}`).join(' ');
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');
@@ -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-discord-bot',
84
- dockerImage: fileConfig.workspace?.dockerImage || 'claude-sandbox',
85
- portMappings: fileConfig.workspace?.portMappings || ['5173:5173'],
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) ===