feat(platform): checkpoint current implementation state
This commit is contained in:
@@ -10,6 +10,8 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { execSync } = require('child_process');
|
||||
|
||||
const WORKSPACE_ROOT = fs.realpathSync(process.cwd());
|
||||
|
||||
// Configuration
|
||||
const CONFIG = {
|
||||
enabled: true,
|
||||
@@ -62,9 +64,9 @@ function getUserInfo() {
|
||||
// Get learning stats from memory database
|
||||
function getLearningStats() {
|
||||
const memoryPaths = [
|
||||
path.join(process.cwd(), '.swarm', 'memory.db'),
|
||||
path.join(process.cwd(), '.claude', 'memory.db'),
|
||||
path.join(process.cwd(), 'data', 'memory.db'),
|
||||
path.join(WORKSPACE_ROOT, '.swarm', 'memory.db'),
|
||||
path.join(WORKSPACE_ROOT, '.claude', 'memory.db'),
|
||||
path.join(WORKSPACE_ROOT, 'data', 'memory.db'),
|
||||
];
|
||||
|
||||
let patterns = 0;
|
||||
@@ -90,7 +92,7 @@ function getLearningStats() {
|
||||
}
|
||||
|
||||
// Also check for session files
|
||||
const sessionsPath = path.join(process.cwd(), '.claude', 'sessions');
|
||||
const sessionsPath = path.join(WORKSPACE_ROOT, '.claude', 'sessions');
|
||||
if (fs.existsSync(sessionsPath)) {
|
||||
try {
|
||||
const sessionFiles = fs.readdirSync(sessionsPath).filter(f => f.endsWith('.json'));
|
||||
@@ -132,7 +134,7 @@ function getV3Progress() {
|
||||
// Get security status based on actual scans
|
||||
function getSecurityStatus() {
|
||||
// Check for security scan results in memory
|
||||
const scanResultsPath = path.join(process.cwd(), '.claude', 'security-scans');
|
||||
const scanResultsPath = path.join(WORKSPACE_ROOT, '.claude', 'security-scans');
|
||||
let cvesFixed = 0;
|
||||
const totalCves = 3;
|
||||
|
||||
@@ -147,7 +149,7 @@ function getSecurityStatus() {
|
||||
}
|
||||
|
||||
// Also check .swarm/security for audit results
|
||||
const auditPath = path.join(process.cwd(), '.swarm', 'security');
|
||||
const auditPath = path.join(WORKSPACE_ROOT, '.swarm', 'security');
|
||||
if (fs.existsSync(auditPath)) {
|
||||
try {
|
||||
const audits = fs.readdirSync(auditPath).filter(f => f.includes('audit'));
|
||||
|
||||
Reference in New Issue
Block a user