Documentation
¶
Overview ¶
Package dream implements the Dream Engine — Siri's autonomous memory consolidation and insight generation system.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AllPhases = []Phase{PhaseOrient, PhaseGather, PhaseConsolidate, PhasePrune}
AllPhases in execution order.
Functions ¶
func PrintGateResult ¶
func PrintGateResult(r *GateResult) error
PrintGateResult prints the gate check result as JSON to stdout.
func UpdateRunTimestamp ¶
func UpdateRunTimestamp() error
UpdateRunTimestamp writes the current time to the last-run file. (Session counter removed — replaced by new-memories gate.)
func WritePIDLock ¶
func WritePIDLock() error
WritePIDLock creates the PID lock file with the current process's PID.
Types ¶
type Config ¶
type Config struct {
DryRun bool // Read-only mode: no writes to memory store or files.
Phase string // Run only this phase (empty = all phases).
}
Config holds Dream Engine runtime configuration.
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine orchestrates the four-phase dream cycle.
type GateResult ¶
type GateResult struct {
ShouldRun bool `json:"should_run"`
Reason string `json:"reason"`
LastRun string `json:"last_run"`
HoursSinceLastRun float64 `json:"hours_since_last_run,omitempty"`
NewMemoriesSinceLastRun int `json:"new_memories_since_last_run"`
Gate1Time bool `json:"gate1_time"`
Gate2Memories bool `json:"gate2_memories"`
Gate3Pid bool `json:"gate3_pid"`
}
GateResult is the JSON output of dream-check.
func CheckGates ¶
func CheckGates(store memory.Store) (*GateResult, error)
CheckGates evaluates the Triple Gate and returns a JSON-serializable result. store is used for Gate 2 (count new memories since last run). If store is nil, Gate 2 is skipped (passes by default) — for backward compatibility.
type Log ¶
type Log struct {
StartedAt string `json:"started_at"`
DryRun bool `json:"dry_run"`
Phases []PhaseLog `json:"phases"`
Summary string `json:"summary,omitempty"`
SkillDiffPath string `json:"skill_diff_path,omitempty"` // path to skill diff draft file
HasSkillDiff bool `json:"has_skill_diff,omitempty"` // true if diff was generated
}
Log collects structured output from each phase.