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

@ -87,8 +87,48 @@ activity ack briefs/2026/08/2026-08-06.md
| Package | `activity-core` (`[project.scripts] activity = activity_core.review_cli:main`) |
| Default cwd | Consumer repo root (or any descendant) |
| Repo slug | `--repo` > git remote path > `.repo-classification.yaml` > directory name |
| Config | Env: `ACTIVITY_CORE_URL`, `STATE_HUB_URL`, `ACTIVITY_REVIEW_STATE_DIR` |
| Collision | If another `activity` is on PATH, document `python -m activity_core.review_cli` |
| Config | Named services in `~/.config/activity/services.json`; env still works |
| Collision | If another `activity` is on PATH, use `python -m activity_core.review_cli` |
### Multi-service endpoints
Operators may talk to more than one activity-core deployment (local stack,
railiance, …). Configure named services once; pick a default; override per call.
```bash
# userspace install
make install-cli
# register backends
activity service add railiance \
--url https://activity.coulomb.social \
--hub-url http://127.0.0.1:18000 \
--description "Railiance prod (SSO)" \
--make-default
activity service add local \
--url http://127.0.0.1:8010 \
--hub-url http://127.0.0.1:8000
activity service list
activity service use local # switch default
activity service which # what this shell would use
# one-shot without changing default (flags after the verb)
activity runs -s railiance --since today
activity status --activity-url http://10.43.x.x:8010
```
| Precedence (highest first) | Source |
| -------------------------- | ------ |
| 1 | `--activity-url` / `--hub-url` |
| 2 | `--service NAME` / `-s NAME` |
| 3 | `ACTIVITY_CORE_URL` / `STATE_HUB_URL` env |
| 4 | config file default service |
| 5 | unset (offline-only) |
Config path: `${XDG_CONFIG_HOME:-~/.config}/activity/services.json`
(or `ACTIVITY_CONFIG_DIR`).
Working name `actcore-review` is **retired** in favour of `activity`.