feat(infra): modelo de datos del meta-orquestador de flota (flow 0012)
Fase 1, piezas 1+2: - ClaudeFleet + list_claude_fleet ganan DodContract/DodStatus/Role, leidos de goals/<sessionId>.json (.dod_contract/.dod_status/.role). Aditivo: fleetview sigue compilando. - classify_fleet_termination (pura): clasifica el estado de terminacion de un agente (RECLAMA/MAL_LANZADO/DICE_TERMINADO/ESTANCADO/TRABAJANDO) con precedencia fija, para que un watcher sin LLM decida. 34 tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+18
-12
@@ -6,18 +6,21 @@ version: "1.0.0"
|
||||
algebraic: product
|
||||
definition: |
|
||||
type ClaudeFleet struct {
|
||||
PID int `json:"pid"`
|
||||
KittyPID int `json:"kitty_pid"`
|
||||
SessionID string `json:"session_id"`
|
||||
Rename string `json:"rename"`
|
||||
Target string `json:"target"`
|
||||
Goal string `json:"goal"`
|
||||
Phase string `json:"phase"`
|
||||
Status string `json:"status"`
|
||||
Cwd string `json:"cwd"`
|
||||
TmuxWindow string `json:"tmux_window"`
|
||||
Alive bool `json:"alive"`
|
||||
UpdatedAt int64 `json:"updated_at"`
|
||||
PID int `json:"pid"`
|
||||
KittyPID int `json:"kitty_pid"`
|
||||
SessionID string `json:"session_id"`
|
||||
Rename string `json:"rename"`
|
||||
Target string `json:"target"`
|
||||
Goal string `json:"goal"`
|
||||
Phase string `json:"phase"`
|
||||
DodContract string `json:"dod_contract"`
|
||||
DodStatus string `json:"dod_status"`
|
||||
Role string `json:"role"`
|
||||
Status string `json:"status"`
|
||||
Cwd string `json:"cwd"`
|
||||
TmuxWindow string `json:"tmux_window"`
|
||||
Alive bool `json:"alive"`
|
||||
UpdatedAt int64 `json:"updated_at"`
|
||||
}
|
||||
description: "Registro de una sesion de Claude Code en la maquina local. Cruza el estado del proceso (/proc) con la metadata que Claude Code persiste en ~/.claude (sessions/<PID>.json + goals/<sessionId>.json). Pieza de datos de la app TUI fleetview, producida por list_claude_fleet_go_infra."
|
||||
tags: [claude-fleet, infra, claude, session, process]
|
||||
@@ -36,6 +39,9 @@ file_path: "functions/infra/claude_fleet.go"
|
||||
| `Target` | string | derivado | sessionId[:8] + "@" + basename(cwd). |
|
||||
| `Goal` | string | goals/<sessionId>.json .goal | "" si no hay sidecar. |
|
||||
| `Phase` | string | goals .phase | "" si no hay sidecar. |
|
||||
| `DodContract` | string | goals .dod_contract | Criterio de aceptacion FIJO escrito al lanzar el agente; "" si ausente o vacio. |
|
||||
| `DodStatus` | string | goals .dod_status | Estado del DoD: `pending`\|`met`\|`failed`; "" si ausente o vacio. |
|
||||
| `Role` | string | goals .role | Rol en la flota: `orchestrator`\|`executor`; "" si ausente (los consumidores asumen executor). El orquestador se pinea arriba en la TUI. |
|
||||
| `Status` | string | sessions .status | idle\|busy\|waiting. |
|
||||
| `Cwd` | string | sessions .cwd | Working directory. |
|
||||
| `TmuxWindow` | string | (reservado) | "" por ahora; se rellena en fase posterior. |
|
||||
|
||||
Reference in New Issue
Block a user