Documentation
¶
Overview ¶
Package api is lectern's HTTP surface: the REST control plane, the agent-facing hook endpoints, the SSE streams and the embedded PWA.
Index ¶
Constants ¶
const ( AgentTaskCap = 10 NoteCap = 20 )
AgentTaskCap and NoteCap bound what one attempt can file, so a looping agent cannot flood the board or the memory store.
Variables ¶
var ClaudeModels = []string{"fable", "opus", "sonnet", "haiku"}
ClaudeModels are the shorthands Claude Code accepts. Every other agent names its models differently and the set moves, so there is nothing honest to hardcode for them — what you have actually used is the better suggestion.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
DB *store.DB
Bus *bus.Bus
Broker *broker.Broker
Notifier *sinks.Notifier
Reg *executor.Registry
Sched *scheduler.Scheduler
Sessions *sessions.Manager
Memory memory.Provider
Terminals *terminal.Manager
Push *push.Sender
Cfg *config.Config
Log *slog.Logger
// contains filtered or unexported fields
}
Server wires every dependency the handlers need.
func (*Server) Creds ¶
func (s *Server) Creds() *creds.Provisioner
Creds exposes the provisioner the scheduler owns, so the deep probe and a dispatch can never drift apart.
func (*Server) DrainStreams ¶
func (s *Server) DrainStreams()
DrainStreams ends open-ended live updates before HTTP graceful shutdown waits for requests. Ordinary requests retain their own lifetime and drain normally.
func (*Server) RunDueRoutines ¶
RunDueRoutines fires every scheduled routine whose time has come. The scheduler calls this on its tick.
A routine that cannot be scheduled any more (its schedule was edited to something unreadable) is disabled rather than retried forever, and says so in the log — a job silently firing every two seconds is a much worse failure than one that stops.
Source Files
¶
- agent_commands.go
- agent_registry.go
- approvals.go
- attachments.go
- conversation.go
- delegation.go
- import.go
- interactive_worktree.go
- launch_profiles.go
- live.go
- media.go
- misc.go
- native_conversations.go
- native_search.go
- native_search_fork.go
- project_link.go
- project_mcp.go
- project_memory.go
- project_skills.go
- project_workflows.go
- projects.go
- promotion_preview.go
- review.go
- routines.go
- scratch.go
- server.go
- session_archive.go
- session_memory.go
- sessions.go
- shells.go
- takeovers.go
- targets.go
- task_build.go
- tasks.go
- terminal_workspace.go
- termproxy.go
- view.go
- workspace_operations.go