-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
96 lines (81 loc) · 2.91 KB
/
Makefile
File metadata and controls
96 lines (81 loc) · 2.91 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
SHELL := /bin/bash
.DEFAULT_GOAL := help
DB_PATH ?= $(HOME)/.senseassist/senseassist.sqlite
SQLITE3 ?= sqlite3
LOCAL_ENV_FILES ?= .env.onnx.local .env.oauth.local
.PHONY: help status git-summary test helper-health menu-health llm-install llm-smoke llm-bench sync-all-demo sync-all-live db-summary
help:
@echo "SenseAssist commands"
@echo " make status Run full local verification suite"
@echo " make test Run Swift tests"
@echo " make helper-health Run helper health check"
@echo " make menu-health Run non-interactive menu/calendar health check"
@echo " make llm-install Install Phi-3.5-mini-instruct-onnx on-device model + env file"
@echo " make llm-smoke Run on-device ONNX LLM smoke check"
@echo " make llm-bench Run on-device ONNX LLM benchmark suite"
@echo " make sync-all-demo Run multi-account sync demo"
@echo " make sync-all-live Run live multi-account sync (requires OAuth tokens + local ONNX Runtime GenAI model)"
@echo " make db-summary Print key DB summary tables"
status: git-summary test helper-health menu-health sync-all-demo db-summary
@echo ""
@echo "Status checks complete."
git-summary:
@echo "== Git summary =="
@git status --short --branch
@git log --oneline -n 8
@echo ""
test:
@echo "== swift test =="
swift test
@echo ""
helper-health:
@echo "== helper health check =="
swift run senseassist-helper --health-check
@echo ""
menu-health:
@echo "== menu health check =="
swift run senseassist-menu --health-check
@echo ""
llm-install:
@echo "== install Phi-3.5-mini-instruct-onnx =="
bash Scripts/install_phi35_instruct_onnx.sh
@echo ""
llm-smoke:
@echo "== on-device LLM smoke check =="
bash Scripts/smoke_test_phi35_instruct_onnx.sh
@echo ""
llm-bench:
@echo "== on-device LLM benchmark =="
bash Scripts/benchmark_phi35_instruct_onnx.sh
@echo ""
sync-all-demo:
@echo "== multi-account sync demo =="
SENSEASSIST_ENABLE_DEMO_COMMANDS=1 swift run senseassist-helper --sync-all-demo
@echo ""
sync-all-live:
@echo "== multi-account sync live =="
@set -a; \
for env_file in $(LOCAL_ENV_FILES); do \
if [[ -f "$$env_file" ]]; then source "$$env_file"; fi; \
done; \
set +a; \
swift run senseassist-helper --sync-live-once
@echo ""
db-summary:
@echo "== database summary =="
@if [[ ! -f "$(DB_PATH)" ]]; then \
echo "Database not found at $(DB_PATH)"; \
exit 0; \
fi
@if ! command -v "$(SQLITE3)" >/dev/null 2>&1; then \
echo "sqlite3 not found in PATH"; \
exit 0; \
fi
@$(SQLITE3) "$(DB_PATH)" "SELECT provider, email, is_enabled FROM accounts ORDER BY provider, email;"
@echo ""
@$(SQLITE3) "$(DB_PATH)" "SELECT provider, account_id, cursor_primary FROM provider_cursors ORDER BY provider, account_id;"
@echo ""
@$(SQLITE3) "$(DB_PATH)" "SELECT source, account_id, COUNT(*) FROM updates GROUP BY source, account_id ORDER BY source, account_id;"
@echo ""
@$(SQLITE3) "$(DB_PATH)" "SELECT COUNT(*) AS tasks FROM tasks;"
@echo ""