feat(platform): checkpoint current implementation state
This commit is contained in:
@@ -7,7 +7,8 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const SESSION_DIR = path.join(process.cwd(), '.claude-flow', 'sessions');
|
||||
const WORKSPACE_ROOT = fs.realpathSync(process.cwd());
|
||||
const SESSION_DIR = path.join(WORKSPACE_ROOT, '.claude-flow', 'sessions');
|
||||
const SESSION_FILE = path.join(SESSION_DIR, 'current.json');
|
||||
|
||||
const commands = {
|
||||
@@ -16,7 +17,7 @@ const commands = {
|
||||
const session = {
|
||||
id: sessionId,
|
||||
startedAt: new Date().toISOString(),
|
||||
cwd: process.cwd(),
|
||||
cwd: WORKSPACE_ROOT,
|
||||
context: {},
|
||||
metrics: {
|
||||
edits: 0,
|
||||
|
||||
@@ -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'));
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# Claude Flow V3 - Real-time Swarm Activity Monitor
|
||||
# Continuously monitors and updates metrics based on running processes
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd -P)"
|
||||
METRICS_DIR="$PROJECT_ROOT/.claude-flow/metrics"
|
||||
UPDATE_SCRIPT="$SCRIPT_DIR/update-v3-progress.sh"
|
||||
|
||||
@@ -208,4 +208,4 @@ case "${1:-check}" in
|
||||
echo "Use '$0 help' for usage information"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user