erne-universal 0.12.6 → 0.12.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/commands/erne-update.md +36 -0
- package/dashboard/server.js +32 -4
- package/package.json +1 -1
- package/scripts/validate-all.js +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: erne-update
|
|
3
|
+
description: ERNE — Update ERNE itself to the latest version and re-initialize the project
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /erne-update — Update ERNE
|
|
7
|
+
|
|
8
|
+
You are executing the `/erne-update` command. This updates the ERNE harness to the latest npm version and re-applies configuration to the current project.
|
|
9
|
+
|
|
10
|
+
## Process
|
|
11
|
+
|
|
12
|
+
Run the following command:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npx erne-universal@latest update
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
This will:
|
|
19
|
+
1. Check npm for the latest `erne-universal` version
|
|
20
|
+
2. Compare with the currently installed version
|
|
21
|
+
3. If newer, re-run `erne init` preserving existing profile and MCP selections
|
|
22
|
+
4. Update agents, skills, rules, hooks, and commands to the latest versions
|
|
23
|
+
|
|
24
|
+
## When No Update Available
|
|
25
|
+
|
|
26
|
+
If already on the latest version, inform the user and show the current version.
|
|
27
|
+
|
|
28
|
+
## Manual Alternative
|
|
29
|
+
|
|
30
|
+
If the update command fails, suggest:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npx erne-universal@latest init
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
This does a fresh init that preserves user choices (profile, MCP servers).
|
package/dashboard/server.js
CHANGED
|
@@ -1315,9 +1315,6 @@ async function resolvePort() {
|
|
|
1315
1315
|
resolvePort().then((resolvedPort) => {
|
|
1316
1316
|
PORT = resolvedPort;
|
|
1317
1317
|
|
|
1318
|
-
// Register port in ~/.erne/ports.json
|
|
1319
|
-
registerPort(projectDir, PORT, process.pid);
|
|
1320
|
-
|
|
1321
1318
|
// Cleanup on exit
|
|
1322
1319
|
const cleanupRegistry = () => {
|
|
1323
1320
|
unregisterPort(projectDir);
|
|
@@ -1332,7 +1329,13 @@ resolvePort().then((resolvedPort) => {
|
|
|
1332
1329
|
process.exit(0);
|
|
1333
1330
|
});
|
|
1334
1331
|
|
|
1335
|
-
|
|
1332
|
+
// Retry with next free port on EADDRINUSE
|
|
1333
|
+
let retries = 0;
|
|
1334
|
+
const MAX_RETRIES = 10;
|
|
1335
|
+
|
|
1336
|
+
function startServer(port) {
|
|
1337
|
+
PORT = port;
|
|
1338
|
+
server.listen(PORT, () => {
|
|
1336
1339
|
console.log(`ERNE Dashboard running on http://localhost:${PORT}`);
|
|
1337
1340
|
|
|
1338
1341
|
// Wire tab handlers
|
|
@@ -1369,5 +1372,30 @@ resolvePort().then((resolvedPort) => {
|
|
|
1369
1372
|
ecosystemHandler.autoRefresh(projectDir, broadcast);
|
|
1370
1373
|
if (insightsHandler && insightsHandler.autoSnapshot) insightsHandler.autoSnapshot(projectDir);
|
|
1371
1374
|
}, 5000);
|
|
1375
|
+
|
|
1376
|
+
// Register port after successful listen
|
|
1377
|
+
registerPort(projectDir, PORT, process.pid);
|
|
1378
|
+
});
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
server.on('error', (err) => {
|
|
1382
|
+
if (err.code === 'EADDRINUSE' && retries < MAX_RETRIES) {
|
|
1383
|
+
retries++;
|
|
1384
|
+
// Find next free port
|
|
1385
|
+
findFreePort().then((nextPort) => {
|
|
1386
|
+
startServer(nextPort);
|
|
1387
|
+
}).catch(() => {
|
|
1388
|
+
console.error(`Error: No free ports available in range 3333-3399.`);
|
|
1389
|
+
process.exit(1);
|
|
1390
|
+
});
|
|
1391
|
+
} else if (err.code === 'EADDRINUSE') {
|
|
1392
|
+
console.error(`Error: All ports in range 3333-3399 are in use.`);
|
|
1393
|
+
process.exit(1);
|
|
1394
|
+
} else {
|
|
1395
|
+
console.error(`Server error: ${err.message}`);
|
|
1396
|
+
process.exit(1);
|
|
1397
|
+
}
|
|
1372
1398
|
});
|
|
1399
|
+
|
|
1400
|
+
startServer(PORT);
|
|
1373
1401
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "erne-universal",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.8",
|
|
4
4
|
"description": "Complete AI coding agent harness for React Native and Expo \u2014 13 specialized agents, autonomous worker mode, visual debugging, smart routing",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
package/scripts/validate-all.js
CHANGED
|
@@ -76,7 +76,7 @@ for (const f of agentFiles) {
|
|
|
76
76
|
|
|
77
77
|
// Commands
|
|
78
78
|
console.log(' Commands:');
|
|
79
|
-
validateCount('commands', '.md',
|
|
79
|
+
validateCount('commands', '.md', 24, 'commands/'); // 24 command files
|
|
80
80
|
const cmdFiles = fs.readdirSync('commands').filter((f) => f.endsWith('.md'));
|
|
81
81
|
for (const f of cmdFiles) {
|
|
82
82
|
validateFrontmatter(path.join('commands', f), ['name', 'description']);
|