commanderclaw 1.1.12 → 1.1.14
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/README.md +42 -0
- package/binaries/win32-x64/coordination-server.exe +0 -0
- package/dist/cli/index.js +1 -1
- package/dist/cli/plugin.js +8 -16
- package/dist/cli/utils.js +4 -0
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -52,6 +52,48 @@ commanderclaw config
|
|
|
52
52
|
| Linux | x64 |
|
|
53
53
|
| Windows | x64 |
|
|
54
54
|
|
|
55
|
+
## Development
|
|
56
|
+
|
|
57
|
+
### Build
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npm install
|
|
61
|
+
npm run build
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Pre-Release Verification
|
|
65
|
+
|
|
66
|
+
Before publishing, verify the package works correctly:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# 1. Create tarball
|
|
70
|
+
npm pack
|
|
71
|
+
|
|
72
|
+
# 2. Test in clean environment
|
|
73
|
+
mkdir /tmp/test-release && cd /tmp/test-release
|
|
74
|
+
npm init -y
|
|
75
|
+
npm install /path/to/commanderclaw-*.tgz
|
|
76
|
+
|
|
77
|
+
# 3. Verify gateway works
|
|
78
|
+
npx commanderclaw gateway start
|
|
79
|
+
|
|
80
|
+
# 4. Open http://127.0.0.1:19730 and verify:
|
|
81
|
+
# - WebSocket connection succeeds (check browser console)
|
|
82
|
+
# - API calls work (check Network tab)
|
|
83
|
+
|
|
84
|
+
# 5. If all tests pass, publish
|
|
85
|
+
npm publish --access public
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Release Checklist
|
|
89
|
+
|
|
90
|
+
- [ ] Update version in `package.json` and `src/cli/index.ts`
|
|
91
|
+
- [ ] Run `npm run build`
|
|
92
|
+
- [ ] Run `npm pack` and test in clean environment
|
|
93
|
+
- [ ] Verify WebSocket and API proxy work
|
|
94
|
+
- [ ] Commit and push version bump
|
|
95
|
+
- [ ] Run `npm publish --access public`
|
|
96
|
+
|
|
55
97
|
## License
|
|
56
98
|
|
|
57
99
|
MIT
|
|
Binary file
|
package/dist/cli/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { handleGateway } from './gateway.js';
|
|
2
2
|
import { handlePlugin } from './plugin.js';
|
|
3
3
|
import { handleConfig } from './config.js';
|
|
4
|
-
const VERSION = '1.1.
|
|
4
|
+
const VERSION = '1.1.13';
|
|
5
5
|
function printUsage() {
|
|
6
6
|
console.log('CommanderClaw - Multi-device Agent Coordination Framework');
|
|
7
7
|
console.log();
|
package/dist/cli/plugin.js
CHANGED
|
@@ -2,7 +2,7 @@ import * as fs from 'fs';
|
|
|
2
2
|
import * as path from 'path';
|
|
3
3
|
import * as os from 'os';
|
|
4
4
|
import { execSync } from 'child_process';
|
|
5
|
-
import { getPlatforms, findPlatform,
|
|
5
|
+
import { getPlatforms, findPlatform, rl, rlWithDefault, backupFile, restoreBackup, DEFAULT_SERVER_URL, DEFAULT_DEVICE_NAME, } from './utils.js';
|
|
6
6
|
export function handlePlugin(args) {
|
|
7
7
|
if (args.length === 0) {
|
|
8
8
|
printPluginUsage();
|
|
@@ -123,20 +123,6 @@ async function handlePluginInstall(platformName) {
|
|
|
123
123
|
console.log();
|
|
124
124
|
// Collect configuration
|
|
125
125
|
const config = await collectInstallConfig(platform);
|
|
126
|
-
// Get token from server
|
|
127
|
-
try {
|
|
128
|
-
console.log('Fetching token from server...');
|
|
129
|
-
const token = await getTokenFromServer(config.serverUrl);
|
|
130
|
-
config.token = token;
|
|
131
|
-
console.log(`✓ Token obtained: ${maskToken(token)}`);
|
|
132
|
-
console.log();
|
|
133
|
-
}
|
|
134
|
-
catch (e) {
|
|
135
|
-
console.log(`Error: Could not get token from server: ${e.message}`);
|
|
136
|
-
console.log('Make sure the CommanderClaw server is running:');
|
|
137
|
-
console.log(' commanderclaw gateway start');
|
|
138
|
-
process.exit(1);
|
|
139
|
-
}
|
|
140
126
|
// Backup config
|
|
141
127
|
const backupPath = platform.configPath + '.backup';
|
|
142
128
|
backupFile(platform.configPath, backupPath);
|
|
@@ -226,10 +212,16 @@ async function collectInstallConfig(platform) {
|
|
|
226
212
|
const version = await rlWithDefault('Plugin version', 'latest');
|
|
227
213
|
const serverUrl = await rlWithDefault('Server URL', DEFAULT_SERVER_URL);
|
|
228
214
|
const deviceName = await rlWithDefault('Device name', DEFAULT_DEVICE_NAME);
|
|
215
|
+
const token = await rl('Authentication token: ');
|
|
216
|
+
if (!token) {
|
|
217
|
+
console.log('Error: Token is required');
|
|
218
|
+
console.log('Get token from web console: http://127.0.0.1:19730 (Settings → Security)');
|
|
219
|
+
process.exit(1);
|
|
220
|
+
}
|
|
229
221
|
return {
|
|
230
222
|
version,
|
|
231
223
|
serverUrl,
|
|
232
|
-
token
|
|
224
|
+
token,
|
|
233
225
|
deviceName,
|
|
234
226
|
autoConnect: true,
|
|
235
227
|
reconnect: {
|
package/dist/cli/utils.js
CHANGED
|
@@ -21,6 +21,10 @@ export function getPlatforms() {
|
|
|
21
21
|
configPath: path.join(homeDir, '.openclaw', 'openclaw.json'),
|
|
22
22
|
extDir: path.join(homeDir, '.openclaw', 'extensions'),
|
|
23
23
|
detectFunc: () => {
|
|
24
|
+
const configDir = path.join(homeDir, '.openclaw');
|
|
25
|
+
if (fs.existsSync(configDir)) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
24
28
|
try {
|
|
25
29
|
require('child_process').execSync('which openclaw', { stdio: 'ignore' });
|
|
26
30
|
return true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "commanderclaw",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.14",
|
|
4
4
|
"description": "Multi-device Agent Coordination Framework - CLI and OpenClaw/QClaw Plugin",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -48,7 +48,8 @@
|
|
|
48
48
|
"node": ">=18.0.0"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@sinclair/typebox": "^0.32.0"
|
|
51
|
+
"@sinclair/typebox": "^0.32.0",
|
|
52
|
+
"commanderclaw": "^1.1.13"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
54
55
|
"@rollup/plugin-commonjs": "^29.0.2",
|
|
@@ -58,6 +59,7 @@
|
|
|
58
59
|
"@types/node": "^20.0.0",
|
|
59
60
|
"@types/ws": "^8.5.0",
|
|
60
61
|
"rollup": "^4.59.0",
|
|
62
|
+
"tslib": "^2.8.1",
|
|
61
63
|
"typescript": "^5.0.0"
|
|
62
64
|
},
|
|
63
65
|
"openclaw": {
|