erne-universal 0.13.4 → 0.13.6
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 +2 -0
- package/dashboard/server.js +5 -3
- package/lib/audit.js +12 -7
- package/lib/dashboard.js +1 -1
- package/lib/start.js +1 -1
- package/package.json +1 -1
- package/scripts/hooks/session-start.js +3 -2
package/README.md
CHANGED
|
@@ -223,6 +223,8 @@ Each agent has a distinct personality, quantified success metrics, and memory in
|
|
|
223
223
|
|
|
224
224
|
ERNE includes a built-in context intelligence system (auto-enabled with dashboard) that compresses tool outputs by **97-100%**, indexes content with FTS5 search, and manages your context budget. See [BENCHMARK.md](BENCHMARK.md) for the full 21-scenario breakdown.
|
|
225
225
|
|
|
226
|
+
> **Pairs well with [context-mem](https://github.com/JubaKitiashvili/context-mem)** — ERNE gives your AI deep React Native knowledge, context-mem gives it persistent memory across sessions. Together: an AI assistant that knows RN best practices AND remembers your project patterns. `npm i context-mem && npx context-mem init`
|
|
227
|
+
|
|
226
228
|
---
|
|
227
229
|
|
|
228
230
|
## 💰 Token Efficiency
|
package/dashboard/server.js
CHANGED
|
@@ -64,6 +64,8 @@ const {
|
|
|
64
64
|
unregisterPort,
|
|
65
65
|
findFreePort,
|
|
66
66
|
getRegisteredPort,
|
|
67
|
+
PORT_RANGE_START,
|
|
68
|
+
PORT_RANGE_END,
|
|
67
69
|
} = require('../scripts/hooks/lib/port-registry');
|
|
68
70
|
|
|
69
71
|
// Port resolution: --port flag > ERNE_DASHBOARD_PORT env > registry > find free port
|
|
@@ -1383,7 +1385,7 @@ async function resolvePort() {
|
|
|
1383
1385
|
try {
|
|
1384
1386
|
return await findFreePort();
|
|
1385
1387
|
} catch {
|
|
1386
|
-
return 3333; // ultimate fallback
|
|
1388
|
+
return parseInt(process.env.ERNE_DASHBOARD_PORT, 10) || 3333; // ultimate fallback
|
|
1387
1389
|
}
|
|
1388
1390
|
}
|
|
1389
1391
|
|
|
@@ -1460,11 +1462,11 @@ resolvePort().then((resolvedPort) => {
|
|
|
1460
1462
|
findFreePort().then((nextPort) => {
|
|
1461
1463
|
startServer(nextPort);
|
|
1462
1464
|
}).catch(() => {
|
|
1463
|
-
console.error(`Error: No free ports available in range
|
|
1465
|
+
console.error(`Error: No free ports available in range ${PORT_RANGE_START}-${PORT_RANGE_END}.`);
|
|
1464
1466
|
process.exit(1);
|
|
1465
1467
|
});
|
|
1466
1468
|
} else if (err.code === 'EADDRINUSE') {
|
|
1467
|
-
console.error(`Error: All ports in range
|
|
1469
|
+
console.error(`Error: All ports in range ${PORT_RANGE_START}-${PORT_RANGE_END} are in use.`);
|
|
1468
1470
|
process.exit(1);
|
|
1469
1471
|
} else {
|
|
1470
1472
|
console.error(`Server error: ${err.message}`);
|
package/lib/audit.js
CHANGED
|
@@ -159,8 +159,8 @@ function checkSecurity(cwd, pkg, deps, findings, strengths) {
|
|
|
159
159
|
severity: SEVERITY.warning,
|
|
160
160
|
category: CATEGORY.security,
|
|
161
161
|
title: 'AsyncStorage used without secure storage',
|
|
162
|
-
detail: 'Sensitive data like auth tokens should use
|
|
163
|
-
fix: 'npm install expo-secure-store',
|
|
162
|
+
detail: 'Sensitive data like auth tokens should use a secure storage solution, not AsyncStorage.',
|
|
163
|
+
fix: detection.framework === 'bare-rn' ? 'npm install react-native-keychain' : 'npx expo install expo-secure-store',
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
166
|
|
|
@@ -192,6 +192,7 @@ function checkPerformance(cwd, deps, detection, findings, strengths) {
|
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
// Image optimization
|
|
195
|
+
const isExpo = detection.framework === 'expo-managed' || detection.framework === 'expo-bare';
|
|
195
196
|
if (deps['expo-image']) {
|
|
196
197
|
strengths.push({ category: CATEGORY.performance, title: 'expo-image for optimized image loading' });
|
|
197
198
|
} else if (deps['react-native-fast-image']) {
|
|
@@ -201,8 +202,10 @@ function checkPerformance(cwd, deps, detection, findings, strengths) {
|
|
|
201
202
|
severity: SEVERITY.info,
|
|
202
203
|
category: CATEGORY.performance,
|
|
203
204
|
title: 'No optimized image library detected',
|
|
204
|
-
detail:
|
|
205
|
-
|
|
205
|
+
detail: isExpo
|
|
206
|
+
? 'expo-image provides better caching and performance than the built-in Image component.'
|
|
207
|
+
: 'react-native-fast-image provides better caching and performance than the built-in Image component.',
|
|
208
|
+
fix: isExpo ? 'npx expo install expo-image' : 'npm install react-native-fast-image',
|
|
206
209
|
});
|
|
207
210
|
}
|
|
208
211
|
|
|
@@ -283,7 +286,7 @@ function checkArchitecture(cwd, deps, detection, findings, strengths) {
|
|
|
283
286
|
category: CATEGORY.codeQuality,
|
|
284
287
|
title: 'No TypeScript configuration found',
|
|
285
288
|
detail: 'TypeScript significantly reduces runtime errors in React Native apps.',
|
|
286
|
-
fix: 'npx expo install typescript @types/react',
|
|
289
|
+
fix: detection.framework === 'bare-rn' ? 'npm install --save-dev typescript @types/react' : 'npx expo install typescript @types/react',
|
|
287
290
|
});
|
|
288
291
|
}
|
|
289
292
|
|
|
@@ -354,7 +357,9 @@ function checkTesting(cwd, deps, detection, findings, strengths) {
|
|
|
354
357
|
detail: hasTestingLib ? 'Testing library installed but no tests written.' : 'No testing framework or tests found.',
|
|
355
358
|
fix: hasTestingLib
|
|
356
359
|
? 'Create __tests__/ directory and add component tests'
|
|
357
|
-
:
|
|
360
|
+
: detection.framework === 'bare-rn'
|
|
361
|
+
? 'npm install --save-dev jest @testing-library/react-native react-test-renderer'
|
|
362
|
+
: 'npx expo install jest @testing-library/react-native jest-expo',
|
|
358
363
|
});
|
|
359
364
|
}
|
|
360
365
|
|
|
@@ -493,7 +498,7 @@ function checkCodeQuality(cwd, deps, detection, findings, strengths) {
|
|
|
493
498
|
category: CATEGORY.codeQuality,
|
|
494
499
|
title: 'No ESLint configuration detected',
|
|
495
500
|
detail: 'Linting helps maintain consistent code quality.',
|
|
496
|
-
fix: 'npx expo lint',
|
|
501
|
+
fix: detection.framework === 'bare-rn' ? 'npm install --save-dev eslint @react-native/eslint-config' : 'npx expo lint',
|
|
497
502
|
});
|
|
498
503
|
}
|
|
499
504
|
|
package/lib/dashboard.js
CHANGED
|
@@ -21,7 +21,7 @@ const SERVER_PATH = path.resolve(__dirname, '..', 'dashboard', 'server.js');
|
|
|
21
21
|
|
|
22
22
|
function parseArgs(argv) {
|
|
23
23
|
const args = argv.slice(3);
|
|
24
|
-
let port = 3333;
|
|
24
|
+
let port = parseInt(process.env.ERNE_DASHBOARD_PORT, 10) || 3333;
|
|
25
25
|
let open = true;
|
|
26
26
|
let context = process.env.ERNE_CONTEXT === 'true';
|
|
27
27
|
|
package/lib/start.js
CHANGED
|
@@ -7,7 +7,7 @@ const { fork, execSync } = require('child_process');
|
|
|
7
7
|
const path = require('path');
|
|
8
8
|
|
|
9
9
|
const SERVER_PATH = path.resolve(__dirname, '..', 'dashboard', 'server.js');
|
|
10
|
-
const DEFAULT_PORT = 3333;
|
|
10
|
+
const DEFAULT_PORT = parseInt(process.env.ERNE_DASHBOARD_PORT, 10) || 3333;
|
|
11
11
|
|
|
12
12
|
function checkPort(port) {
|
|
13
13
|
return new Promise((resolve, reject) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "erne-universal",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.6",
|
|
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",
|
|
@@ -103,7 +103,7 @@ let dashboardUrl = '';
|
|
|
103
103
|
|
|
104
104
|
if (hasSettings) {
|
|
105
105
|
try {
|
|
106
|
-
const { getRegisteredPort } = require('./lib/port-registry');
|
|
106
|
+
const { getRegisteredPort, resolveDashboardPort } = require('./lib/port-registry');
|
|
107
107
|
const existingPort = getRegisteredPort(projectDir);
|
|
108
108
|
if (existingPort) {
|
|
109
109
|
dashboardUrl = `http://localhost:${existingPort}`;
|
|
@@ -118,7 +118,8 @@ if (hasSettings) {
|
|
|
118
118
|
env: { ...process.env, ERNE_PROJECT_DIR: projectDir },
|
|
119
119
|
});
|
|
120
120
|
child.unref();
|
|
121
|
-
|
|
121
|
+
const startPort = resolveDashboardPort(projectDir);
|
|
122
|
+
dashboardUrl = `http://localhost:${startPort} (starting...)`;
|
|
122
123
|
} catch {
|
|
123
124
|
/* auto-start failed — skip */
|
|
124
125
|
}
|