Skip to content

wecode-ai/openclaw-wegent

Repository files navigation

openclaw-wegent

OpenClaw plugin for Wegent local executor integration.

Config

Set values in channels["wegent-openclaw"].*:

{
  "channels": {
    "wegent-openclaw": {
      "backendUrl": "http://127.0.0.1:8000",
      "websocketUrl": "ws://127.0.0.1:8000/local-executor",
      "token": "wg-xxx",
      "deviceId": "f2b11392-7c7f-47f0-83f8-4fb812857e44",
      "deviceType": "local",
      "executorVersion": "1.0.0"
    }
  }
}

Defaults used internally (not shown in config form):

  • wsNamespace: /local-executor
  • socketPath: /socket.io
  • deviceId: auto-generated UUID by default, configurable
  • deviceName: macOS-OpenClaw-Device-<last-segment-of-deviceId>
  • bindShell: fixed openclaw (emitted as bind_shell)
  • deviceType: local by default, configurable (emitted as device_type)
  • capabilities: ["cpu"]
  • executorVersion: 1.0.0(可通过配置覆盖)
  • heartbeatIntervalMs: 30000
  • ackTimeoutMs: 10000
  • autoReconnect: true
  • reconnectDelayMs: 2000
  • reconnectDelayMaxMs: 10000

Behavior

  • Connects to Socket.IO namespace /local-executor
  • Registers device via device:register
  • Sends heartbeat via device:heartbeat with running_task_ids
  • Handles backend events:
    • task:execute
    • task:cancel
    • task:close-session
  • Emits result events:
    • response.output_text.delta
    • response.completed
    • response.incomplete
    • error

Logging

Default logs always enabled:

  • wegent_message_type_received (only message type + task ids)
  • wegent_first_char_latency (first character latency)

Other logs are disabled by default, and can be enabled with environment variables:

  • OPENCLAW_WEGENT_LOG_SOCKET=1
  • OPENCLAW_WEGENT_LOG_SERVICE=1
  • OPENCLAW_WEGENT_LOG_TASK=1
  • OPENCLAW_WEGENT_LOG_GATEWAY=1
  • OPENCLAW_WEGENT_LOG_ALL=1 (enable all of the above)

Development

npm install
npm run ci:check

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors