feat(activity): multi-service config, make help default, install-cli
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:
parent
9f4993d9e7
commit
192942244e
8 changed files with 755 additions and 49 deletions
|
|
@ -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`.
|
||||
|
||||
|
|
|
|||
|
|
@ -294,21 +294,32 @@ morning review without AI tooling. Canon: `docs/repo-automation-review-cli.md`
|
|||
(ACTIVITY-WP-0028).
|
||||
|
||||
```bash
|
||||
# Install once (from activity-core checkout)
|
||||
uv tool install -e .
|
||||
# or: uv run activity …
|
||||
# From activity-core checkout — list make targets with bare `make`
|
||||
make
|
||||
make install-cli # installs `activity` via uv tool (userspace)
|
||||
|
||||
# Point the CLI at one or more activity-core deployments
|
||||
activity service add railiance \
|
||||
--url https://activity.coulomb.social \
|
||||
--hub-url http://127.0.0.1:18000 \
|
||||
--make-default
|
||||
activity service list
|
||||
activity service use local # switch default
|
||||
activity runs -s railiance --since today # one-shot, no default change
|
||||
|
||||
cd ~/freedom-intelligence
|
||||
activity status
|
||||
activity inbox
|
||||
activity runs --since today # needs ACTIVITY_CORE_URL for live ops API
|
||||
activity ack briefs/2026/08/2026-08-06.md
|
||||
```
|
||||
|
||||
| Env | Purpose |
|
||||
| --- | ------- |
|
||||
| `ACTIVITY_CORE_URL` | Ops API (e.g. `https://activity.coulomb.social` or ClusterIP) |
|
||||
| `STATE_HUB_URL` | Hub progress for completion events |
|
||||
| Mechanism | Purpose |
|
||||
| --------- | ------- |
|
||||
| `activity service …` | Named backends in `~/.config/activity/services.json` |
|
||||
| `-s` / `--service` | Use a named backend for this call only |
|
||||
| `--activity-url` | One-shot API URL (highest precedence) |
|
||||
| `ACTIVITY_CORE_URL` | Env fallback when no service/flag |
|
||||
| `STATE_HUB_URL` | Hub progress (env or per-service `state_hub_url`) |
|
||||
| `ACTIVITY_REVIEW_STATE_DIR` | Override local checkpoint dir |
|
||||
|
||||
Org-wide tools (`make automation-status`, prod SSH helper) remain for fleet view.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue