rol-websocket-channel 1.0.1 → 1.0.2

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,13 +1,10 @@
1
1
  {
2
2
  "name": "rol-websocket-channel",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Unified OpenClaw plugin: MQTT Channel + Admin Bridge for remote management",
5
5
  "license": "MIT",
6
6
  "author": "nixgnehc",
7
7
  "type": "module",
8
- "bin": {
9
- "rol": "./bin/rol.js"
10
- },
11
8
  "keywords": [
12
9
  "openclaw",
13
10
  "mqtt",
@@ -101,10 +101,8 @@ async function exchangePairKey(
101
101
  existingMqttUrl?: string | null
102
102
  ): Promise<PairingPayload> {
103
103
  const endpoint = pickString(endpointOverride)
104
- ?? pickString(process.env.ROL_PAIR_ENDPOINT)
105
104
  ?? DEFAULT_PAIR_ENDPOINT;
106
- const auth = pickString(authOverride)
107
- ?? pickString(process.env.ROL_PAIR_AUTH);
105
+ const auth = pickString(authOverride);
108
106
 
109
107
  const headers: Record<string, string> = {
110
108
  'Content-Type': 'application/json'
@@ -156,7 +154,6 @@ function normalizePairingPayload(
156
154
 
157
155
  const mqttUrl = pickString(channelValue.mqttUrl)
158
156
  ?? pickString(root.mqttUrl)
159
- ?? pickString(process.env.ROL_PAIR_MQTT_URL)
160
157
  ?? existingMqttUrl
161
158
  ?? null;
162
159
  if (!mqttUrl) {
package/bin/rol.js DELETED
@@ -1,35 +0,0 @@
1
- #!/usr/bin/env node
2
- import { spawnSync } from 'node:child_process';
3
-
4
- const args = process.argv.slice(2);
5
-
6
- if (args.length === 0) {
7
- printUsageAndExit(1);
8
- }
9
-
10
- const [command, ...rest] = args;
11
-
12
- if (command !== 'pair') {
13
- printUsageAndExit(1);
14
- }
15
-
16
- if (rest.length === 0 || rest[0].startsWith('-')) {
17
- printUsageAndExit(1);
18
- }
19
-
20
- const result = spawnSync('openclaw', ['admin-bridge', 'pair', ...rest], {
21
- stdio: 'inherit',
22
- shell: process.platform === 'win32'
23
- });
24
-
25
- if (result.error) {
26
- process.stderr.write(`${result.error.message}\n`);
27
- process.exit(1);
28
- }
29
-
30
- process.exit(result.status ?? 0);
31
-
32
- function printUsageAndExit(code) {
33
- process.stderr.write('Usage: rol pair <key> [--endpoint <url>] [--auth <token>]\n');
34
- process.exit(code);
35
- }