FABRIC/package.json
jeda 3457ef35d8 feat(bd-art): SQLite Historical Analytics Storage
Implements persistent storage for historical session analytics:

- Add HistoricalStore class using better-sqlite3
- Schema includes sessions, task_metrics, and error_history tables
- Session management: start/end sessions with worker/task/cost metrics
- Task metrics: record per-bead completion times, costs, tokens
- Error history: track errors with resolution status
- Historical queries: worker comparison across sessions
- Learned recoveries: extract patterns from historical error resolutions
- Integration with EventStore for automatic session persistence
- Historical query methods in WorkerAnalytics
- Enhanced recovery suggestions using historical data in RecoveryManager
- Comprehensive unit tests (20 passing tests)

Database stored at ~/.needle/fabric.db for cross-session persistence.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-07 04:18:45 +00:00

66 lines
1.6 KiB
JSON

{
"name": "@needle/fabric",
"version": "0.1.0",
"description": "Flow Analysis & Bead Reporting Interface Console - Live display for NEEDLE worker activity",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"bin": {
"fabric": "./dist/cli.js"
},
"scripts": {
"build": "tsc",
"build:web": "vite build",
"dev": "tsc --watch",
"dev:web": "vite",
"start": "node dist/cli.js",
"tui": "node dist/cli.js tui",
"web": "node dist/cli.js web",
"clean": "rm -rf dist",
"typecheck": "tsc --noEmit",
"test": "vitest run",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage"
},
"keywords": [
"needle",
"worker",
"monitoring",
"tui",
"dashboard"
],
"author": "",
"license": "ISC",
"type": "module",
"engines": {
"node": ">=18.0.0"
},
"devDependencies": {
"@playwright/test": "^1.58.2",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
"@types/better-sqlite3": "^7.6.13",
"@types/express": "^5.0.6",
"@types/node": "^20.11.0",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@types/ws": "^8.18.1",
"@vitejs/plugin-react": "^5.1.4",
"@vitest/coverage-v8": "^4.0.18",
"jsdom": "^28.1.0",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"typescript": "^5.3.0",
"vite": "^7.3.1",
"vitest": "^4.0.18"
},
"dependencies": {
"@types/blessed": "^0.1.27",
"better-sqlite3": "^12.6.2",
"blessed": "^0.1.81",
"chalk": "^4.1.2",
"commander": "^12.0.0",
"express": "^5.2.1",
"ws": "^8.19.0"
}
}