Documentation
¶
Index ¶
- Constants
- func NewSessionSpawner(sessions SessionManager, resolver workspacepkg.RuntimeResolver, ...) memory.SessionSpawner
- type Runtime
- func (r *Runtime) Enabled() bool
- func (r *Runtime) EnqueueCheck(reason string, workspaceRef string)
- func (r *Runtime) LastConsolidatedAt() (time.Time, error)
- func (r *Runtime) Shutdown()
- func (r *Runtime) Start(parent context.Context)
- func (r *Runtime) Trigger(ctx context.Context, workspace string) (bool, string, error)
- type Service
- type ServiceFactory
- type SessionManager
Constants ¶
View Source
const (
// DreamingCuratorAgentName is the dedicated default agent for memory dreaming.
DreamingCuratorAgentName = "dreaming-curator"
)
Variables ¶
This section is empty.
Functions ¶
func NewSessionSpawner ¶
func NewSessionSpawner( sessions SessionManager, resolver workspacepkg.RuntimeResolver, cfg *aghconfig.Config, ) memory.SessionSpawner
NewSessionSpawner creates dream sessions against one or more eligible workspaces.
Types ¶
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime owns dream scheduling, trigger behavior, and session spawning.
func NewRuntime ¶
func NewRuntime( enabled bool, service Service, spawner memory.SessionSpawner, interval time.Duration, logger *slog.Logger, lastConsolidatedAt func() (time.Time, error), ) *Runtime
NewRuntime constructs a dream runtime that can be started by the daemon.
func (*Runtime) EnqueueCheck ¶
EnqueueCheck requests a background dream check without blocking.
func (*Runtime) LastConsolidatedAt ¶
LastConsolidatedAt returns the most recent lock timestamp.
func (*Runtime) Shutdown ¶
func (r *Runtime) Shutdown()
Shutdown stops the background dream check loop.
type Service ¶
type Service interface {
ShouldRun() (bool, error)
Run(ctx context.Context, spawn memory.SessionSpawner, workspace string) error
}
Service evaluates dream gates and coordinates lock-aware consolidation runs.
type ServiceFactory ¶
ServiceFactory constructs a consolidation service using memory package options.
type SessionManager ¶
type SessionManager interface {
Create(ctx context.Context, opts session.CreateOpts) (*session.Session, error)
ListAll(ctx context.Context) ([]*session.Info, error)
Prompt(ctx context.Context, id string, msg string) (<-chan acp.AgentEvent, error)
Stop(ctx context.Context, id string) error
}
SessionManager is the session lifecycle surface needed to spawn dream sessions.
Click to show internal directories.
Click to hide internal directories.