Documentation
¶
Overview ¶
Package demokit is the shared seeding core that fills a THROWAWAY Seamless data dir with backdated fixtures. It backs the demoseed CLI (the console-fleet history for landing-page screenshots, and the -scenes terminal-scene fixture) and is importable so other tooling -- the agent-scenario benchmark's scenario seeder -- can build fixture state in Go without shelling out or reimplementing the time-backdating logic. Point it only at a fresh dir while no daemon holds the DB (single-writer SQLite).
Timestamps are backdated through the store/files/events APIs, which write caller-supplied times verbatim; nothing here goes through MCP (which stamps time.Now). Deterministic apart from the anchor "now".
Index ¶
- func Pick[T any](rng *rand.Rand, xs []T) T
- type Seeder
- func (s *Seeder) Close() error
- func (s *Seeder) CreateSession(sess core.Session) error
- func (s *Seeder) CreateTask(t core.Task) error
- func (s *Seeder) CreateTrial(tr core.Trial) error
- func (s *Seeder) DaysAgo(d int) time.Time
- func (s *Seeder) EnsureProject(slug, name string) error
- func (s *Seeder) Event(t time.Time, kind core.EventKind, sessionID, project, itemID string, ...)
- func (s *Seeder) IdAt(t time.Time) string
- func (s *Seeder) MapRepo(repoPath, project string) error
- func (s *Seeder) Now() time.Time
- func (s *Seeder) Scenes(repoPath string, race bool)
- func (s *Seeder) SeedConsoleFleet()
- func (s *Seeder) ToolCall(t time.Time, sessionID, project, tool string, args map[string]any, ...)
- func (s *Seeder) WriteMemory(mem core.Memory) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Seeder ¶
type Seeder struct {
// contains filtered or unexported fields
}
func New ¶
New opens the throwaway data dir -- creating the memory/ and notes/ subdirs and the SQLite DB -- and returns a Seeder ready to seed. The RNG is seeded from a fixed constant and "now" is captured once, so a run is deterministic apart from the wall-clock anchor. Never point this at a live instance.
func (*Seeder) CreateSession ¶ added in v0.4.6
CreateSession inserts a session row with the caller's timestamps.
func (*Seeder) CreateTask ¶ added in v0.4.6
CreateTask inserts a task row with the caller's timestamps.
func (*Seeder) CreateTrial ¶ added in v0.4.6
CreateTrial inserts a trial row with the caller's timestamps.
func (*Seeder) EnsureProject ¶ added in v0.4.6
EnsureProject creates the project if it does not exist yet.
func (*Seeder) MapRepo ¶ added in v0.4.6
MapRepo records repoPath -> project in the repo map, so sessions starting in that repo bind to the project without a setup step.
func (*Seeder) Now ¶ added in v0.4.6
Now returns the seeder's wall-clock anchor, captured once at New. Every backdated timestamp should derive from it so a whole seed shares one "now".
func (*Seeder) SeedConsoleFleet ¶
func (s *Seeder) SeedConsoleFleet()
SeedConsoleFleet seeds the fictional six-week console fleet history (the branding surface: landing-page screenshots) and prints a summary. This is the demoseed default mode.