-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
83 lines (64 loc) · 3.26 KB
/
Copy pathMakefile
File metadata and controls
83 lines (64 loc) · 3.26 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
.PHONY: help setup dev install 01-simplest-bot 02-persistent-sessions 03-personality-soul 04-tools-agent-loop 05-permission-controls 06-gateway 07-context-compaction 08-long-term-memory 09-concurrency-scheduling 10-multi-agent-integration test clean
help: ## Show this help message
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
setup: ## Initial setup (install deps, create .env)
@if [ ! -f .env ]; then \
echo "Creating .env..."; \
cp .env.example .env; \
echo "✓ .env created — edit it with your ANTHROPIC_API_KEY and TELEGRAM_BOT_TOKEN"; \
else \
echo ".env already exists"; \
fi
@uv sync
@echo "✓ Ready! Run 'make dev' to start the first module"
install: ## Install dependencies using uv
@echo "Installing dependencies..."
@uv sync
dev: setup run ## Setup and run the first module (one command to start!)
run: 01-simplest-bot ## Run the first module - start here!
# =============================================================================
# Workshop Modules
# =============================================================================
01-simplest-bot: ## 01 Simplest Bot — 20-line Telegram bot (start here!)
@echo "Running 01: Simplest Bot..."
@uv run python 01-simplest-bot/bot.py
02-persistent-sessions: ## 02 Persistent Sessions — JSONL per-user storage
@echo "Running 02: Persistent Sessions..."
@uv run python 02-persistent-sessions/bot.py
03-personality-soul: ## 03 Personality & Soul — System prompt identity
@echo "Running 03: Personality & Soul..."
@uv run python 03-personality-soul/bot.py
04-tools-agent-loop: ## 04 Tools & Agent Loop — 4 tools + agent loop
@echo "Running 04: Tools & Agent Loop..."
@uv run python 04-tools-agent-loop/bot.py
05-permission-controls: ## 05 Permission Controls — Three-tier safety model
@echo "Running 05: Permission Controls..."
@uv run python 05-permission-controls/bot.py
06-gateway: ## 06 Gateway — HTTP + Telegram channels
@echo "Running 06: Gateway..."
@uv run python 06-gateway/bot.py
07-context-compaction: ## 07 Context Compaction — Automatic summarization
@echo "Running 07: Context Compaction..."
@uv run python 07-context-compaction/bot.py
08-long-term-memory: ## 08 Long-Term Memory — File-based persistent memory
@echo "Running 08: Long-Term Memory..."
@uv run python 08-long-term-memory/bot.py
09-concurrency-scheduling: ## 09 Concurrency & Scheduling — Locks + cron
@echo "Running 09: Concurrency & Scheduling..."
@uv run python 09-concurrency-scheduling/bot.py
10-multi-agent-integration: ## 10 Multi-Agent Integration — Full system
@echo "Running 10: Multi-Agent Integration..."
@uv run python 10-multi-agent-integration/mini-openclaw.py
# =============================================================================
# Utilities
# =============================================================================
test: ## Run automated tests to verify all modules
@echo "Running workshop tests..."
@uv run python tests.py
clean: ## Clean up artifacts
@echo "Cleaning up..."
@rm -rf .venv
@find . -type d -name "__pycache__" -exec rm -rf {} +
@find . -type d -name "sessions" -exec rm -rf {} +
@find . -type d -name "memory" -exec rm -rf {} +
@find . -name "exec-approvals.json" -delete