pixel-office-openclaw 0.1.3 → 0.1.4

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server.js +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixel-office-openclaw",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Watch your OpenClaw AI agents work in a pixel-art virtual office",
5
5
  "type": "module",
6
6
  "bin": {
package/server.js CHANGED
@@ -241,8 +241,12 @@ app.post('/api/send', async (req, res) => {
241
241
  // Send via OpenClaw CLI (gateway is WebSocket-only, no REST endpoint)
242
242
  try {
243
243
  console.log(`[bridge] Sending to ${safeAgentId} via CLI: ${safeMessage.slice(0, 50)}...`)
244
+ // Strip npm/npx env vars that can confuse the openclaw CLI child process
245
+ const cleanEnv = Object.fromEntries(
246
+ Object.entries(process.env).filter(([k]) => !k.startsWith('npm_') && k !== 'NODE_OPTIONS' && k !== 'INIT_CWD')
247
+ )
244
248
  const cliResult = execFileSync('openclaw', ['agent', '--agent', safeAgentId, '--message', safeMessage, '--json'],
245
- { timeout: 120000, stdio: ['pipe', 'pipe', 'pipe'], encoding: 'utf-8', env: { ...process.env, NODE_OPTIONS: '' } }
249
+ { timeout: 120000, stdio: ['pipe', 'pipe', 'pipe'], encoding: 'utf-8', env: cleanEnv }
246
250
  )
247
251
  console.log(`[bridge] Sent to ${safeAgentId} (CLI OK)`)
248
252
  try {