fivocell 5.2.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.
- package/dist/__tests__/sync-engine.test.d.ts +2 -0
- package/dist/__tests__/sync-engine.test.d.ts.map +1 -0
- package/dist/__tests__/sync-engine.test.js +127 -0
- package/dist/__tests__/sync-engine.test.js.map +1 -0
- package/dist/walls/06-memory/database/database.d.ts.map +1 -1
- package/dist/walls/06-memory/database/database.js +35 -0
- package/dist/walls/06-memory/database/database.js.map +1 -1
- package/dist/walls/06-memory/stores/sync-engine.d.ts +61 -0
- package/dist/walls/06-memory/stores/sync-engine.d.ts.map +1 -0
- package/dist/walls/06-memory/stores/sync-engine.js +253 -0
- package/dist/walls/06-memory/stores/sync-engine.js.map +1 -0
- package/dist/walls/07-runtime/cli/cli.js +139 -1
- package/dist/walls/07-runtime/cli/cli.js.map +1 -1
- package/dist/walls/07-runtime/daemon/server.d.ts.map +1 -1
- package/dist/walls/07-runtime/daemon/server.js +123 -0
- package/dist/walls/07-runtime/daemon/server.js.map +1 -1
- package/package.json +1 -1
|
@@ -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,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,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"}
|
|
@@ -1799,6 +1799,10 @@ const MCP_TOOLS = [
|
|
|
1799
1799
|
{ name: 'cell_ci_report_deploy', description: 'Report CI deployment', inputSchema: { type: 'object', properties: { project: { type: 'string' }, environment: { type: 'string', enum: ['staging', 'production', 'preview', 'local'] }, status: { type: 'string', enum: ['success', 'failed', 'rolled_back'] }, version: { type: 'string' }, duration: { type: 'number' } }, required: ['project', 'environment', 'status', 'version'] } },
|
|
1800
1800
|
{ name: 'cell_ci_summary', description: 'Get CI/CD summary with success rates and failure patterns', inputSchema: { type: 'object', properties: { project: { type: 'string' }, days: { type: 'number' } }, required: ['project'] } },
|
|
1801
1801
|
{ name: 'cell_ci_failures', description: 'Get CI failure patterns with severity and suggestions', inputSchema: { type: 'object', properties: { project: { type: 'string' }, days: { type: 'number' } }, required: ['project'] } },
|
|
1802
|
+
{ name: 'cell_sync_status', description: 'Get sync status for a project', inputSchema: { type: 'object', properties: { project: { type: 'string' } }, required: ['project'] } },
|
|
1803
|
+
{ name: 'cell_sync_export', description: 'Export memory to portable encrypted archive', inputSchema: { type: 'object', properties: { project: { type: 'string' } }, required: ['project'] } },
|
|
1804
|
+
{ name: 'cell_sync_import', description: 'Import memory from portable encrypted archive', inputSchema: { type: 'object', properties: { payload: { type: 'object' }, targetProject: { type: 'string' } }, required: ['payload', 'targetProject'] } },
|
|
1805
|
+
{ name: 'cell_sync_snapshot', description: 'Save a sync snapshot (checksum of all events)', inputSchema: { type: 'object', properties: { project: { type: 'string' } }, required: ['project'] } },
|
|
1802
1806
|
];
|
|
1803
1807
|
async function handleMCPToolCall(name, args) {
|
|
1804
1808
|
try {
|
|
@@ -3128,6 +3132,29 @@ async function handleMCPToolCall(name, args) {
|
|
|
3128
3132
|
const failures = detectCIFailurePatterns(failProject, args.days || 30);
|
|
3129
3133
|
return { failures };
|
|
3130
3134
|
}
|
|
3135
|
+
case 'cell_sync_status': {
|
|
3136
|
+
const { getSyncStatus } = require('../../06-memory/stores/sync-engine');
|
|
3137
|
+
const syncProject = args.project || require('path').basename(process.cwd());
|
|
3138
|
+
const status = getSyncStatus(syncProject);
|
|
3139
|
+
return { status };
|
|
3140
|
+
}
|
|
3141
|
+
case 'cell_sync_export': {
|
|
3142
|
+
const { exportMemory } = require('../../06-memory/stores/sync-engine');
|
|
3143
|
+
const exportProject = args.project || require('path').basename(process.cwd());
|
|
3144
|
+
const payload = exportMemory(exportProject);
|
|
3145
|
+
return { payload };
|
|
3146
|
+
}
|
|
3147
|
+
case 'cell_sync_import': {
|
|
3148
|
+
const { importMemory } = require('../../06-memory/stores/sync-engine');
|
|
3149
|
+
const result = importMemory(args.payload, args.targetProject);
|
|
3150
|
+
return { result };
|
|
3151
|
+
}
|
|
3152
|
+
case 'cell_sync_snapshot': {
|
|
3153
|
+
const { saveSyncSnapshot } = require('../../06-memory/stores/sync-engine');
|
|
3154
|
+
const snapProject = args.project || require('path').basename(process.cwd());
|
|
3155
|
+
saveSyncSnapshot(snapProject);
|
|
3156
|
+
return { success: true };
|
|
3157
|
+
}
|
|
3131
3158
|
default:
|
|
3132
3159
|
return { error: `unknown tool: ${name}` };
|
|
3133
3160
|
}
|
|
@@ -3234,6 +3261,102 @@ try {
|
|
|
3234
3261
|
catch (e) {
|
|
3235
3262
|
console.error('AI memory init failed:', e);
|
|
3236
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
|
+
});
|
|
3237
3360
|
// ─── Start with port conflict handling ─────────────────────────────────
|
|
3238
3361
|
const server = app.listen(PORT, () => {
|
|
3239
3362
|
console.log(`Cell Daemon running on http://localhost:${PORT}`);
|