pixel-office-openclaw 0.1.6 → 0.1.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixel-office-openclaw",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
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
@@ -16,7 +16,7 @@
16
16
 
17
17
  import express from 'express'
18
18
  import { readFileSync, writeFileSync, mkdirSync, readdirSync, existsSync, statSync, unlinkSync } from 'fs'
19
- import { execFileSync, execSync } from 'child_process'
19
+ import { execFileSync, execSync, spawnSync } from 'child_process'
20
20
  import { fileURLToPath } from 'url'
21
21
  import { dirname, join } from 'path'
22
22
  import { homedir } from 'os'
@@ -241,9 +241,10 @@ 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
- // Use execSync with shell to avoid npx fd/signal inheritance issues with execFileSync
245
- const escapedMsg = safeMessage.replace(/'/g, "'\\''")
246
- const cliResult = execSync(`/usr/bin/openclaw agent --agent '${safeAgentId}' --message '${escapedMsg}' --json`,
244
+ // Use env -i with essential vars to get a clean process, avoiding npx inheritance
245
+ const essential = ['HOME', 'PATH', 'USER', 'SHELL', 'LANG', 'TERM', 'XDG_RUNTIME_DIR', 'DBUS_SESSION_BUS_ADDRESS']
246
+ const envArgs = essential.filter(k => process.env[k]).map(k => `${k}=${process.env[k]}`)
247
+ const cliResult = execFileSync('/usr/bin/env', ['-i', ...envArgs, '/usr/bin/openclaw', 'agent', '--agent', safeAgentId, '--message', safeMessage, '--json'],
247
248
  { timeout: 120000, encoding: 'utf-8', cwd: homedir(), stdio: ['pipe', 'pipe', 'pipe'] }
248
249
  )
249
250
  console.log(`[bridge] Sent to ${safeAgentId} (CLI OK)`)
@@ -1,7 +0,0 @@
1
- This asset pack is released under the Creative Commons Public Domain Dedication License (aka CC0 or CC Zero).
2
-
3
- CC0 is a public dedication tool, which allows creators to give up their copyright and put their works into the worldwide public domain. CC0 allows users to distribute, remix, adapt, and build upon the material in any medium or format, with no conditions.
4
-
5
- More info here:
6
- https://creativecommons.org/publicdomain/zero/1.0/
7
-
Binary file
Binary file