feat(v0.5.3): summary fields for end_reason / ownership / adoption
This commit is contained in:
@@ -26,6 +26,25 @@ type SessionSummary struct {
|
||||
FilesModified []string `json:"files_modified"`
|
||||
FilesDeleted []string `json:"files_deleted"`
|
||||
NotesUpdated bool `json:"notes_updated"`
|
||||
|
||||
// EndReason is "child_exited" for direct mode, "tmux_session_ended" for
|
||||
// persistent mode (both owner-create and adopted reattach). Optional;
|
||||
// pre-v0.5.3 summaries omit it.
|
||||
EndReason string `json:"end_reason,omitempty"`
|
||||
|
||||
// DetectedVia distinguishes the mechanism that observed session end:
|
||||
// "child_exit" for direct mode, "polling" for persistent mode.
|
||||
DetectedVia string `json:"detected_via,omitempty"`
|
||||
|
||||
// SessionOwnership is "created" if this ctask process originated the
|
||||
// session (owner-create) or "adopted" if it took over an orphaned
|
||||
// persistent session. Omitted in direct mode.
|
||||
SessionOwnership string `json:"session_ownership,omitempty"`
|
||||
|
||||
// AdoptedFromOrphanAt records the moment adoption took place. Set only
|
||||
// for adopted reattach.
|
||||
AdoptedFromOrphanAt *time.Time `json:"adopted_from_orphan_at,omitempty"`
|
||||
|
||||
// EndManifest captures the workspace file list at end-of-session so the
|
||||
// next session can diff current state against it (Layer 3). This field
|
||||
// is ctask-internal; it is not part of the public summary format shown
|
||||
|
||||
Reference in New Issue
Block a user