server

package
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusPending      = protocol.StatusPending
	StatusAcknowledged = protocol.StatusAcknowledged
	StatusResolved     = protocol.StatusResolved
	StatusDismissed    = protocol.StatusDismissed
)
View Source
const (
	EventAnnotationCreated = protocol.EventAnnotationCreated
	EventAnnotationUpdated = protocol.EventAnnotationUpdated
	EventAnnotationDeleted = protocol.EventAnnotationDeleted
	EventSessionCreated    = protocol.EventSessionCreated
	EventSessionUpdated    = protocol.EventSessionUpdated
	EventSessionClosed     = protocol.EventSessionClosed
	EventThreadMessage     = protocol.EventThreadMessage
	EventActionRequested   = protocol.EventActionRequested
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionRequest

type ActionRequest = protocol.ActionRequest

type Annotation

type Annotation = protocol.Annotation

type AnnotationIntent

type AnnotationIntent = protocol.AnnotationIntent

type AnnotationSeverity

type AnnotationSeverity = protocol.AnnotationSeverity

type AnnotationStatus

type AnnotationStatus = protocol.AnnotationStatus

type Event

type Event = protocol.Event

type EventType

type EventType = protocol.EventType

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(address string, logger *slog.Logger) *Service

func (*Service) ListenAndServe

func (s *Service) ListenAndServe() error

func (*Service) Shutdown

func (s *Service) Shutdown(ctx context.Context) error

type Session

type Session = protocol.Session

type SessionWithAnnotations

type SessionWithAnnotations = protocol.SessionWithAnnotations

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore() *Store

func (*Store) AddAnnotation

func (s *Store) AddAnnotation(sessionID string, annotation Annotation) (Annotation, bool)

func (*Store) AddThreadMessage

func (s *Store) AddThreadMessage(annotationID, role, content string) (Annotation, bool)

func (*Store) CreateSession

func (s *Store) CreateSession(url, projectID string) Session

func (*Store) DeleteAnnotation

func (s *Store) DeleteAnnotation(id string) (Annotation, bool)

func (*Store) EmitActionRequested

func (s *Store) EmitActionRequested(sessionID string, request ActionRequest)

func (*Store) GetAllAnnotationsNeedingAttention

func (s *Store) GetAllAnnotationsNeedingAttention() []Annotation

func (*Store) GetAllAnnotationsNeedingAttentionByProjectID

func (s *Store) GetAllAnnotationsNeedingAttentionByProjectID(projectID string) []Annotation

func (*Store) GetAnnotation

func (s *Store) GetAnnotation(id string) (Annotation, bool)

func (*Store) GetAnnotationsNeedingAttention

func (s *Store) GetAnnotationsNeedingAttention(sessionID string) []Annotation

func (*Store) GetEventsSince

func (s *Store) GetEventsSince(sessionID string, sequence int64) []Event

func (*Store) GetSession

func (s *Store) GetSession(id string) (Session, bool)

func (*Store) GetSessionAnnotations

func (s *Store) GetSessionAnnotations(sessionID string) []Annotation

func (*Store) GetSessionWithAnnotations

func (s *Store) GetSessionWithAnnotations(id string) (SessionWithAnnotations, bool)

func (*Store) ListSessions

func (s *Store) ListSessions() []Session

func (*Store) SubscribeAll

func (s *Store) SubscribeAll() (<-chan Event, func())

func (*Store) SubscribeSession

func (s *Store) SubscribeSession(sessionID string) (<-chan Event, func())

func (*Store) TouchProject

func (s *Store) TouchProject(projectID string)

func (*Store) TouchSession

func (s *Store) TouchSession(sessionID string)

func (*Store) UpdateAnnotation

func (s *Store) UpdateAnnotation(id string, patch map[string]any) (Annotation, bool)

type ThreadMessage

type ThreadMessage = protocol.ThreadMessage

type UnixMilli added in v1.0.5

type UnixMilli = protocol.UnixMilli

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL