@yemi33/minions 0.1.386 → 0.1.387
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/CHANGELOG.md +5 -0
- package/dashboard.js +9 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dashboard.js
CHANGED
|
@@ -173,10 +173,11 @@ async function checkNpmVersion() {
|
|
|
173
173
|
try {
|
|
174
174
|
const https = require('https');
|
|
175
175
|
const data = await new Promise((resolve, reject) => {
|
|
176
|
-
const req = https.get(`https://registry.npmjs.org/${PKG_NAME}/latest`, { timeout: 5000 }, (
|
|
176
|
+
const req = https.get(`https://registry.npmjs.org/${PKG_NAME}/latest`, { timeout: 5000 }, (resp) => {
|
|
177
|
+
if (resp.statusCode !== 200) { reject(new Error('npm registry ' + resp.statusCode)); resp.resume(); return; }
|
|
177
178
|
let body = '';
|
|
178
|
-
|
|
179
|
-
|
|
179
|
+
resp.on('data', c => body += c);
|
|
180
|
+
resp.on('end', () => { try { resolve(JSON.parse(body)); } catch { reject(new Error('bad json')); } });
|
|
180
181
|
});
|
|
181
182
|
req.on('error', reject);
|
|
182
183
|
req.on('timeout', () => { req.destroy(); reject(new Error('timeout')); });
|
|
@@ -210,7 +211,11 @@ function getDiskVersion() {
|
|
|
210
211
|
const now = Date.now();
|
|
211
212
|
if (_diskVersionCache && (now - _diskVersionCacheTs) < DISK_VERSION_TTL) return _diskVersionCache;
|
|
212
213
|
let diskVersion = null;
|
|
213
|
-
try {
|
|
214
|
+
try {
|
|
215
|
+
const pkgPath = require.resolve('./package.json');
|
|
216
|
+
delete require.cache[pkgPath]; // bust Node's require cache so npm updates are detected
|
|
217
|
+
diskVersion = require('./package.json').version;
|
|
218
|
+
} catch {}
|
|
214
219
|
let diskCommit = null;
|
|
215
220
|
try { diskCommit = require('child_process').execSync('git rev-parse --short HEAD', { cwd: MINIONS_DIR, encoding: 'utf8', timeout: 5000, windowsHide: true }).trim(); } catch {}
|
|
216
221
|
_diskVersionCache = { diskVersion, diskCommit };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.387",
|
|
4
4
|
"description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
|
|
5
5
|
"bin": {
|
|
6
6
|
"minions": "bin/minions.js"
|