2026-08-03 20:04:25 +02:00
|
|
|
# Task intake
|
2026-07-18 11:30:40 +02:00
|
|
|
|
2026-08-03 20:04:25 +02:00
|
|
|
**Architecture:** ACT-ADR-005 · ACTIVITY-WP-0026 · REIN-A-0002
|
|
|
|
|
|
|
|
|
|
## Primary: activity-core `ops_run` (scheduled automation)
|
|
|
|
|
|
|
|
|
|
Internal fleet automation (FI daily brief, Binky rhythm, mail intake, …)
|
|
|
|
|
emits a claimable **`ops_run`** in activity-core. rein-aharness claims that
|
|
|
|
|
row — **not** issue-core and **not** Forgejo.
|
2026-07-18 11:30:40 +02:00
|
|
|
|
|
|
|
|
```
|
2026-08-03 20:04:25 +02:00
|
|
|
activity-core (Temporal + rules)
|
|
|
|
|
→ INSERT ops_run (open) + dual-write activity_task_spawn (state-hub)
|
|
|
|
|
→ rein-aharness claim-loop
|
|
|
|
|
POST /ops-runs/claim → approach registry → execute → complete/fail
|
|
|
|
|
→ domain completion events (fi_daily_brief, binky_daily_brief, …)
|
2026-07-18 11:30:40 +02:00
|
|
|
```
|
|
|
|
|
|
2026-08-03 20:04:25 +02:00
|
|
|
Full guide: **`docs/ops-run-claim-loop.md`**.
|
2026-07-18 11:30:40 +02:00
|
|
|
|
2026-08-03 20:04:25 +02:00
|
|
|
### CLI
|
2026-07-22 00:05:23 +02:00
|
|
|
|
2026-08-03 20:04:25 +02:00
|
|
|
```bash
|
|
|
|
|
export ACTIVITY_CORE_URL=http://127.0.0.1:8010
|
|
|
|
|
export ACTIVITY_CORE_WORKER_TOKEN=…
|
|
|
|
|
export AGENT_HARNESS_REPO_MAP='{"freedom-intelligence":"~/freedom-intelligence","binky-control":"~/binky-control"}'
|
|
|
|
|
|
|
|
|
|
rein-aharness poll --source=ops-run --no-claim
|
|
|
|
|
rein-aharness run --from-ops-run
|
|
|
|
|
rein-aharness claim-loop
|
2026-07-22 00:05:23 +02:00
|
|
|
```
|
2026-08-03 20:04:25 +02:00
|
|
|
|
|
|
|
|
`TaskExecutorWorkflow` in activity-core stays a stub; execution lives here.
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## Legacy / external: issue-core poll
|
|
|
|
|
|
|
|
|
|
issue-core remains for **external tracker tickets** and intentional
|
|
|
|
|
`ISSUE_SINK_TYPE=rest` projections to **Forgejo** (self-hosted forge only —
|
|
|
|
|
no Gitea product path).
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
activity-core (optional rest sink)
|
|
|
|
|
→ issue-core POST /issues/
|
|
|
|
|
→ rein-aharness poll --source=issue-core
|
|
|
|
|
→ run_task / close
|
2026-07-22 00:05:23 +02:00
|
|
|
```
|
|
|
|
|
|
2026-08-03 20:04:25 +02:00
|
|
|
Do **not** use this path as the claim queue for FI/Binky ops under WP-0022.
|
2026-07-22 00:05:23 +02:00
|
|
|
|
2026-08-03 20:04:25 +02:00
|
|
|
### issue-core worker API
|
2026-07-18 11:30:40 +02:00
|
|
|
|
|
|
|
|
| Method | Path | Role |
|
|
|
|
|
|--------|------|------|
|
2026-08-03 20:04:25 +02:00
|
|
|
| POST | `/issues/` | Ingest (activity-core rest sink) |
|
2026-07-18 11:30:40 +02:00
|
|
|
| GET | `/issues/?state=open&label=automated` | Poll queue |
|
|
|
|
|
| GET | `/issues/{id}` | Fetch one |
|
|
|
|
|
| PATCH | `/issues/{id}` | Claim (`in_progress` + assignee) or `closed` |
|
|
|
|
|
|
|
|
|
|
Auth: `Authorization: Bearer $ISSUE_CORE_API_KEY` or `X-API-Key`.
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-08-03 20:04:25 +02:00
|
|
|
export ISSUE_CORE_URL=http://127.0.0.1:8765
|
2026-07-18 11:30:40 +02:00
|
|
|
export ISSUE_CORE_API_KEY=…
|
2026-08-03 20:04:25 +02:00
|
|
|
rein-aharness poll --source=issue-core
|
Rename package, CLI, and deploy artifacts to rein-aharness (HARNESS-WP-0002-T02)
agent_harness -> rein_aharness (package + all imports), CLI command
agent-harness -> rein-aharness, Docker image tag, k8s namespace/labels/
names, Makefile targets, deploy script env var/paths. In-repo identity
strings (hub event source, metrics harness field, default assignee,
argparse prog name, commit author identity) updated to match.
Historical documents left untouched on purpose: docs/adr/ADR-001-agent-harness-architecture.md,
docs/architecture.md (dated v0.1 snapshot), workplans/HARNESS-WP-0001
(completed under the old name), and the SSH host alias
"forgejo-agent-harness" (external ~/.ssh/config entry, not owned here).
Verified: 47/47 tests pass, CLI runs correctly from a fresh venv,
`make image` builds and the resulting container runs correctly.
deploy/README.md gained an explicit rename cutover checklist for what
this session cannot safely do unattended -- moving the host-side
secrets dir and checkout on railiance01, and not deleting the old k8s
namespace until the new one is confirmed working. The actual live
cutover (running that checklist against the real Railiance deployment)
is not attempted here -- real production surgery on binky-control's
live automation, needs the operator present.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-26 14:22:18 +02:00
|
|
|
rein-aharness run --from-issue-core
|
2026-07-18 11:30:40 +02:00
|
|
|
```
|
|
|
|
|
|
2026-08-03 20:04:25 +02:00
|
|
|
Default label filter: **`automated`** (`AGENT_HARNESS_INTAKE_LABELS`).
|
2026-07-18 11:30:40 +02:00
|
|
|
|
2026-08-03 20:04:25 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## Mail path (server / Railiance)
|
2026-07-18 11:30:40 +02:00
|
|
|
|
2026-08-03 20:04:25 +02:00
|
|
|
```
|
|
|
|
|
rein-aharness mail-scan # deterministic IMAP (AppRole)
|
|
|
|
|
rein-aharness mail-triage # llm-connect HTTP → JSON → apply mail-log + commit
|
|
|
|
|
# or via claim-loop when ops_run labels include mail-intake
|
2026-07-18 11:30:40 +02:00
|
|
|
```
|
|
|
|
|
|
2026-08-03 20:04:25 +02:00
|
|
|
Requires `LLM_CONNECT_URL`. **No Claude CLI** required for mail/brief approaches.
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## Agent + completion event mapping (issue-core / agent-session)
|
2026-07-18 11:30:40 +02:00
|
|
|
|
|
|
|
|
From `activity_definition_id` or labels:
|
|
|
|
|
|
|
|
|
|
| Hint | Instance agent | completion_event_type |
|
|
|
|
|
|------|----------------|------------------------|
|
|
|
|
|
| `binky-daily-rhythm` / `rhythm` | `coach` | `binky_daily_brief` |
|
|
|
|
|
| `binky-weekly-mail-intake` / `mail-intake` | `mail-triage` | `binky_mail_intake` |
|
|
|
|
|
| `binky-weekly-review-prep` / `weekly-review` | `review-prep` | `binky_weekly_review` |
|
|
|
|
|
| else | `coach` | `executor_run` |
|
|
|
|
|
|
2026-08-03 20:04:25 +02:00
|
|
|
Approach registry for ops_run (preferred): see `docs/ops-run-claim-loop.md`.
|
|
|
|
|
|
|
|
|
|
---
|
2026-07-18 11:30:40 +02:00
|
|
|
|
|
|
|
|
## Repo path resolution
|
|
|
|
|
|
|
|
|
|
1. Absolute/expanded path if it is already a git repo
|
|
|
|
|
2. `AGENT_HARNESS_REPO_MAP` JSON
|
2026-08-03 20:04:25 +02:00
|
|
|
3. Search `AGENT_HARNESS_REPO_ROOTS` (default `~:~/work`) for the slug
|