fivocell 5.3.0 → 5.4.0
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/walls/07-runtime/daemon/server.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAExE,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEpE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAElE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAE9E,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAE1E,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAExE,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAExE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;AAE7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAE1E,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAE9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAC;AAEpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAE1F,OAAO,EAAE,sBAAsB,EAAE,MAAM,uDAAuD,CAAC;AAE/F,OAAO,EAA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MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AAEvF,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAE9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAE7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AAExF,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AAEjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAElF,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AAEzF,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AA0F3D,QAAA,MAAM,GAAG,6CAAY,CAAC;AAQtB,QAAA,MAAM,OAAO;;;mBAMuB,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0EhD,CAAC;AAm8LF,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -3261,6 +3261,102 @@ try {
|
|
|
3261
3261
|
catch (e) {
|
|
3262
3262
|
console.error('AI memory init failed:', e);
|
|
3263
3263
|
}
|
|
3264
|
+
// ─── Phase 10: Web Dashboard ──────────────────────────────────────────────
|
|
3265
|
+
app.get('/dashboard', (_req, res) => {
|
|
3266
|
+
const htmlPath = require('path').join(__dirname, 'dashboard.html');
|
|
3267
|
+
try {
|
|
3268
|
+
const html = require('fs').readFileSync(htmlPath, 'utf-8');
|
|
3269
|
+
res.send(html);
|
|
3270
|
+
}
|
|
3271
|
+
catch {
|
|
3272
|
+
res.status(500).send('Dashboard not found');
|
|
3273
|
+
}
|
|
3274
|
+
});
|
|
3275
|
+
app.get('/api/dashboard', async (_req, res) => {
|
|
3276
|
+
try {
|
|
3277
|
+
const { detectProject } = require('../setup/setup');
|
|
3278
|
+
const { getMemoryEvents } = require('../../06-memory/stores/memory-event-store');
|
|
3279
|
+
const { getSyncStatus } = require('../../06-memory/stores/sync-engine');
|
|
3280
|
+
const { getCISummary } = require('../../06-memory/stores/ci-reporter');
|
|
3281
|
+
const project = detectProject(process.cwd()).name || 'default';
|
|
3282
|
+
const events = getMemoryEvents({ project, limit: 10 });
|
|
3283
|
+
const syncStatus = getSyncStatus(project);
|
|
3284
|
+
let ciSummary = null;
|
|
3285
|
+
let health = null;
|
|
3286
|
+
let velocity = null;
|
|
3287
|
+
let errorTrends = null;
|
|
3288
|
+
try {
|
|
3289
|
+
const { computeMemoryHealth } = require('../../06-memory/stores/memory-health');
|
|
3290
|
+
health = computeMemoryHealth(project);
|
|
3291
|
+
}
|
|
3292
|
+
catch { }
|
|
3293
|
+
try {
|
|
3294
|
+
const { getDeveloperVelocity } = require('../../06-memory/stores/developer-velocity');
|
|
3295
|
+
velocity = getDeveloperVelocity(project, 30);
|
|
3296
|
+
}
|
|
3297
|
+
catch { }
|
|
3298
|
+
try {
|
|
3299
|
+
const { getErrorTrends } = require('../../06-memory/stores/error-trends');
|
|
3300
|
+
errorTrends = getErrorTrends(project, 30);
|
|
3301
|
+
}
|
|
3302
|
+
catch { }
|
|
3303
|
+
try {
|
|
3304
|
+
ciSummary = getCISummary(project, 30);
|
|
3305
|
+
}
|
|
3306
|
+
catch { }
|
|
3307
|
+
const db = require('../../06-memory/database/database').getDb();
|
|
3308
|
+
const evCount = db.prepare('SELECT COUNT(*) as c FROM memory_events WHERE project = ?').get(project)?.c || 0;
|
|
3309
|
+
const projCount = db.prepare('SELECT COUNT(DISTINCT name) as c FROM projects').get()?.c || 0;
|
|
3310
|
+
res.json({
|
|
3311
|
+
memoryEvents: evCount,
|
|
3312
|
+
memoryScore: health?.score ?? 0,
|
|
3313
|
+
activeProjects: projCount,
|
|
3314
|
+
ciBuilds: ciSummary?.totalBuilds ?? 0,
|
|
3315
|
+
health: health ? {
|
|
3316
|
+
score: health.score,
|
|
3317
|
+
grade: health.grade,
|
|
3318
|
+
completeness: health.completeness,
|
|
3319
|
+
consistency: health.consistency,
|
|
3320
|
+
freshness: health.freshness,
|
|
3321
|
+
coverage: health.coverage,
|
|
3322
|
+
} : null,
|
|
3323
|
+
sync: {
|
|
3324
|
+
lastSyncAt: syncStatus.lastSyncAt,
|
|
3325
|
+
pendingUpload: syncStatus.pendingUpload,
|
|
3326
|
+
conflicts: syncStatus.conflicts,
|
|
3327
|
+
encryptionKeySet: syncStatus.encryptionKeySet,
|
|
3328
|
+
},
|
|
3329
|
+
velocity: velocity ? {
|
|
3330
|
+
score: velocity.score,
|
|
3331
|
+
avgCommitsPerDay: velocity.avgCommitsPerDay,
|
|
3332
|
+
avgFixTimeHours: velocity.avgFixTimeHours,
|
|
3333
|
+
} : null,
|
|
3334
|
+
errorTrends: errorTrends ? {
|
|
3335
|
+
errorRate: errorTrends.errorRate,
|
|
3336
|
+
fixRate: errorTrends.fixRate,
|
|
3337
|
+
regressions: errorTrends.regressions,
|
|
3338
|
+
} : null,
|
|
3339
|
+
ci: ciSummary ? {
|
|
3340
|
+
totalBuilds: ciSummary.totalBuilds,
|
|
3341
|
+
successRate: ciSummary.successRate,
|
|
3342
|
+
totalTests: ciSummary.totalTests,
|
|
3343
|
+
testPassRate: ciSummary.testPassRate,
|
|
3344
|
+
failurePatterns: ciSummary.failurePatterns || [],
|
|
3345
|
+
} : null,
|
|
3346
|
+
recentEvents: events.map((e) => ({
|
|
3347
|
+
id: e.id,
|
|
3348
|
+
type: e.type,
|
|
3349
|
+
importance: e.importance,
|
|
3350
|
+
summary: e.summary,
|
|
3351
|
+
topic: e.topic,
|
|
3352
|
+
created_at: e.created_at,
|
|
3353
|
+
})),
|
|
3354
|
+
});
|
|
3355
|
+
}
|
|
3356
|
+
catch (err) {
|
|
3357
|
+
res.status(500).json({ error: err.message });
|
|
3358
|
+
}
|
|
3359
|
+
});
|
|
3264
3360
|
// ─── Start with port conflict handling ─────────────────────────────────
|
|
3265
3361
|
const server = app.listen(PORT, () => {
|
|
3266
3362
|
console.log(`Cell Daemon running on http://localhost:${PORT}`);
|