Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CycleResponse ¶
type CycleResponse struct {
Expire []string `json:"expire"`
Create []RawSurface `json:"create"`
}
CycleResponse is the top-level JSON shape Claude returns.
func ParseResponse ¶
func ParseResponse(raw string) (*CycleResponse, error)
ParseResponse extracts the cycle response from Claude's text output.
type Loop ¶
type Loop struct {
// contains filtered or unexported fields
}
Loop runs the periodic reasoning cycle.
func New ¶
func New(interval time.Duration, ag agent.PrimaryAgent, eideticClient eidetic.Client, store SurfaceStore, logger *zap.SugaredLogger) *Loop
New creates a reasoning Loop.
func (*Loop) AddDeliverer ¶
AddDeliverer registers a channel bot for high-priority surface notifications.
type RawSurface ¶
type RawSurface struct {
Content string `json:"content"`
SurfaceType string `json:"surface_type"`
Priority int `json:"priority"`
Tags []string `json:"tags"`
TriggerAt string `json:"trigger_at,omitempty"` // RFC3339 timestamp for reminders
}
RawSurface is the JSON shape for a new surface to create.
func (*RawSurface) ParseTriggerAt ¶
func (r *RawSurface) ParseTriggerAt() *time.Time
ParseTriggerAt parses the trigger_at field as RFC3339. Returns nil if empty or invalid.
type SurfaceStore ¶
type SurfaceStore interface {
List(ctx context.Context, f surfaces.ListFilter) ([]surfaces.Surface, error)
Create(ctx context.Context, req surfaces.CreateRequest) (*surfaces.Surface, error)
Update(ctx context.Context, id uuid.UUID, req surfaces.UpdateRequest) (*surfaces.Surface, error)
DueReminders(ctx context.Context) ([]surfaces.Surface, error)
}
SurfaceStore is the subset of *surfaces.Store used by the reasoning loop.
Click to show internal directories.
Click to hide internal directories.