Expose session-owned chat automation metadata

This commit is contained in:
2026-11-08 15:24:23 +00:00
parent cecfa39aac
commit 9d3358be47
12 changed files with 413 additions and 0 deletions
+14
View File
@@ -90,6 +90,20 @@ func (c *Chat) Sessions(ctx context.Context) ([]protocol.ChatSession, error) {
return sessions, nil
}
// Automations reports Claude Code's current limitation honestly. Claude's
// scheduled-task metadata is emitted through stop-hook/task events, but the
// installed control protocol has no authoritative read-only session schedule
// operation. Starting a process or inspecting transcripts would not establish
// the current schedule set, so this method never does either.
func (c *Chat) Automations(ctx context.Context, sessionID string) (protocol.ChatAutomationInfo, error) {
return protocol.ChatAutomationInfo{
SessionID: sessionID,
Provider: Backend,
Status: protocol.ChatAutomationUnavailable,
Reason: "Claude Code exposes scheduled-task metadata through events, but no authoritative read-only session schedule API is available",
}, nil
}
func (s *session) chatSessionLocked() protocol.ChatSession {
model := s.modelActual
if model == "" {