Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
lectern
command
Command lectern is the control plane: one binary that serves the API, the PWA and the scheduler that drives every dispatched agent.
|
Command lectern is the control plane: one binary that serves the API, the PWA and the scheduler that drives every dispatched agent. |
|
lectern/localruntime
Package localruntime starts the per-user Lectern control plane used by the local CLI.
|
Package localruntime starts the per-user Lectern control plane used by the local CLI. |
|
internal
|
|
|
a2a
Package a2a implements the server half of the Agent2Agent (A2A) protocol v1.0 (Linux Foundation) over its JSON-RPC 2.0 binding: the public Agent Card, the request/response envelope, the Task object, and the mapping from Lectern's board columns onto the protocol's task states.
|
Package a2a implements the server half of the Agent2Agent (A2A) protocol v1.0 (Linux Foundation) over its JSON-RPC 2.0 binding: the public Agent Card, the request/response envelope, the Task object, and the mapping from Lectern's board columns onto the protocol's task states. |
|
accounts
Package accounts is everything CLI-specific about running one agent CLI under several logins (docs/accounts.md): which environment variable moves a CLI's config directory, how that CLI lays out a conversation inside it, how to sign an account in, and which account a usage limit should move work to.
|
Package accounts is everything CLI-specific about running one agent CLI under several logins (docs/accounts.md): which environment variable moves a CLI's config directory, how that CLI lays out a conversation inside it, how to sign an account in, and which account a usage limit should move work to. |
|
agentevents
Package agentevents ingests the push-based lifecycle and usage signals an agent reports about itself — Claude Code's settings-driven hooks and statusline, and (where 0.155 supports it) Codex's hooks.json/notify — and turns them into session state, per contract in docs/agent-events.md section 2.
|
Package agentevents ingests the push-based lifecycle and usage signals an agent reports about itself — Claude Code's settings-driven hooks and statusline, and (where 0.155 supports it) Codex's hooks.json/notify — and turns them into session state, per contract in docs/agent-events.md section 2. |
|
agents
Package agents is the coding-agent adapter seam.
|
Package agents is the coding-agent adapter seam. |
|
alerts
Package alerts pushes a phone notification when an interactive session needs its operator — docs/agent-events.md section 3.
|
Package alerts pushes a phone notification when an interactive session needs its operator — docs/agent-events.md section 3. |
|
api
The CI-aware PR loop's API surface (internal/ciloop, docs/ci-loop.md): arming a watch when the commit button opens a PR, the manual "watch this PR" endpoint for a PR the agent opened itself, and the card view.
|
The CI-aware PR loop's API surface (internal/ciloop, docs/ci-loop.md): arming a watch when the commit button opens a PR, the manual "watch this PR" endpoint for a PR the agent opened itself, and the card view. |
|
app
Package app wires every component together.
|
Package app wires every component together. |
|
auth
Package auth resolves who is making a request — a local process on this box, a tailnet user identified through tailscaled, or a bearer token — and decides what mode of gating the control plane runs under.
|
Package auth resolves who is making a request — a local process on this box, a tailnet user identified through tailscaled, or a bearer token — and decides what mode of gating the control plane runs under. |
|
autonomy
Package autonomy contains the deterministic daily experiment policy.
|
Package autonomy contains the deterministic daily experiment policy. |
|
awareness
Package awareness gives interactive agent sessions visibility into what OTHER live sessions (and running task attempts) are doing in the same repository, so two agents working the same checkout — or two worktrees of it — don't duplicate or collide with each other's work.
|
Package awareness gives interactive agent sessions visibility into what OTHER live sessions (and running task attempts) are doing in the same repository, so two agents working the same checkout — or two worktrees of it — don't duplicate or collide with each other's work. |
|
broker
Package broker is the approval gate: the hook blocks here until a human — or expiry — decides.
|
Package broker is the approval gate: the hook blocks here until a human — or expiry — decides. |
|
browser
Package browser drives a real Chromium on a target over the Chrome DevTools Protocol, for the session Browser pane, Design Mode and the agent browser tools (docs/browser.md).
|
Package browser drives a real Chromium on a target over the Chrome DevTools Protocol, for the session Browser pane, Design Mode and the agent browser tools (docs/browser.md). |
|
budget
Package budget closes the "hard stop / spend alerts" competitive gap: daily/weekly USD caps (overall and optionally per agent), a per-task budget_usd field, Claude 5h/7d quota-threshold alerts, and a cost-anomaly check — all built on top of the account's own usage_daily/attempts history (internal/store) and delivered through the existing sinks.Notifier (docs/agent-events.md section 3), the same way internal/alerts and internal/autonomy already extend that infrastructure rather than duplicating it.
|
Package budget closes the "hard stop / spend alerts" competitive gap: daily/weekly USD caps (overall and optionally per agent), a per-task budget_usd field, Claude 5h/7d quota-threshold alerts, and a cost-anomaly check — all built on top of the account's own usage_daily/attempts history (internal/store) and delivered through the existing sinks.Notifier (docs/agent-events.md section 3), the same way internal/alerts and internal/autonomy already extend that infrastructure rather than duplicating it. |
|
bus
Package bus is the in-process SSE fan-out.
|
Package bus is the in-process SSE fan-out. |
|
checks
Package checks runs a project's check command against a session's worktree when its agent stops, and stores the result for the card to show.
|
Package checks runs a project's check command against a session's worktree when its agent stops, and stores the result for the card to show. |
|
ciloop
Package ciloop is the CI-aware PR loop (docs/ci-loop.md): once Lectern opens a pull request for a task or session on a project that opted in, it watches the PR's checks through the target's own `gh`, and when they fail it sends the owning agent a short failure report — failing job names and a trimmed, redacted log tail — asking it to fix them.
|
Package ciloop is the CI-aware PR loop (docs/ci-loop.md): once Lectern opens a pull request for a task or session on a project that opted in, it watches the PR's checks through the target's own `gh`, and when they fail it sends the owning agent a short failure report — failing job names and a trimmed, redacted log tail — asking it to fix them. |
|
claims
Package claims is the Claim board's logic half: a shared, vendor-neutral record of who is doing what in a repository, so agents from different vendors (Claude Code, Codex, ACP agents) and humans coordinate instead of duplicating work on the same checkout.
|
Package claims is the Claim board's logic half: a shared, vendor-neutral record of who is doing what in a repository, so agents from different vendors (Claude Code, Codex, ACP agents) and humans coordinate instead of duplicating work on the same checkout. |
|
config
Package config holds every knob lectern reads from the environment.
|
Package config holds every knob lectern reads from the environment. |
|
console
Package console is a terminal client for the same API used by the web UI.
|
Package console is a terminal client for the same API used by the web UI. |
|
console/mods
Package mods runs plugin mods (docs/mods.md) inside the terminal console.
|
Package mods runs plugin mods (docs/mods.md) inside the terminal console. |
|
creds
Package creds provisions agent authentication onto targets.
|
Package creds provisions agent authentication onto targets. |
|
ctxbundle
Package ctxbundle stages the files a dispatched agent should read before it starts.
|
Package ctxbundle stages the files a dispatched agent should read before it starts. |
|
delegation
Package delegation is the "Delegated builds" feature: a lead agent plans a piece of work and reviews the result, and a cheaper worker agent does the implementation in between, as a Lectern task in its own worktree.
|
Package delegation is the "Delegated builds" feature: a lead agent plans a piece of work and reviews the result, and a cheaper worker agent does the implementation in between, as a Lectern task in its own worktree. |
|
desktop
Package desktop gives a target a private graphical display the operator can watch from a browser.
|
Package desktop gives a target a private graphical display the operator can watch from a browser. |
|
drivers
Package drivers is the one seam between "an unattended agent run" and everything that wants to start one: the scheduler (queued attempts today launched by tmux + a polled events.jsonl file, unchanged), the new steering endpoint, and — the reason this package exists standalone rather than as scheduler-internal helpers — future best-of-N and agent-eval workers that want to start a run directly, with no task, board or database involved.
|
Package drivers is the one seam between "an unattended agent run" and everything that wants to start one: the scheduler (queued attempts today launched by tmux + a polled events.jsonl file, unchanged), the new steering endpoint, and — the reason this package exists standalone rather than as scheduler-internal helpers — future best-of-N and agent-eval workers that want to start a run directly, with no task, board or database involved. |
|
evals
Package evals holds the pieces of the agent-test-suite ("evals") feature that do not need the database or a live target: the `.lectern/evals/*.yaml` suite format and its parsing/validation, and pure result-aggregation math (leaderboards, run comparison) that the API layer feeds real rows into.
|
Package evals holds the pieces of the agent-test-suite ("evals") feature that do not need the database or a live target: the `.lectern/evals/*.yaml` suite format and its parsing/validation, and pure result-aggregation math (leaderboards, run comparison) that the API layer feeds real rows into. |
|
executor
Package executor abstracts "run a command / move a file on a machine".
|
Package executor abstracts "run a command / move a file on a machine". |
|
filelinks
Package filelinks finds what a click on terminal output points at: a web address or a file path, including a path an agent's TUI hard-wrapped across rows.
|
Package filelinks finds what a click on terminal output points at: a web address or a file path, including a path an agent's TUI hard-wrapped across rows. |
|
forward
Package forward carries TCP from a port on the control plane to a service that only listens on a target's localhost.
|
Package forward carries TCP from a port on the control plane to a service that only listens on a target's localhost. |
|
gitbash
Package gitbash finds the bash that ships with Git for Windows.
|
Package gitbash finds the bash that ships with Git for Windows. |
|
helpers
Package helpers holds the target-side helpers: small programs Lectern runs on an agent machine to read or change something there — a workspace file operation, a native conversation search, an agent hook.
|
Package helpers holds the target-side helpers: small programs Lectern runs on an agent machine to read or change something there — a workspace file operation, a native conversation search, an agent hook. |
|
helpers/helperstest
Package helperstest runs target-side helpers the way a target does — as a separate process with its own environment, working directory, stdin and exit status — so a test can hold a Go helper and the Python script it replaces to the same observable behaviour.
|
Package helperstest runs target-side helpers the way a target does — as a separate process with its own environment, working directory, stdin and exit status — so a test can hold a Go helper and the Python script it replaces to the same observable behaviour. |
|
hooks
Package hooks embeds the two agent-side Python scripts staged into a worktree on a target without a lectern binary.
|
Package hooks embeds the two agent-side Python scripts staged into a worktree on a target without a lectern binary. |
|
isolation
Package isolation builds the per-agent-process sandbox a session or task attempt can run inside, as a fast, no-clone alternative to the full LXC clone in internal/sandbox: bubblewrap (no daemon, Linux only) or a disposable Docker container.
|
Package isolation builds the per-agent-process sandbox a session or task attempt can run inside, as a fast, no-clone alternative to the full LXC clone in internal/sandbox: bubblewrap (no daemon, Linux only) or a disposable Docker container. |
|
limits
Package limits makes Lectern usage-limit aware: it recognises when an agent CLI has been stopped by its provider's usage limit, records a hold with the reset time, and applies the session's or project's policy — notify, wait and resume at the reset, or hand the work to another agent.
|
Package limits makes Lectern usage-limit aware: it recognises when an agent CLI has been stopped by its provider's usage limit, records a hold with the reset time, and applies the session's or project's policy — notify, wait and resume at the reset, or hand the work to another agent. |
|
mcp
Package mcp exposes lectern over the Model Context Protocol on stdio, so any MCP client — Claude Code, an mcpo bridge, a chat bot — can file and steer tasks.
|
Package mcp exposes lectern over the Model Context Protocol on stdio, so any MCP client — Claude Code, an mcpo bridge, a chat bot — can file and steer tasks. |
|
mediapost
Package mediapost is the one way a file or link reaches Lectern's media feed.
|
Package mediapost is the one way a file or link reaches Lectern's media feed. |
|
memory
Package memory is lectern's seam onto a durable knowledge store.
|
Package memory is lectern's seam onto a durable knowledge store. |
|
nativeidentity
Package nativeidentity is the single read-only native conversation identity implementation shared by the API history reader and session recovery.
|
Package nativeidentity is the single read-only native conversation identity implementation shared by the API history reader and session recovery. |
|
oauth
Package oauth is the authorization server for Lectern's public MCP web connector (Streamable HTTP), ported from Grimoire's grimoire-mcp OAuth server — the same owner's MIT-licensed sibling project, already live in production for exactly this problem.
|
Package oauth is the authorization server for Lectern's public MCP web connector (Streamable HTTP), ported from Grimoire's grimoire-mcp OAuth server — the same owner's MIT-licensed sibling project, already live in production for exactly this problem. |
|
onboard
Package onboard holds the small set of environment checks a brand-new install needs answered before its first session: which agent CLIs are on PATH, and whether tmux/git are available.
|
Package onboard holds the small set of environment checks a brand-new install needs answered before its first session: which agent CLIs are on PATH, and whether tmux/git are available. |
|
outcomes
Package outcomes closes the "cost per outcome" competitive gap: tying every dollar spent to what it produced (a passing check, an accepted change, kept lines, an eval pass), per agent and model.
|
Package outcomes closes the "cost per outcome" competitive gap: tying every dollar spent to what it produced (a passing check, an accepted change, kept lines, an eval pass), per agent and model. |
|
pairing
Package pairing lets a phone with no Tailscale reach Lectern through an ordinary public tunnel (Cloudflare Tunnel, `tailscale funnel`, ...) without handing it the operator's static LECTERN_AUTH_TOKEN.
|
Package pairing lets a phone with no Tailscale reach Lectern through an ordinary public tunnel (Cloudflare Tunnel, `tailscale funnel`, ...) without handing it the operator's static LECTERN_AUTH_TOKEN. |
|
pluginpkg
Package pluginpkg is the plugin package format: the lectern-plugin.yaml manifest, its validation, the content hash consent is pinned to, the capability list a person reviews, and the plugins bundled into the binary.
|
Package pluginpkg is the plugin package format: the lectern-plugin.yaml manifest, its validation, the content hash consent is pinned to, the capability list a person reviews, and the plugins bundled into the binary. |
|
plugins
Package plugins installs plugins, keeps the consent that pins each one, and hands their contributions to the places Lectern already has: the agent catalog, project workflows, agent MCP config, lifecycle hooks and the UI.
|
Package plugins installs plugins, keeps the consent that pins each one, and hands their contributions to the places Lectern already has: the agent catalog, project workflows, agent MCP config, lifecycle hooks and the UI. |
|
policy
Package policy holds a project's "always allow" rules, evaluated server-side before a human is ever paged.
|
Package policy holds a project's "always allow" rules, evaluated server-side before a human is ever paged. |
|
ptyhost
Package ptyhost is Lectern's own terminal keeper: one small process per user per machine that owns pseudo-terminals, so agents and shells outlive the Lectern server, its restarts and its upgrades, with nothing but the lectern binary installed (docs/ptyhost.md).
|
Package ptyhost is Lectern's own terminal keeper: one small process per user per machine that owns pseudo-terminals, so agents and shells outlive the Lectern server, its restarts and its upgrades, with nothing but the lectern binary installed (docs/ptyhost.md). |
|
push
Package push is the web-push (VAPID) notification sink.
|
Package push is the web-push (VAPID) notification sink. |
|
relay
Package relay holds the pieces of Lectern's end-to-end encrypted relay that both ends share: key material, the Noise handshake between a phone and the host, the framing of HTTP and WebSocket traffic inside that encrypted channel, and the relay's own routing frames.
|
Package relay holds the pieces of Lectern's end-to-end encrypted relay that both ends share: key material, the Noise handshake between a phone and the host, the framing of HTTP and WebSocket traffic inside that encrypted channel, and the relay's own routing frames. |
|
relay/client
Package client is a Go implementation of the phone's side of the relay (the browser's is frontend/src/relay).
|
Package client is a Go implementation of the phone's side of the relay (the browser's is frontend/src/relay). |
|
relay/host
Package host is the Lectern side of the end-to-end encrypted relay (docs/relay.md).
|
Package host is the Lectern side of the end-to-end encrypted relay (docs/relay.md). |
|
relay/server
Package server is `lectern relay`: a single-process, stateless router of opaque frames between a Lectern host and that host's paired devices.
|
Package server is `lectern relay`: a single-process, stateless router of opaque frames between a Lectern host and that host's paired devices. |
|
replay
Package replay builds eval cases from a project's own merged-PR history — "replay evals" (docs/replay-evals.md): the answer to "which agent/model is best for MY repository" ground-truthed against what actually landed, not a hand-written prompt.
|
Package replay builds eval cases from a project's own merged-PR history — "replay evals" (docs/replay-evals.md): the answer to "which agent/model is best for MY repository" ground-truthed against what actually landed, not a hand-written prompt. |
|
routines
Package routines turns a job you keep asking for into one you can press a button for, or schedule.
|
Package routines turns a job you keep asking for into one you can press a button for, or schedule. |
|
sandbox
Package sandbox owns the ephemeral LXC lifecycle: clone template, start, run, destroy.
|
Package sandbox owns the ephemeral LXC lifecycle: clone template, start, run, destroy. |
|
scheduler
Package scheduler promotes queued attempts, tails running ones and finalises results.
|
Package scheduler promotes queued attempts, tails running ones and finalises results. |
|
scratch
Package scratch reclaims throwaway workspaces nobody is using.
|
Package scratch reclaims throwaway workspaces nobody is using. |
|
sessions
Package sessions is lectern's second execution mode: an INTERACTIVE agent you work with, rather than a task you hand off.
|
Package sessions is lectern's second execution mode: an INTERACTIVE agent you work with, rather than a task you hand off. |
|
sessions/backend
Package backend is the seam between Lectern and whatever keeps its terminals alive on a target: tmux, or Lectern's own PTY host (docs/ptyhost.md).
|
Package backend is the seam between Lectern and whatever keeps its terminals alive on a target: tmux, or Lectern's own PTY host (docs/ptyhost.md). |
|
shellq
Package shellq renders values as shell words.
|
Package shellq renders values as shell words. |
|
sinks
Package sinks fans notifications out to web-push, a Discord webhook and ntfy, best-effort and never blocking the caller.
|
Package sinks fans notifications out to web-push, a Discord webhook and ntfy, best-effort and never blocking the caller. |
|
skills
Package skills manages project skill intent and target-local materialization.
|
Package skills manages project skill intent and target-local materialization. |
|
sshconfig
Package sshconfig reads the control plane's ~/.ssh/config so its hosts can become Lectern targets in one click (docs/ssh.md).
|
Package sshconfig reads the control plane's ~/.ssh/config so its hosts can become Lectern targets in one click (docs/ssh.md). |
|
state
Package state is the task state machine — the single source of truth for which board moves are legal.
|
Package state is the task state machine — the single source of truth for which board moves are legal. |
|
store
Package store is lectern's SQLite persistence layer: schema, typed row accessors, and the small JSON helpers the rest of the service shares.
|
Package store is lectern's SQLite persistence layer: schema, typed row accessors, and the small JSON helpers the rest of the service shares. |
|
terminal
Package terminal is one-click terminal attach: spawn a terminal server on the control plane that wraps the attach command (`tmux attach` or `lectern pty attach-session`, locally, over ssh, or via pct) for a running attempt or session.
|
Package terminal is one-click terminal attach: spawn a terminal server on the control plane that wraps the attach command (`tmux attach` or `lectern pty attach-session`, locally, over ssh, or via pct) for a running attempt or session. |
|
terminal/webterm
Package webterm is Lectern's own web terminal server.
|
Package webterm is Lectern's own web terminal server. |
|
testutil
Package testutil contains small safety helpers shared by real-process tests.
|
Package testutil contains small safety helpers shared by real-process tests. |
|
testutil/lecternbin
Package lecternbin lets a test binary stand in for the lectern binary on a target.
|
Package lecternbin lets a test binary stand in for the lectern binary on a target. |
|
testutil/ptytest
Package ptytest gives a test its own PTY host socket.
|
Package ptytest gives a test its own PTY host socket. |
|
tmuxkeys
Package tmuxkeys turns on tmux's extended keys for Lectern's sessions, so a program can tell Shift+Enter from Enter through tmux (docs/workspace.md).
|
Package tmuxkeys turns on tmux's extended keys for Lectern's sessions, so a program can tell Shift+Enter from Enter through tmux (docs/workspace.md). |
|
trackers
Package trackers reads and acts on the places work is tracked outside Lectern: pull requests and issues on GitHub (through the target's own `gh`) and GitLab (through the target's own `glab`), and issues in Linear and Jira (through their HTTP APIs with a key stored like a trigger source's).
|
Package trackers reads and acts on the places work is tracked outside Lectern: pull requests and issues on GitHub (through the target's own `gh`) and GitLab (through the target's own `glab`), and issues in Linear and Jira (through their HTTP APIs with a key stored like a trigger source's). |
|
triggers
Package triggers lets a project pick up work on its own — from a labelled GitHub issue, an @mention in a PR/issue comment, a Slack message, a /lectern slash command, or a labelled Linear or Jira issue — the way Devin, Cursor, Codex, Tembo and Charlie already do.
|
Package triggers lets a project pick up work on its own — from a labelled GitHub issue, an @mention in a PR/issue comment, a Slack message, a /lectern slash command, or a labelled Linear or Jira issue — the way Devin, Cursor, Codex, Tembo and Charlie already do. |
|
version
Package version carries the single source of truth for the release string.
|
Package version carries the single source of truth for the release string. |
|
vocab
Package vocab holds the words Lectern shows people, so the web app, the phone, the terminal client and the CLI say the same thing (docs/design/simple-ui.md "Vocabulary").
|
Package vocab holds the words Lectern shows people, so the web app, the phone, the terminal client and the CLI say the same thing (docs/design/simple-ui.md "Vocabulary"). |
|
voice
Package voice transcribes dictation on the Lectern host with whisper.cpp, for phones whose browser has no usable speech recognition (the Android app's WebView has none) or whose owner would rather the audio stay on their own machine than go to a browser vendor's speech service.
|
Package voice transcribes dictation on the Lectern host with whisper.cpp, for phones whose browser has no usable speech recognition (the Android app's WebView has none) or whose owner would rather the audio stay on their own machine than go to a browser vendor's speech service. |
|
workflows
Package workflows stages project workflows and plugin skills onto targets.
|
Package workflows stages project workflows and plugin skills onto targets. |
|
worktree
Package worktree owns the git worktree lifecycle and diff capture, all through the Executor interface so it works identically on every target kind.
|
Package worktree owns the git worktree lifecycle and diff capture, all through the Executor interface so it works identically on every target kind. |
|
tools
|
|
|
stress
command
Command stress is Lectern's scale benchmark driver.
|
Command stress is Lectern's scale benchmark driver. |
|
Package web embeds the lectern PWA so the binary is fully self-contained: one file to deploy, and the UI works with no internet access.
|
Package web embeds the lectern PWA so the binary is fully self-contained: one file to deploy, and the UI works with no internet access. |
Click to show internal directories.
Click to hide internal directories.

