mirror of
https://github.com/theniceboy/.config.git
synced 2026-07-16 22:01:21 +08:00
codex agent tracker
This commit is contained in:
parent
20eddd1600
commit
b08d63e4a5
96 changed files with 3057 additions and 3055 deletions
32
agent-tracker/internal/ipc/envelope.go
Normal file
32
agent-tracker/internal/ipc/envelope.go
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
package ipc
|
||||
|
||||
type Envelope struct {
|
||||
Kind string `json:"kind"`
|
||||
Command string `json:"command,omitempty"`
|
||||
Client string `json:"client,omitempty"`
|
||||
Session string `json:"session,omitempty"`
|
||||
SessionID string `json:"session_id,omitempty"`
|
||||
Window string `json:"window,omitempty"`
|
||||
WindowID string `json:"window_id,omitempty"`
|
||||
Pane string `json:"pane,omitempty"`
|
||||
Position string `json:"position,omitempty"`
|
||||
Visible *bool `json:"visible,omitempty"`
|
||||
Message string `json:"message,omitempty"`
|
||||
Summary string `json:"summary,omitempty"`
|
||||
Tasks []Task `json:"tasks,omitempty"`
|
||||
}
|
||||
|
||||
type Task struct {
|
||||
SessionID string `json:"session_id"`
|
||||
Session string `json:"session"`
|
||||
WindowID string `json:"window_id"`
|
||||
Window string `json:"window"`
|
||||
Pane string `json:"pane,omitempty"`
|
||||
Status string `json:"status"`
|
||||
Summary string `json:"summary"`
|
||||
CompletionNote string `json:"completion_note,omitempty"`
|
||||
StartedAt string `json:"started_at,omitempty"`
|
||||
CompletedAt string `json:"completed_at,omitempty"`
|
||||
DurationSeconds float64 `json:"duration_seconds"`
|
||||
Acknowledged bool `json:"acknowledged"`
|
||||
}
|
||||
29
agent-tracker/internal/tracker/tracker.go
Normal file
29
agent-tracker/internal/tracker/tracker.go
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
package tracker
|
||||
|
||||
import "time"
|
||||
|
||||
type Status string
|
||||
|
||||
const (
|
||||
StatusIdle Status = "idle"
|
||||
StatusInProgress Status = "in_progress"
|
||||
StatusCompleted Status = "completed"
|
||||
)
|
||||
|
||||
type Entry struct {
|
||||
Session string `json:"session"`
|
||||
Pane string `json:"pane"`
|
||||
Status Status `json:"status"`
|
||||
Description string `json:"description"`
|
||||
StartedAt time.Time `json:"started_at"`
|
||||
CompletedAt time.Time `json:"completed_at"`
|
||||
Acknowledged bool `json:"acknowledged"`
|
||||
}
|
||||
|
||||
type UpdateManager interface {
|
||||
StartWork(session, pane, description string, now time.Time) (*Entry, error)
|
||||
CompleteWork(session, pane, summary string, now time.Time) (*Entry, error)
|
||||
Acknowledge(session, pane string) (*Entry, error)
|
||||
Get(session, pane string) (*Entry, bool)
|
||||
List() []*Entry
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue