Skip to content
This repository was archived by the owner on Jul 29, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5871b76
auto-commit for 56e0c649-7407-4817-8aae-6aab925bb1c6
emergent-agent-e1 Feb 7, 2026
913477f
auto-commit for e4a21c09-4adb-4d17-b6cc-87038d2c9f7c
emergent-agent-e1 Feb 7, 2026
c3a9de0
auto-commit for 7c82e4b1-0e88-4caf-8d8f-a745b61d8453
emergent-agent-e1 Feb 7, 2026
f234f17
auto-commit for 11c31a42-aaac-4b41-9577-dbffa4904e74
emergent-agent-e1 Feb 7, 2026
a1d2bca
auto-commit for f6b7e2a2-2f45-4677-92fc-957d5959a8fb
emergent-agent-e1 Feb 7, 2026
2d13105
Auto-generated changes
emergent-agent-e1 Feb 7, 2026
1adb74b
Auto-generated changes
emergent-agent-e1 Feb 7, 2026
0c186f6
Auto-generated changes
emergent-agent-e1 Feb 7, 2026
7967da4
Auto-generated changes
emergent-agent-e1 Feb 7, 2026
0afbc88
auto-commit for e2f77e22-597a-48c7-a4a8-7284291413d8
emergent-agent-e1 Feb 7, 2026
fbabe14
auto-commit for ffdea892-8821-4532-928c-59aacd513bf2
emergent-agent-e1 Feb 7, 2026
9650c04
auto-commit for a6c0b8de-889a-48a6-ba30-72829dc8c633
emergent-agent-e1 Feb 7, 2026
78b9262
auto-commit for 0dfa0f9a-9ff6-46be-b03a-c5fed84f5abb
emergent-agent-e1 Feb 7, 2026
9557613
auto-commit for 148df9d5-cf0f-460d-8261-c1613fc1d1c4
emergent-agent-e1 Feb 7, 2026
b899371
auto-commit for e0106d0d-0424-4e30-b23c-c1d00a262527
emergent-agent-e1 Feb 7, 2026
ebe36a9
Auto-generated changes
emergent-agent-e1 Feb 7, 2026
cd41d82
auto-commit for e1e9dc62-5eaf-4b9e-a036-5767df6b263b
emergent-agent-e1 Feb 7, 2026
c3b0724
auto-commit for 0c70d342-02b7-418f-be34-c5b0009c422b
emergent-agent-e1 Feb 7, 2026
76069a3
auto-commit for f3811ea8-4435-418e-a80d-84db9ece7f55
emergent-agent-e1 Feb 7, 2026
d5aa6a0
auto-commit for a3169e9d-9baa-4819-ac99-c8af082a3bba
emergent-agent-e1 Feb 7, 2026
e376dd7
auto-commit for 698d74b9-609e-4163-aa71-83102a4fc2e7
emergent-agent-e1 Feb 7, 2026
8747f4c
Auto-generated changes
emergent-agent-e1 Feb 7, 2026
d54f9c6
Merge branch 'main' into conflict_060226_2049
erinepshovel-code Apr 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .emergent/emergent.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"job_id": "1e229462-3e1a-459c-a7b7-c20886c651c9",
"created_at": "2026-02-06T23:45:02.849518+00:00Z"
"created_at": "2026-02-07T23:14:31.029020+00:00Z"
}
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,27 @@
# Environment files
*.env
*.env.*
-e
# Environment files
*.env
*.env.*
-e
# Environment files
*.env
*.env.*
-e
# Environment files
*.env
*.env.*
-e
# Environment files
*.env
*.env.*
-e
# Environment files
*.env
*.env.*
-e
# Environment files
*.env
*.env.*
310 changes: 310 additions & 0 deletions COMMANDS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,310 @@
# Quick Reference - PCNA System Commands

## ⚠️ Important Note
You're running as **root** user, so **DO NOT use `sudo`** - it's not needed and will cause "command not found" errors.

---

## 🎮 Service Control

### Check Status
```bash
supervisorctl status
```

### Restart Services
```bash
# Restart everything
supervisorctl restart all

# Restart individual services
supervisorctl restart backend
supervisorctl restart frontend
supervisorctl restart mongodb
```

### Stop Services
```bash
supervisorctl stop all
supervisorctl stop backend
supervisorctl stop frontend
```

### Start Services
```bash
supervisorctl start all
supervisorctl start backend
supervisorctl start frontend
```

### Reload Configuration
```bash
supervisorctl reload
# or
supervisorctl reread && supervisorctl update
```

---

## 📊 System Health Checks

### Quick Status Check
```bash
/app/scripts/status.sh
```

