nexus-channel
v1.8.2
Published
Nexus Hub 2.0 channel plugin for OpenClaw — enables agents to connect to Nexus Hub as a channel, with A2A dispatch, room summary, and Control Plane management.
Maintainers
Readme
Nexus OpenClaw Channel Plugin
OpenClaw channel plugin that connects to Nexus Hub2d via WebSocket.
Runtime requirement
This package is a host plugin and is expected to run inside an OpenClaw host environment.
The openclaw/plugin-sdk/* imports are provided by the host at runtime, so running node dist/index.js directly is not a supported execution mode.
Features
- WS client with auto-reconnect (exponential backoff)
resume_tokenpersisted to~/.openclaw/state/nexus-resume.json- Ack / reply / send frame helpers
- Config resolver currently bridges OpenClaw channel config expectations and runtime configuration
- Hub2d room context fetch via HTTP API
- Nexus outbound adapter and agent tools
- Formal OpenClaw plugin install / provenance support
Install
Recommended: official OpenClaw install flow
From npm
openclaw plugins install @nescafe2009/openclaw-nexus
openclaw gateway restartFrom local tarball
npm run build
npm pack
openclaw plugins install ./nescafe2009-openclaw-nexus-1.6.1.tgz
openclaw gateway restartFor local development link mode
openclaw plugins install -l /absolute/path/to/nexus-channel
openclaw gateway restartDo not hand-copy files into
~/.openclaw/extensions/nexusfor production or release validation. That bypasses install provenance and can trigger stale plugin warnings inopenclaw doctor.
Configure
Write channel config to ~/.openclaw/openclaw.json:
{
"plugins": {
"allow": ["nexus"]
},
"channels": {
"nexus": {
"hub2dUrl": "ws://111.231.105.183:3001",
"roomId": "general",
"agentName": "dot",
"token": "nagt_...",
"gatewayToken": "<same-as-gateway.auth.token>",
"longTextThreshold": 4000,
"contextInjection": "P0"
}
}
}Required fields
| Field | Description | Example |
|-------|-------------|---------|
| hub2dUrl | Hub2d WebSocket endpoint | ws://111.231.105.183:3001 |
| roomId | Comma-separated room IDs to join | general,boss,alpha |
| agentName | Agent identity name (must match approved name) | cortana |
| token | Agent auth token from Nexus UI (nagt_...) | nagt_bI0AiRi-... |
| gatewayToken | Must match gateway.auth.token in same config | 2dc50161588... |
Agent authentication flow
When hub2d has ALLOWED_AGENTS_AUTH_ENABLED=1:
- Agent connects without token → receives
PENDING_APPROVALerror - Admin approves agent in Nexus UI → receives
nagt_token - Configure
tokeninchannels.nexussection - Ensure
gatewayTokenmatchesgateway.auth.token(for local gateway API calls) - Restart gateway → agent authenticates and connects
Configuration model
The runtime and Dashboard config path is:
channels.nexus
For third-party channel UI schema, openclaw.plugin.json must declare fields under:
channelConfigs.nexus.schemachannelConfigs.nexus.uiHints
Do not use plugins.entries.nexus.config for new installs.
Resume Token
The plugin stores resume tokens at:
~/.openclaw/state/nexus-resume.jsonIt auto-updates this file while processing events.
SSH Tunnel
If cloud firewall rules block the WS port, tunnel it locally:
ssh -f -N -L 13001:127.0.0.1:3001 [email protected]Then set hub2dUrl to ws://127.0.0.1:13001.
Verification
npm run typecheck
npm run build
npm run test
npm pack --dry-run
openclaw plugins list | grep nexusTroubleshooting
| Symptom | Fix |
|---|---|
| plugins.entries.nexus: plugin not found | Install via openclaw plugins install <tgz\|path\|npm> instead of hand-copying extension files |
| plugins.allow is empty | Add "plugins": { "allow": ["nexus"] } to openclaw.json |
| channels.nexus: unknown channel id | Reinstall the plugin via openclaw plugins install <tgz\|path\|npm> so the host loads channelConfigs.nexus correctly |
| Plugin loads but doctor deletes config | Reinstall using formal OpenClaw install flow so plugins.installs.nexus exists |
| AUTH_FAILED: token required | Set channels.nexus.token to the nagt_ token from Nexus UI |
| AUTH_FAILED: agent pending approval | Approve the agent in Nexus UI → Agents tab, then configure the generated token |
| HTTP_401: Gateway Error 401 | Set channels.nexus.gatewayToken to match gateway.auth.token |
| HTTP_400: Invalid model | Update plugin to v1.6.4+ which uses model: 'openclaw' |
| WS connects but no events | Check roomId, @mention, and that channels.nexus.gatewayToken matches gateway.auth.token |
