feat(activity): multi-service config, make help default, install-cli
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s
Build and Publish Container Image / build-and-push (push) Successful in 21s

Bare make lists targets. make install-cli installs the activity tool via uv.
Named activity-core backends live in ~/.config/activity/services.json with
list/add/use/default/which; -s/--service selects one call without changing
the default; --activity-url is a one-shot override.
This commit is contained in:
tegwick 2026-08-06 17:25:54 +02:00
parent 9f4993d9e7
commit 192942244e
8 changed files with 755 additions and 49 deletions

View file

@ -1,11 +1,32 @@
-include .env
export
.PHONY: sync-event-types sync-activity-definitions sync-schedules test migrate sync-all \
# Bare `make` lists targets (ACTIVITY-WP-0028 follow-up).
.DEFAULT_GOAL := help
.PHONY: help sync-event-types sync-activity-definitions sync-schedules test migrate sync-all \
automation-status automation-status-json automation-list automation-list-json \
activity-review \
activity-review install-cli \
prod-automation-status refresh-live-images \
dev-up dev-down railiance-up railiance-down \
start-worker start-api start-event-router help
start-worker start-api start-event-router \
openbao-eso-token-apply agents-list agents-update agents-validate
# ── Help ──────────────────────────────────────────────────────────────────────
help: ## Show available make targets
@echo "activity-core — available targets"
@echo ""
@grep -Eh '^[a-zA-Z0-9_-]+:.*?##' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-28s\033[0m %s\n", $$1, $$2}' | \
sort
@echo ""
@echo "CLI: make install-cli # install 'activity' into userspace (uv tool)"
@echo " make activity-review ARGS='status --cwd ~/freedom-intelligence'"
@echo " activity service list # named activity-core backends"
@echo " activity runs -s railiance --since today"
# ── Sync / test ───────────────────────────────────────────────────────────────
sync-activity-definitions: ## Sync ActivityDefinition files into DB
uv run python -m activity_core.sync_activity_definitions
@ -19,14 +40,12 @@ sync-event-types: ## Sync event type YAML files into DB
test: ## Run test suite
uv run pytest tests/ -v
# ── Database ──────────────────────────────────────────────────────────────────
migrate: ## Apply all pending Alembic migrations
uv run alembic upgrade head
sync-all: sync-event-types sync-activity-definitions ## Sync event types and activity definitions
# -- Automation status ---------------------------------------------------------
# ── Automation status (org-wide) ──────────────────────────────────────────────
SINCE ?= today
FORMAT ?= human
@ -34,6 +53,7 @@ ENABLED ?= all
TRIGGER ?=
ACTIVITY_ID ?=
ACTIVITY_NAME ?=
ARGS ?=
automation-status: ## Report recent automation status from repo-owned evidence
uv run python scripts/automation_status.py --since "$(SINCE)" $(if $(UNTIL),--until "$(UNTIL)",) --format "$(FORMAT)"
@ -53,13 +73,22 @@ automation-list: ## List configured scheduled automations from repo-owned defin
automation-list-json: ## List configured scheduled automations as JSON
@$(MAKE) --no-print-directory automation-list FORMAT=json
# Consumer-repo review CLI (ACTIVITY-WP-0028). Example:
# make activity-review ARGS='--cwd ~/freedom-intelligence status'
ARGS ?=
activity-review: ## Repo-scoped review CLI (activity status|list|inbox|…)
# ── activity CLI (repo review + multi-service) ────────────────────────────────
install-cli: ## Install 'activity' CLI into userspace (uv tool install -e .)
@command -v uv >/dev/null || { echo "uv not found — install from https://docs.astral.sh/uv/"; exit 1; }
uv tool install --force -e .
@echo ""
@echo "Installed. Ensure \$$HOME/.local/bin is on PATH, then:"
@echo " activity --help"
@echo " activity service add railiance --url https://activity.coulomb.social --make-default"
@echo " activity service list"
@command -v activity >/dev/null && activity --help | head -3 || true
activity-review: ## Run activity CLI (pass ARGS='…'). Example: ARGS='--cwd ~/freedom-intelligence status'
uv run activity $(ARGS)
# ── Infrastructure ─────────────────────────────────────────────────────────────
# ── Infrastructure ────────────────────────────────────────────────────────────
dev-up: ## Start full dev stack (Temporal + PG + ES + NATS)
docker compose -f docker-compose.dev.yml up -d
@ -87,23 +116,17 @@ start-api: ## Start FastAPI server on :8010 with hot reload
start-event-router: ## Start NATS event router
uv run python -m activity_core.event_router
# ── Help ──────────────────────────────────────────────────────────────────────
# ── Agents ────────────────────────────────────────────────────────────────────
help: ## Show this help message
@grep -Eh '^[a-zA-Z_-]+:.*?##' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-24s\033[0m %s\n", $$1, $$2}' | \
sort
# Agent Management Targets
agents-list:
agents-list: ## List installed kaizen agents
@echo "Installed agents:"
@ls agents/ 2>/dev/null | grep agent- | sed 's/agent-//g' | sed 's/.md//g' \
|| echo "No agents installed"
agents-update:
agents-update: ## Update agents via kaizen-agentic
@echo "Updating agents..."
@kaizen-agentic update
@kaizen-agent update
agents-validate:
agents-validate: ## Validate agents via kaizen-agentic
@echo "Validating agents..."
@kaizen-agentic validate agents/