3.6 KiB
3.6 KiB
name, lang, domain, version, description, tags, icon, framework, entry_point, dir_path, repo_url, uses_functions, uses_types, service, e2e_checks
| name | lang | domain | version | description | tags | icon | framework | entry_point | dir_path | repo_url | uses_functions | uses_types | service | e2e_checks | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| agent_runner_api | go | agents | 0.1.0 | Service Go que orquesta agentes Claude headless en git worktrees con DoD |
|
|
stdlib-http | main.go | apps/agent_runner_api | https://gitea.organic-machine.com/dataforge/agent_runner_api |
|
|
Visual
Backend puro, sin UI. Consume por skill_tree v2 + kanban_cpp.
Endpoints
GET /api/health—{status, port, db}.POST /api/runs— body{issue_id?, card_id?, kanban_app?, mode, prompt?}->{run_id, branch, worktree_path, sse_url}. Crea worktree + lanza subprocess Claude (oecho STUB:siAGENT_RUNNER_STUB=1).GET /api/runs?status=&app=&since=— lista runs filtrada.GET /api/runs/:id— detalle + dod_items.GET /api/runs/:id/sse— streamtext/event-stream(events:connected,status,evidence,validated,merged,aborted).POST /api/runs/:id/evidence—{item_id|item_key, kind, payload_path?, payload_url?, payload_text?}. Auto-creadod_itemsi solo se daitem_key.POST /api/runs/:id/evidence/:eid/validate—{validated_by}.POST /api/runs/:id/merge— TBD mergeauto/<branch>a master--no-ff(gate: todos losdod_items.required = 1deben tener evidenciavalidated).POST /api/runs/:id/abort— kill PID +git worktree remove --force+branch -D+status=aborted.
Schema (5 migrations idempotentes via embed.FS)
| Tabla | Para que |
|---|---|
workflows |
Templates de prompt + dod_schema_json |
runs |
Run vivo: workflow/issue/card/kanban_app + branch + worktree_path + PID + status |
worktrees |
1 row por worktree creada, marcada removed_at al abort/merge |
dod_items |
Items DoD del run (`pending |
dod_evidence |
Evidencias adjuntas (`text |
Lanzamiento
cd apps/agent_runner_api
CGO_ENABLED=1 go build -o agent_runner_api .
./agent_runner_api --port 8486 --db agent_runs.db --repo-root /home/lucas/fn_registry --worktrees-root /tmp
systemd-user: systemctl --user enable --now agent_runner_api.service (despues de copiar agent_runner_api.service a ~/.config/systemd/user/).
Gotchas
git worktree addfalla si la rama ya existe -> elSpawn()la borra antes conbranch -D(best-effort).- Worktree y main repo comparten
.git/hooks/— pre-commit del main puede bloquear commits del agente; usar--no-verifydocumentado. claude --headlessrequiere PATH correcto en systemd. Siclaudeno esta en$PATH, el subprocess cae automaticamente aecho STUB:(mismo comportamiento queAGENT_RUNNER_STUB=1).- Subprocess corre async — el handler HTTP devuelve
run_idapenas inserta + lanza, no espera al exit. - SSE: clientes deben reconectar al cerrar conexion. Heartbeat cada 15s para mantener conexion abierta.
Capability growth log
- v0.1.0 (2026-05-18) — scaffold inicial: stdlib http, embed.FS migrations, SSE hub, spawn stub fallback, DoD gate en merge.