Add intake client mapping emissions to TaskSpec, CLI poll and run --from-issue-core, keep --task-file for local dev. Completes HARNESS-WP-0001 workplan.
2.3 KiB
2.3 KiB
Task intake (HARNESS-WP-0001-T03)
activity-core emits tasks via IssueSink → POST /issues/ on issue-core.
agent-harness consumes them by polling the same service:
activity-core (cron/rule)
→ IssueCoreRestSink POST /issues/
→ issue-core backend (sqlite / gitea)
→ agent-harness poll/claim GET+PATCH /issues/
→ run_task (profile + budget + persona + session)
→ PATCH close + hub progress + .kaizen/metrics
TaskExecutorWorkflow stays a stub (activity-core INTENT); execution lives here.
issue-core worker API
| Method | Path | Role |
|---|---|---|
| POST | /issues/ |
Ingest (activity-core) |
| 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.
CLI
export ISSUE_CORE_URL=http://127.0.0.1:8765 # or in-cluster service
export ISSUE_CORE_API_KEY=…
export AGENT_HARNESS_REPO_MAP='{"binky-control":"/home/tegwick/binky-control"}'
# Peek / claim without executing
agent-harness poll
agent-harness poll --no-claim
# Claim → run → close (or reopen on failure)
agent-harness run --from-issue-core
# Local dev (unchanged)
agent-harness run --task-file examples/task-hello-sandbox.json --no-hub
Label filter
Default: issues must carry the automated label (matches activity-core
binky definitions). Override:
export AGENT_HARNESS_INTAKE_LABELS=automated,harness # ALL required
Agent + completion event mapping
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 |
Instance policy (tool_profile, budget, lane) still comes from the
target repo's .kaizen/schedule.yml.
Repo path resolution
- Absolute/expanded path if it is already a git repo
AGENT_HARNESS_REPO_MAPJSON- Search
AGENT_HARNESS_REPO_ROOTS(default~:~/work) for the slug