agentfit 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -34
- package/app/(dashboard)/daily/page.tsx +1 -1
- package/app/(dashboard)/flow/page.tsx +17 -0
- package/app/(dashboard)/layout.tsx +2 -0
- package/app/(dashboard)/page.tsx +24 -5
- package/app/(dashboard)/reports/[id]/page.tsx +72 -0
- package/app/(dashboard)/reports/page.tsx +132 -0
- package/app/(dashboard)/sessions/[id]/page.tsx +167 -0
- package/app/(dashboard)/settings/page.tsx +180 -0
- package/app/api/backup/route.ts +215 -0
- package/app/api/check/route.ts +11 -1
- package/app/api/command-insights/route.ts +13 -0
- package/app/api/images-analysis/route.ts +3 -4
- package/app/api/reports/[id]/route.ts +23 -0
- package/app/api/reports/route.ts +50 -0
- package/app/api/reset/route.ts +21 -0
- package/app/api/session/route.ts +40 -0
- package/app/api/usage/route.ts +25 -1
- package/app/layout.tsx +1 -1
- package/bin/agentfit.mjs +2 -2
- package/components/agent-coach.tsx +256 -129
- package/components/app-sidebar.tsx +258 -8
- package/components/backup-section.tsx +236 -0
- package/components/daily-chart.tsx +404 -83
- package/components/dashboard-shell.tsx +9 -24
- package/components/data-provider.tsx +66 -2
- package/components/fitness-score.tsx +95 -54
- package/components/overview-cards.tsx +148 -41
- package/components/report-view.tsx +307 -0
- package/components/screenshots-analysis.tsx +51 -46
- package/components/session-chatlog.tsx +124 -0
- package/components/session-timeline.tsx +184 -0
- package/components/session-workflow.tsx +183 -0
- package/components/sessions-table.tsx +9 -1
- package/components/tool-flow-graph.tsx +144 -0
- package/components/ui/carousel.tsx +242 -0
- package/components/ui/sidebar.tsx +1 -1
- package/components/ui/sonner.tsx +51 -0
- package/generated/prisma/browser.ts +5 -0
- package/generated/prisma/client.ts +5 -0
- package/generated/prisma/internal/class.ts +14 -4
- package/generated/prisma/internal/prismaNamespace.ts +96 -2
- package/generated/prisma/internal/prismaNamespaceBrowser.ts +20 -1
- package/generated/prisma/models/Report.ts +1219 -0
- package/generated/prisma/models/Session.ts +187 -1
- package/generated/prisma/models.ts +1 -0
- package/lib/coach.ts +530 -211
- package/lib/command-insights.ts +231 -0
- package/lib/db.ts +1 -1
- package/lib/parse-codex.ts +5 -0
- package/lib/parse-logs.ts +65 -0
- package/lib/queries-codex.ts +22 -0
- package/lib/queries.ts +42 -0
- package/lib/report.ts +156 -0
- package/lib/session-detail.ts +382 -0
- package/lib/sync.ts +77 -0
- package/lib/tool-flow.ts +71 -0
- package/next.config.mjs +6 -1
- package/package.json +16 -2
- package/plugins/cost-heatmap/component.tsx +72 -50
- package/prisma/schema.prisma +17 -0
- package/.claude/settings.local.json +0 -26
- package/CONTRIBUTING.md +0 -209
- package/prisma/migrations/20260328152517_init/migration.sql +0 -41
- package/prisma/migrations/20260328153801_add_image_model/migration.sql +0 -18
- package/prisma/migrations/migration_lock.toml +0 -3
- package/prisma.config.ts +0 -14
- package/setup.sh +0 -73
package/setup.sh
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
# ─── AgentFit Installer ─────────────────────────────────────────────
|
|
5
|
-
# Usage:
|
|
6
|
-
# curl -fsSL https://raw.githubusercontent.com/harrywang/agentfit/main/setup.sh | bash
|
|
7
|
-
#
|
|
8
|
-
# Or clone manually:
|
|
9
|
-
# git clone https://github.com/harrywang/agentfit.git && cd agentfit && ./setup.sh
|
|
10
|
-
# ─────────────────────────────────────────────────────────────────────
|
|
11
|
-
|
|
12
|
-
REPO="https://github.com/harrywang/agentfit.git"
|
|
13
|
-
DIR="agentfit"
|
|
14
|
-
PORT="${AGENTFIT_PORT:-3000}"
|
|
15
|
-
|
|
16
|
-
info() { printf "\033[1;34m==>\033[0m %s\n" "$1"; }
|
|
17
|
-
ok() { printf "\033[1;32m==>\033[0m %s\n" "$1"; }
|
|
18
|
-
error() { printf "\033[1;31m==>\033[0m %s\n" "$1" >&2; }
|
|
19
|
-
|
|
20
|
-
# ─── Prerequisites ───────────────────────────────────────────────────
|
|
21
|
-
|
|
22
|
-
command -v node >/dev/null 2>&1 || { error "Node.js is required. Install it from https://nodejs.org"; exit 1; }
|
|
23
|
-
command -v npm >/dev/null 2>&1 || { error "npm is required. It ships with Node.js."; exit 1; }
|
|
24
|
-
|
|
25
|
-
NODE_MAJOR=$(node -e "process.stdout.write(String(process.versions.node.split('.')[0]))")
|
|
26
|
-
if [ "$NODE_MAJOR" -lt 20 ]; then
|
|
27
|
-
error "Node.js 20+ is required (found v$(node -v)). Please upgrade."
|
|
28
|
-
exit 1
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
# ─── Clone (skip if already inside the repo) ────────────────────────
|
|
32
|
-
|
|
33
|
-
if [ ! -f "package.json" ] || ! grep -q '"agentfit"' package.json 2>/dev/null; then
|
|
34
|
-
if [ -d "$DIR" ]; then
|
|
35
|
-
info "Directory '$DIR' already exists — pulling latest..."
|
|
36
|
-
cd "$DIR"
|
|
37
|
-
git pull --ff-only
|
|
38
|
-
else
|
|
39
|
-
info "Cloning AgentFit..."
|
|
40
|
-
git clone "$REPO" "$DIR"
|
|
41
|
-
cd "$DIR"
|
|
42
|
-
fi
|
|
43
|
-
fi
|
|
44
|
-
|
|
45
|
-
# ─── Install ─────────────────────────────────────────────────────────
|
|
46
|
-
|
|
47
|
-
info "Installing dependencies..."
|
|
48
|
-
npm install
|
|
49
|
-
|
|
50
|
-
# ─── Database ────────────────────────────────────────────────────────
|
|
51
|
-
|
|
52
|
-
info "Setting up database..."
|
|
53
|
-
echo 'DATABASE_URL="file:./dev.db"' > .env
|
|
54
|
-
npx prisma generate
|
|
55
|
-
npx prisma migrate deploy
|
|
56
|
-
|
|
57
|
-
# ─── Build ───────────────────────────────────────────────────────────
|
|
58
|
-
|
|
59
|
-
info "Building production bundle..."
|
|
60
|
-
npm run build
|
|
61
|
-
|
|
62
|
-
# ─── Done ────────────────────────────────────────────────────────────
|
|
63
|
-
|
|
64
|
-
ok "AgentFit is ready!"
|
|
65
|
-
echo ""
|
|
66
|
-
echo " Start the dashboard:"
|
|
67
|
-
echo " cd ${DIR} && npm start"
|
|
68
|
-
echo ""
|
|
69
|
-
echo " Or run in dev mode:"
|
|
70
|
-
echo " cd ${DIR} && npm run dev"
|
|
71
|
-
echo ""
|
|
72
|
-
echo " Then open http://localhost:${PORT}"
|
|
73
|
-
echo ""
|