-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
120 lines (98 loc) · 4.25 KB
/
Makefile
File metadata and controls
120 lines (98 loc) · 4.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# AgentLink — Developer Convenience Makefile
#
# Prerequisites:
# - Node.js >= 20
# - pnpm >= 9
# - Python >= 3.11
# - Docker + Docker Compose
.PHONY: help install build dev typecheck lint test coverage validate release-gate clean \
api-install api-dev api-migrate api-seed-demo \
api-test api-coverage \
docker-up docker-down docker-build \
bootstrap
# ─────────────────────────────────────────────
# Help
# ─────────────────────────────────────────────
help:
@echo ""
@echo "AgentLink — available make targets:"
@echo ""
@echo " install Install all JS/TS dependencies (pnpm)"
@echo " build Build all TS packages and apps"
@echo " dev Start all TS apps in dev/watch mode"
@echo " typecheck Run TypeScript type checking across all packages"
@echo " lint Run linters across all packages"
@echo " test Run all JS/TS tests (vitest via turbo)"
@echo " coverage Run JS/TS tests with coverage report"
@echo " release-gate Canonical MVP release gate (cross-platform) — all workspaces must pass"
@echo " validate Alias for release-gate (same full-stack scope)"
@echo " clean Remove build artifacts and node_modules"
@echo ""
@echo " api-install Install Python deps for apps/api"
@echo " api-migrate Apply Alembic migrations (alembic upgrade head)"
@echo " api-dev Start FastAPI dev server"
@echo " api-seed-demo Seed local demo data (nodes, agents, tasks, audit events)"
@echo " api-test Run Python API tests (pytest with coverage)"
@echo " api-coverage Alias for api-test (coverage always included)"
@echo ""
@echo " docker-up Start full local dev stack via docker-compose"
@echo " docker-down Stop local dev stack"
@echo " docker-build Rebuild Docker images"
@echo ""
@echo " bootstrap First-time dev environment setup"
@echo ""
# ─────────────────────────────────────────────
# JS/TS workspace
# ─────────────────────────────────────────────
install:
pnpm install
build:
pnpm run build
dev:
pnpm run dev
typecheck:
pnpm run typecheck
lint:
pnpm run lint
test:
pnpm run test
coverage:
pnpm run coverage
# Canonical MVP release gate — delegates to scripts/release-gate.js.
# Requires only node >= 20 (already mandated by this repo).
# Identical in scope to `pnpm run release:gate` (both call the same script).
release-gate:
node scripts/release-gate.js
# Alias retained for backwards compatibility.
validate: release-gate
clean:
pnpm run clean
# ─────────────────────────────────────────────
# Python API
# ─────────────────────────────────────────────
api-install:
cd apps/api && pip install -r requirements.txt
api-migrate:
cd apps/api && alembic upgrade head
api-seed-demo:
cd apps/api && python scripts/seed_demo.py
api-test:
cd apps/api && python -m pytest
api-coverage:
cd apps/api && python -m pytest
api-dev:
cd apps/api && uvicorn main:app --reload --host 0.0.0.0 --port 8000
# ─────────────────────────────────────────────
# Docker
# ─────────────────────────────────────────────
docker-up:
docker compose -f docker-compose.dev.yml up
docker-down:
docker compose -f docker-compose.dev.yml down
docker-build:
docker compose -f docker-compose.dev.yml build
# ─────────────────────────────────────────────
# Bootstrap
# ─────────────────────────────────────────────
bootstrap:
@bash scripts/bootstrap.sh