demokit

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 16 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pick

func Pick[T any](rng *rand.Rand, xs []T) T

Types

type Seeder

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

func New

func New(dataDir string) (*Seeder, error)

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) Close

func (s *Seeder) Close() error

Close releases the seeder's database handle.

func (*Seeder) DaysAgo

func (s *Seeder) DaysAgo(d int) time.Time

func (*Seeder) Event

func (s *Seeder) Event(t time.Time, kind core.EventKind, sessionID, project, itemID string, payload map[string]any)

func (*Seeder) IdAt

func (s *Seeder) IdAt(t time.Time) string

func (*Seeder) Scenes

func (s *Seeder) Scenes(repoPath string, race bool)

scenes seeds the whole terminal-scenes fixture into the throwaway data dir.

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.

func (*Seeder) ToolCall

func (s *Seeder) ToolCall(t time.Time, sessionID, project, tool string, args map[string]any, result string, durMS int)

Jump to

Keyboard shortcuts

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