### Manual Health Checks
```bash
# Backend health
curl http://localhost:8001/api/health

# System health
curl http://localhost:8001/api/system-health

# Active seeds
curl http://localhost:8001/api/seeds

# Topology
curl http://localhost:8001/api/topology
```

### Test LLM Integration
```bash
curl -X POST http://localhost:8001/api/llm/chat \
-H "Content-Type: application/json" \
-d '{"prompt":"Hello","provider":"openai","model":"gpt-5.2"}'
```

### Run EDCM Analysis
```bash
curl http://localhost:8001/api/edcm/analyze
```

---

## 📜 View Logs

### Backend Logs
```bash
# Error logs
tail -f /var/log/supervisor/backend.err.log

# Last 50 lines
tail -50 /var/log/supervisor/backend.err.log

# Output logs
tail -f /var/log/supervisor/backend.out.log
```

### Frontend Logs
```bash
# Output logs
tail -f /var/log/supervisor/frontend.out.log

# Last 50 lines
tail -50 /var/log/supervisor/frontend.out.log
```

### MongoDB Logs
```bash
tail -f /var/log/mongodb/mongod.log
```

### All Supervisor Logs
```bash
tail -f /var/log/supervisor/supervisord.log
```

---

## 🔧 Troubleshooting

### Service Won't Start
```bash
# Check status
supervisorctl status backend

# View error logs
tail -50 /var/log/supervisor/backend.err.log

# Restart
supervisorctl restart backend
```

### Backend Issues
```bash
# Check if dependencies are installed
cd /app/backend
pip list | grep -E "fastapi|emergent"

# Reinstall dependencies
/app/scripts/install_backend.sh

# Restart
supervisorctl restart backend
```

### Frontend Issues
```bash
# Check Node.js
node --version
yarn --version

# Reinstall dependencies
cd /app/frontend
rm -rf node_modules
yarn install

# Restart
supervisorctl restart frontend
```

### MongoDB Issues
```bash
# Check if running
supervisorctl status mongodb

# Check logs
tail -50 /var/log/mongodb/mongod.log

# Ensure data directory exists
mkdir -p /data/db

# Restart
supervisorctl restart mongodb
```

### Complete System Reset
```bash
# Stop all
supervisorctl stop all

# Wait
sleep 3

# Start all
supervisorctl start all

# Check status
supervisorctl status
```

---

## 🚀 Quick Start Commands

### Start Everything
```bash
supervisorctl restart all
sleep 5
/app/scripts/status.sh
```

### Check Everything
```bash
# System status
/app/scripts/status.sh

# Or use helper
/app/scripts/commands.sh
```

---

## 📍 Access URLs

- **Dashboard**: http://localhost:3000
- **Backend API**: http://localhost:8001
- **API Docs**: http://localhost:8001/docs

---

## 📁 Important Paths

### Code
- Backend: `/app/backend/`
- Frontend: `/app/frontend/`
- Scripts: `/app/scripts/`

### Logs
- Backend: `/var/log/supervisor/backend.err.log`
- Frontend: `/var/log/supervisor/frontend.out.log`
- MongoDB: `/var/log/mongodb/mongod.log`

### Configuration
- Supervisor: `/etc/supervisor/conf.d/pcna.conf`
- Backend env: `/app/backend/.env`
- Frontend env: `/app/frontend/.env`

---

## ✅ Common Tasks

### Update Backend Code
```bash
# Edit code in /app/backend/
# Backend auto-reloads (no restart needed)
```

### Update Frontend Code
```bash
# Edit code in /app/frontend/src/
# Frontend hot-reloads (no restart needed)
```

### Install New Python Package
```bash
cd /app/backend
pip install package-name
# Add to requirements.txt
supervisorctl restart backend
```

### Install New Node Package
```bash
cd /app/frontend
yarn add package-name
# package.json auto-updates
supervisorctl restart frontend
```

### View All Commands
```bash
/app/scripts/commands.sh
```

---

## 💡 Pro Tips

1. **No sudo needed** - You're root, commands work directly
2. **Hot reload enabled** - Most code changes apply automatically
3. **Check logs first** - When debugging, always check logs
4. **Use helper scripts** - `/app/scripts/` has useful tools
5. **Status check** - Run `/app/scripts/status.sh` anytime

---

## 🆘 Emergency Commands

### Everything Broken?
```bash
supervisorctl restart all
```

### Still Not Working?
```bash
supervisorctl stop all
sleep 5
supervisorctl start all
/app/scripts/status.sh
```

### Need Full Restart?
```bash
supervisorctl reload
```

---

**Remember: No `sudo` needed - you're already root!** ✅
Loading
Loading