Add a full host filesystem browser reachable from the sidebar (/files):
breadcrumb navigation, browse-root chips, show-hidden toggle, and a table
with size/permissions/mtime. Text files open in a Monaco editor (language by
extension); binary/oversized files fall back to download. Admins can create
folders/files, rename, delete (recursive for dirs), upload, and save edits;
download is available to all users. Every mutation is audit-logged.
Backend: new services/file_service.py reuses device_service's sandbox helpers
(confined to ALLOWED_BROWSE_ROOTS, mapped via HOST_ROOT_PREFIX) and rejects
path traversal and deleting a browse root. routers/files.py exposes
/api/files/{list,read,download,write,mkdir,touch,rename,upload,DELETE}
(reads: any user; mutations: admin). device_service.browse entries gained
mtime + symlink (non-breaking).
Deployment: ALLOWED_BROWSE_ROOTS + HOST_ROOT_PREFIX are now env-wired in
docker-compose.yml and .env.example, with a commented /:/host_root mount to
browse/manage the real host filesystem.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
36 lines
854 B
JSON
36 lines
854 B
JSON
{
|
|
"name": "stackpilot-frontend",
|
|
"private": true,
|
|
"version": "0.12.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc -b && vite build",
|
|
"preview": "vite preview"
|
|
},
|
|
"dependencies": {
|
|
"@monaco-editor/react": "^4.6.0",
|
|
"@tanstack/react-query": "^5.62.7",
|
|
"axios": "^1.7.9",
|
|
"clsx": "^2.1.1",
|
|
"lucide-react": "^0.468.0",
|
|
"react": "^18.3.1",
|
|
"react-dom": "^18.3.1",
|
|
"react-router-dom": "^6.28.0",
|
|
"sonner": "^1.7.1",
|
|
"tailwind-merge": "^2.5.5",
|
|
"zustand": "^5.0.2"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^20.17.10",
|
|
"@types/react": "^18.3.17",
|
|
"@types/react-dom": "^18.3.5",
|
|
"@vitejs/plugin-react": "^4.3.4",
|
|
"autoprefixer": "^10.4.20",
|
|
"postcss": "^8.4.49",
|
|
"tailwindcss": "^3.4.17",
|
|
"typescript": "^5.7.2",
|
|
"vite": "^5.4.11"
|
|
}
|
|
}
|