Documentation
¶
Index ¶
- func BuiltinTeamConfigs() (map[string]*TeamConfig, error)
- func IsPTYProvider(provider string) bool
- func ReadHandoff(bb *Blackboard, fromTeam, toTeam string) (map[string]string, bool)
- func ReadLatestDirective(bb *Blackboard, teamName string) (string, bool)
- func ValidateProjectConfig(pc *ProjectConfig) error
- func ValidateTeamConfig(tc *TeamConfig) error
- func WriteDirective(bb *Blackboard, toTeam, directive string)
- func WriteHandoff(bb *Blackboard, fromTeam, toTeam string, data map[string]string)
- type AgentConfig
- type AgentMesh
- func (m *AgentMesh) AddNodeToTeam(ctx context.Context, teamID string, cfg NodeConfig, bb *Blackboard, ...) error
- func (m *AgentMesh) RemoveNodeFromTeam(teamID, nodeName string, router *Router, bb *Blackboard) error
- func (m *AgentMesh) SpawnTeam(ctx context.Context, task string, configs []NodeConfig, ...) (*TeamHandle, error)
- type BBBridge
- type Blackboard
- func (b *Blackboard) List(section string) map[string]Entry
- func (b *Blackboard) ListSections() []string
- func (b *Blackboard) Read(section, key string) (Entry, bool)
- func (b *Blackboard) Unwatch(id WatcherID)
- func (b *Blackboard) Watch(fn func(key string, val Entry)) WatcherID
- func (b *Blackboard) Write(section, key string, value any, author string) Entry
- func (b *Blackboard) WriteFromRemote(section, key string, value any, author string, revision int64) Entry
- type BlackboardListTool
- type BlackboardReadTool
- type BlackboardWriteTool
- type Entry
- type Event
- type LocalNode
- type Message
- type Node
- type NodeConfig
- type NodeInfo
- type ProjectBlackboard
- type ProjectConfig
- type ProjectStatusSummary
- type ProjectStatusTool
- type ProjectTeamConfig
- type RemoteNode
- type Router
- type Section
- type SendMessageTool
- type Task
- type TaskClaimTool
- type TaskCreateTool
- type TaskGetTool
- type TaskListTool
- type TaskUpdateTool
- type TeamConfig
- func BuildTeamConfigFromFlags(name string, agentFlags []string, orchestrator string, bbMode string) (*TeamConfig, error)
- func DefaultCodeGenTeamConfig() (*TeamConfig, error)
- func LoadTeamConfig(path string) (*TeamConfig, error)
- func LoadTeamConfigs(dir string) ([]TeamConfig, error)
- func SearchTeamConfig(name, projectDir, homeDir string) (*TeamConfig, error)
- type TeamHandle
- type TeamResult
- type Tracker
- func (tr *Tracker) ClaimTask(taskID, agentName string) error
- func (tr *Tracker) CreateProject(name, configPath string) (string, error)
- func (tr *Tracker) CreateTask(projectID, title, description, assignedTeam string, priority int) (string, error)
- func (tr *Tracker) GetTask(taskID string) (*Task, error)
- func (tr *Tracker) ListTasks(projectID, team, status string, limit int) ([]Task, error)
- func (tr *Tracker) ProjectStatus(projectID string) (*ProjectStatusSummary, error)
- func (tr *Tracker) UpdateTask(taskID, status, notes string) error
- type TranscriptLogger
- type WatcherID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuiltinTeamConfigs ¶
func BuiltinTeamConfigs() (map[string]*TeamConfig, error)
BuiltinTeamConfigs returns all built-in team configurations keyed by name.
func IsPTYProvider ¶
IsPTYProvider returns true if the named provider requires a PTY session.
func ReadHandoff ¶
func ReadHandoff(bb *Blackboard, fromTeam, toTeam string) (map[string]string, bool)
ReadHandoff reads the handoff payload from one team to another. Returns the data map and true if found, nil and false otherwise.
func ReadLatestDirective ¶
func ReadLatestDirective(bb *Blackboard, teamName string) (string, bool)
ReadLatestDirective reads the most recent directive for a team.
func ValidateProjectConfig ¶
func ValidateProjectConfig(pc *ProjectConfig) error
ValidateProjectConfig checks that the project config is well-formed.
func ValidateTeamConfig ¶
func ValidateTeamConfig(tc *TeamConfig) error
ValidateTeamConfig checks that the team config is well-formed.
func WriteDirective ¶
func WriteDirective(bb *Blackboard, toTeam, directive string)
WriteDirective writes a directive from oversight to a team. Stored in BB section "directives/<toTeam>".
func WriteHandoff ¶
func WriteHandoff(bb *Blackboard, fromTeam, toTeam string, data map[string]string)
WriteHandoff writes a handoff payload from one team to another. Stored in BB section "handoffs/<from>-to-<to>".
Types ¶
type AgentConfig ¶
type AgentConfig struct {
Name string `yaml:"name" json:"name"`
Role string `yaml:"role" json:"role"`
Provider string `yaml:"provider" json:"provider"`
Model string `yaml:"model" json:"model"`
MaxIterations int `yaml:"max_iterations" json:"max_iterations,omitempty"`
SystemPrompt string `yaml:"system_prompt" json:"system_prompt,omitempty"`
Tools []string `yaml:"tools" json:"tools,omitempty"`
}
AgentConfig describes a single agent within a team.
func ParseAgentFlag ¶
func ParseAgentFlag(s string) (AgentConfig, error)
ParseAgentFlag parses a CLI agent flag in the format "name:provider[:model]".
type AgentMesh ¶
type AgentMesh struct {
// contains filtered or unexported fields
}
AgentMesh is the top-level orchestrator. It manages a blackboard, a router, a node registry, and team configuration.
func NewAgentMesh ¶
func NewAgentMesh() *AgentMesh
NewAgentMesh creates a new AgentMesh ready to spawn teams.
func (*AgentMesh) AddNodeToTeam ¶
func (m *AgentMesh) AddNodeToTeam( ctx context.Context, teamID string, cfg NodeConfig, bb *Blackboard, router *Router, providerFactory func(NodeConfig) provider.Provider, ) error
AddNodeToTeam dynamically adds a new node to a running team. The node is registered with the router and its presence is recorded in the BB team/members section. A goroutine is started to run the node.
func (*AgentMesh) RemoveNodeFromTeam ¶
func (m *AgentMesh) RemoveNodeFromTeam(teamID, nodeName string, router *Router, bb *Blackboard) error
RemoveNodeFromTeam removes a node from a running team by unregistering it from the router (which causes its inbox to be closed and node.Run to exit).
func (*AgentMesh) SpawnTeam ¶
func (m *AgentMesh) SpawnTeam( ctx context.Context, task string, configs []NodeConfig, providerFactory func(NodeConfig) provider.Provider, ) (*TeamHandle, error)
SpawnTeam initialises a team of agents from the given configs and starts them working on the supplied task. It returns a TeamHandle that the caller can use to observe progress and collect the final result.
type BBBridge ¶
type BBBridge struct {
// contains filtered or unexported fields
}
BBBridge translates mesh messages into PTY prompts and parses responses back into BB writes and outgoing messages.
func NewBBBridge ¶
func NewBBBridge( agentName, role string, teamMembers []string, workDir string, bb *Blackboard, transcript *TranscriptLogger, sendToPTY func(ctx context.Context, prompt string) (string, error), ) *BBBridge
NewBBBridge creates a bridge for a PTY-backed agent. workDir is the working directory for the underlying PTY provider session; pass "" to use the provider's default.
func (*BBBridge) FormatPrompt ¶
FormatPrompt builds a rich prompt from a mesh message, including BB state.
func (*BBBridge) ParseResponse ¶
ParseResponse extracts result markers and writes artifacts/status to BB.
type Blackboard ¶
type Blackboard struct {
// contains filtered or unexported fields
}
Blackboard is a shared, thread-safe key-value store used by mesh nodes to exchange structured state. Sections partition the keyspace, and a global monotonic revision counter enables conflict detection.
func NewBlackboard ¶
func NewBlackboard() *Blackboard
NewBlackboard returns an empty Blackboard ready for use.
func (*Blackboard) List ¶
func (b *Blackboard) List(section string) map[string]Entry
List returns all entries in a section. Returns nil if the section does not exist.
func (*Blackboard) ListSections ¶
func (b *Blackboard) ListSections() []string
ListSections returns the names of all sections that currently have entries.
func (*Blackboard) Read ¶
func (b *Blackboard) Read(section, key string) (Entry, bool)
Read returns the entry for section/key. The second return value is false if the section or key does not exist.
func (*Blackboard) Unwatch ¶
func (b *Blackboard) Unwatch(id WatcherID)
Unwatch removes a previously registered watcher by setting it to nil. Safe to call multiple times with the same ID.
func (*Blackboard) Watch ¶
func (b *Blackboard) Watch(fn func(key string, val Entry)) WatcherID
Watch registers a callback that is invoked after every Write. The callback receives the composite key ("section/key") and the entry. Returns a WatcherID that can be passed to Unwatch to remove the callback.
func (*Blackboard) Write ¶
func (b *Blackboard) Write(section, key string, value any, author string) Entry
Write stores a value under section/key, stamping it with author and an incremented global revision. Watchers are notified after the lock is released.
func (*Blackboard) WriteFromRemote ¶
func (b *Blackboard) WriteFromRemote(section, key string, value any, author string, revision int64) Entry
WriteFromRemote stores a value without triggering watchers. Used to apply remote blackboard syncs without creating echo loops.
type BlackboardListTool ¶
type BlackboardListTool struct {
// contains filtered or unexported fields
}
BlackboardListTool lists sections or keys within a section.
func (*BlackboardListTool) Definition ¶
func (t *BlackboardListTool) Definition() provider.ToolDef
func (*BlackboardListTool) Name ¶
func (t *BlackboardListTool) Name() string
type BlackboardReadTool ¶
type BlackboardReadTool struct {
// contains filtered or unexported fields
}
BlackboardReadTool reads an entry (or lists keys) from the blackboard.
func (*BlackboardReadTool) Definition ¶
func (t *BlackboardReadTool) Definition() provider.ToolDef
func (*BlackboardReadTool) Name ¶
func (t *BlackboardReadTool) Name() string
type BlackboardWriteTool ¶
type BlackboardWriteTool struct {
// contains filtered or unexported fields
}
BlackboardWriteTool writes a value to the blackboard, stamping the author from the agent context.
func (*BlackboardWriteTool) Definition ¶
func (t *BlackboardWriteTool) Definition() provider.ToolDef
func (*BlackboardWriteTool) Name ¶
func (t *BlackboardWriteTool) Name() string
type Entry ¶
type Entry struct {
Key string
Value any
Author string // node ID that wrote it
Revision int64 // monotonic, for conflict detection
Timestamp time.Time
}
Entry is a single value stored in a Blackboard section.
type Event ¶
type Event struct {
Type string // "agent_spawned", "agent_message", "tool_call", "text", "complete", "error"
AgentID string
Content string
Data map[string]any
}
Event is a real-time observation emitted during team execution.
type LocalNode ¶
type LocalNode struct {
// contains filtered or unexported fields
}
LocalNode is a mesh node backed by a local LLM provider. It delegates work to the workflow-plugin-agent executor and wires mesh blackboard/messaging as agent tools.
func NewLocalNode ¶
NewLocalNode creates a LocalNode that uses the given provider. If onEvent is non-nil it will receive executor events during Run.
func (*LocalNode) Run ¶
func (n *LocalNode) Run(ctx context.Context, task string, bb *Blackboard, inbox <-chan Message, outbox chan<- Message) error
Run executes the agent loop. It registers blackboard and messaging tools, then delegates to executor.Execute. The loop terminates when:
- The blackboard section "status" has this node's ID set to "done" or "approved"
- MaxIterations is reached
- The context is cancelled
type Message ¶
type Message struct {
ID string
From string // sender node ID
To string // recipient node ID, or "*" for broadcast
Type string // "task", "result", "feedback", "request"
Content string
Metadata map[string]string
Timestamp time.Time
}
Message is the envelope exchanged between mesh nodes.
type Node ¶
type Node interface {
// ID returns the unique identifier for this node.
ID() string
// Run executes the node's main loop. It reads from inbox, writes to
// outbox, and uses bb for shared state. The method blocks until the
// task is complete, the context is cancelled, or a stop condition is met.
Run(ctx context.Context, task string, bb *Blackboard, inbox <-chan Message, outbox chan<- Message) error
// Info returns static metadata about this node.
Info() NodeInfo
}
Node is the interface every mesh participant implements.
type NodeConfig ¶
type NodeConfig struct {
Name string
Role string
Model string
Provider string
Location string // "local" or "grpc://host:port"
SystemPrompt string
Tools []string
MaxIterations int
WorkDir string // working directory for this agent's sessions
AllowedPaths []string // whitelisted path prefixes for file tool access (empty = unrestricted)
TrustEngine interface{} // *policy.TrustEngine — passed to executor.Config as TrustEvaluator
SandboxMode bool
ContainerMgr interface{} // executor.ContainerExecutor
ProviderArgs []string // per-agent CLI args override for PTY adapters
}
NodeConfig holds everything needed to construct a LocalNode.
func ToNodeConfigs ¶
func ToNodeConfigs(tc *TeamConfig) []NodeConfig
ToNodeConfigs converts a TeamConfig's agents into NodeConfigs suitable for passing to NewLocalNode or SpawnTeam.
type NodeInfo ¶
type NodeInfo struct {
Name string
Role string
Model string
Provider string
Location string // "local" or "grpc://host:port"
}
NodeInfo describes a mesh node's identity and capabilities.
type ProjectBlackboard ¶
type ProjectBlackboard struct {
// contains filtered or unexported fields
}
ProjectBlackboard manages per-team Blackboard instances with configurable visibility modes (shared, isolated, orchestrator, bridge).
func NewProjectBlackboard ¶
func NewProjectBlackboard() *ProjectBlackboard
NewProjectBlackboard creates a project-level BB coordinator.
func (*ProjectBlackboard) Mode ¶
func (pbb *ProjectBlackboard) Mode(teamName string) string
Mode returns the configured BB mode for a team.
func (*ProjectBlackboard) Root ¶
func (pbb *ProjectBlackboard) Root() *Blackboard
Root returns the project-level shared Blackboard.
func (*ProjectBlackboard) TeamBB ¶
func (pbb *ProjectBlackboard) TeamBB(teamName, mode string) *Blackboard
TeamBB returns a Blackboard for the team based on its configured mode.
Modes:
- "shared" (default): Teams write to the root BB; full cross-team visibility.
- "isolated": Private BB with no cross-team reads or writes.
- "orchestrator": Private BB; orchestrator also has read access to root.
- "bridge:<t1>,<t2>": Teams named in the bridge share one BB instance.
type ProjectConfig ¶
type ProjectConfig struct {
Project string `yaml:"project" json:"project"`
Cwd string `yaml:"cwd,omitempty" json:"cwd,omitempty"` // where project was initiated (auto-set at start time if empty)
WorkDir string `yaml:"workdir,omitempty" json:"workdir,omitempty"` // working directory for agents (defaults to cwd)
Paths []string `yaml:"paths,omitempty" json:"paths,omitempty"` // whitelisted directories for tool/agent interaction
Teams []ProjectTeamConfig `yaml:"teams" json:"teams"`
}
ProjectConfig defines a multi-team project.
func LoadProjectConfig ¶
func LoadProjectConfig(path string) (*ProjectConfig, error)
LoadProjectConfig reads a project config file (YAML or JSON).
func ParseProjectConfig ¶
func ParseProjectConfig(data []byte) (*ProjectConfig, error)
ParseProjectConfig parses a YAML project config.
func ParseProjectConfigJSON ¶
func ParseProjectConfigJSON(data []byte) (*ProjectConfig, error)
ParseProjectConfigJSON parses a JSON project config.
type ProjectStatusSummary ¶
type ProjectStatusSummary struct {
ProjectID string
Name string
Total int
Completed int
InProgress int
Pending int
}
ProjectStatusSummary summarises task completion for a project.
type ProjectStatusTool ¶
type ProjectStatusTool struct {
// contains filtered or unexported fields
}
ProjectStatusTool returns aggregate task counts for a project.
func (*ProjectStatusTool) Definition ¶
func (t *ProjectStatusTool) Definition() provider.ToolDef
func (*ProjectStatusTool) Name ¶
func (t *ProjectStatusTool) Name() string
type ProjectTeamConfig ¶
type ProjectTeamConfig struct {
Name string `yaml:"name" json:"name"`
WorkDir string `yaml:"workdir,omitempty" json:"workdir,omitempty"` // per-team working directory (overrides project-level)
Agents []AgentConfig `yaml:"agents" json:"agents"`
Timeout string `yaml:"timeout,omitempty" json:"timeout,omitempty"`
Blackboard string `yaml:"blackboard,omitempty" json:"blackboard,omitempty"` // shared, isolated, orchestrator, bridge:<t1>,<t2>
}
ProjectTeamConfig extends TeamConfig with per-team Blackboard mode.
func (*ProjectTeamConfig) ToTeamConfig ¶
func (ptc *ProjectTeamConfig) ToTeamConfig() *TeamConfig
ToTeamConfig converts a ProjectTeamConfig to a standard TeamConfig.
type RemoteNode ¶
type RemoteNode struct {
// contains filtered or unexported fields
}
RemoteNode is a mesh node that lives on a remote daemon and communicates over gRPC via the MeshStream RPC.
func NewRemoteNode ¶
func NewRemoteNode(id, address string, info NodeInfo) *RemoteNode
NewRemoteNode creates a RemoteNode targeting the given gRPC address.
func (*RemoteNode) Info ¶
func (n *RemoteNode) Info() NodeInfo
Info returns the node's metadata with Location set to the gRPC address.
func (*RemoteNode) Run ¶
func (n *RemoteNode) Run(ctx context.Context, task string, bb *Blackboard, inbox <-chan Message, outbox chan<- Message) error
Run dials the remote daemon, opens a bidirectional MeshStream, and bridges the local blackboard and message channels with the remote execution.
All outgoing sends are serialized through a single sendCh to avoid concurrent gRPC stream.Send calls. Blackboard writes from the remote use WriteFromRemote to avoid echo loops back through the watcher.
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router delivers Messages between mesh nodes. Each registered node gets a buffered inbox channel. Messages addressed to "*" are broadcast to every registered node (except the sender).
func (*Router) Register ¶
Register creates an inbox for nodeID and returns the receive end. Calling Register twice for the same nodeID returns an error.
func (*Router) Send ¶
Send delivers msg to its target. If msg.To is "*", the message is sent to all registered nodes except the sender. Returns an error if a unicast target is not registered.
func (*Router) Unregister ¶
Unregister removes a node's inbox and closes the channel.
type SendMessageTool ¶
type SendMessageTool struct {
// contains filtered or unexported fields
}
SendMessageTool sends a mesh Message through the node's outbox channel.
func (*SendMessageTool) Definition ¶
func (t *SendMessageTool) Definition() provider.ToolDef
func (*SendMessageTool) Name ¶
func (t *SendMessageTool) Name() string
type Task ¶
type Task struct {
ID string
ProjectID string
Title string
Description string
AssignedTeam string
ClaimedBy string
Status string
Notes string
Priority int
CreatedAt time.Time
UpdatedAt time.Time
}
Task represents a unit of work tracked in the project.
type TaskClaimTool ¶
type TaskClaimTool struct {
// contains filtered or unexported fields
}
TaskClaimTool lets an agent claim a task (optimistic lock).
func (*TaskClaimTool) Definition ¶
func (t *TaskClaimTool) Definition() provider.ToolDef
func (*TaskClaimTool) Name ¶
func (t *TaskClaimTool) Name() string
type TaskCreateTool ¶
type TaskCreateTool struct {
// contains filtered or unexported fields
}
TaskCreateTool allows an agent to create a new task in the tracker.
func (*TaskCreateTool) Definition ¶
func (t *TaskCreateTool) Definition() provider.ToolDef
func (*TaskCreateTool) Name ¶
func (t *TaskCreateTool) Name() string
type TaskGetTool ¶
type TaskGetTool struct {
// contains filtered or unexported fields
}
TaskGetTool fetches a single task by ID.
func (*TaskGetTool) Definition ¶
func (t *TaskGetTool) Definition() provider.ToolDef
func (*TaskGetTool) Name ¶
func (t *TaskGetTool) Name() string
type TaskListTool ¶
type TaskListTool struct {
// contains filtered or unexported fields
}
TaskListTool lists tasks with optional filters.
func (*TaskListTool) Definition ¶
func (t *TaskListTool) Definition() provider.ToolDef
func (*TaskListTool) Name ¶
func (t *TaskListTool) Name() string
type TaskUpdateTool ¶
type TaskUpdateTool struct {
// contains filtered or unexported fields
}
TaskUpdateTool updates the status and notes of a task.
func (*TaskUpdateTool) Definition ¶
func (t *TaskUpdateTool) Definition() provider.ToolDef
func (*TaskUpdateTool) Name ¶
func (t *TaskUpdateTool) Name() string
type TeamConfig ¶
type TeamConfig struct {
Name string `yaml:"name" json:"name"`
Agents []AgentConfig `yaml:"agents" json:"agents"`
Timeout string `yaml:"timeout" json:"timeout,omitempty"` // duration string like "10m"
MaxReviewRounds int `yaml:"max_review_rounds" json:"max_review_rounds,omitempty"`
WorkDir string `yaml:"workdir,omitempty" json:"workdir,omitempty"` // working directory for agent sessions
Blackboard string `yaml:"blackboard,omitempty" json:"blackboard,omitempty"` // BB mode: shared, isolated, orchestrator, bridge:t1,t2
AllowedPaths []string `yaml:"paths,omitempty" json:"paths,omitempty"` // whitelisted path prefixes for tool access
}
TeamConfig describes a complete agent team loaded from YAML.
func BuildTeamConfigFromFlags ¶
func BuildTeamConfigFromFlags(name string, agentFlags []string, orchestrator string, bbMode string) (*TeamConfig, error)
BuildTeamConfigFromFlags constructs a TeamConfig from CLI flags.
func DefaultCodeGenTeamConfig ¶
func DefaultCodeGenTeamConfig() (*TeamConfig, error)
DefaultCodeGenTeamConfig returns the built-in code-gen team configuration.
func LoadTeamConfig ¶
func LoadTeamConfig(path string) (*TeamConfig, error)
LoadTeamConfig reads a team config file (YAML or JSON) and validates it.
func LoadTeamConfigs ¶
func LoadTeamConfigs(dir string) ([]TeamConfig, error)
LoadTeamConfigs discovers and loads all .yaml, .yml, and .json files in dir.
func SearchTeamConfig ¶
func SearchTeamConfig(name, projectDir, homeDir string) (*TeamConfig, error)
SearchTeamConfig searches for a named team config in standard paths:
- .ratchet/teams/ in projectDir (if non-empty)
- ~/.ratchet/teams/ in homeDir (if non-empty)
Returns the first match. Falls back to loading as a file path.
type TeamHandle ¶
type TeamHandle struct {
ID string
Done <-chan struct{}
Events <-chan Event
Cancel func()
// contains filtered or unexported fields
}
TeamHandle is returned by SpawnTeam and allows callers to wait for completion, observe events, or cancel the team.
Done is closed when the team finishes. Call Result() after Done closes to retrieve the final outcome. Using a close-only signal allows multiple independent consumers (e.g., a status tracker and an event bridge) to wait without racing for a single value.
func (*TeamHandle) Result ¶
func (h *TeamHandle) Result() TeamResult
Result returns the final outcome recorded for the team. Callers should wait for Done to be closed before calling Result.
type TeamResult ¶
TeamResult is the final outcome of a team execution.
type Tracker ¶
type Tracker struct {
// contains filtered or unexported fields
}
Tracker is an SQLite-backed task tracker for multi-team projects.
func NewTracker ¶
NewTracker creates the schema (if needed) and returns a Tracker.
func (*Tracker) ClaimTask ¶
ClaimTask assigns a task to an agent (optimistic lock — fails if already claimed).
func (*Tracker) CreateProject ¶
CreateProject inserts a project row and returns its ID.
func (*Tracker) CreateTask ¶
func (tr *Tracker) CreateTask(projectID, title, description, assignedTeam string, priority int) (string, error)
CreateTask inserts a task row and returns its ID.
func (*Tracker) ListTasks ¶
ListTasks returns tasks filtered by optional projectID, team, and status.
func (*Tracker) ProjectStatus ¶
func (tr *Tracker) ProjectStatus(projectID string) (*ProjectStatusSummary, error)
ProjectStatus returns aggregate task counts for a project.
func (*Tracker) UpdateTask ¶
UpdateTask sets the status and appends notes.
type TranscriptLogger ¶
type TranscriptLogger struct {
// contains filtered or unexported fields
}
TranscriptLogger records BB writes and mesh messages to a writer.
func NewTranscriptLogger ¶
func NewTranscriptLogger(w io.Writer, bb *Blackboard, _ *Router, teamID string) *TranscriptLogger
NewTranscriptLogger creates a logger that watches bb writes and writes formatted transcript lines to w.
func (*TranscriptLogger) LogComplete ¶
func (tl *TranscriptLogger) LogComplete(agentCount, _ int)
LogComplete records the team completion event.
func (*TranscriptLogger) LogMessage ¶
func (tl *TranscriptLogger) LogMessage(msg Message)
LogMessage records a mesh message to the transcript.
func (*TranscriptLogger) LogStart ¶
func (tl *TranscriptLogger) LogStart(task string)
LogStart records the team start event.
func (*TranscriptLogger) Writes ¶
func (tl *TranscriptLogger) Writes() int
Writes returns the total number of BB writes observed.