MCPcopy Create free account

hub / github.com/betta-tech/byo-coding-agent / types & classes

Types & classes75 in github.com/betta-tech/byo-coding-agent

↓ 1 callersTypeAliasAppendMsg
── messages ────────────────────────────────────────────────────────────── AppendMsg appends text to the scrollback. Sent by the stdout-pipe forwarder
internal/ui/program.go:46
StructAgent
Agent owns one conversation: a provider, a tool registry, a compaction strategy, and a slice of messages. The same struct serves the root REPL and any
internal/agent/agent.go:23
FuncTypeAgentRunner
AgentRunner is what the program calls when the user submits a line. It covers both slash commands and normal agent turns — the harness wires it up in
internal/ui/program.go:41
StructAnthropicProvider
AnthropicProvider is the reference Provider implementation. It is the only file in the harness that imports the Anthropic SDK.
internal/provider/anthropic.go:18
StructApprovalRequest
ApprovalRequest is sent (via program.Send) when the agent needs y/n from the user. The program shows the prompt and writes the answer to Reply. Detai
internal/ui/program.go:55
StructBashTool
internal/tool/bash.go:12
StructBlock
Block is one piece of message content. Fields are interpreted based on Type.
internal/api/types.go:27
TypeAliasBlockType
internal/api/types.go:18
StructClient
Client wraps an MCP session and the transport it was opened on. One Client corresponds to one connected server; Close terminates it.
internal/mcp/client.go:17
InterfaceCompactionStrategy
internal/compact/strategy.go:14
StructConfig
Config is the top-level JSON shape.
internal/mcp/register.go:59
StructDebugRefreshMsg
DebugRefreshMsg tells the TUI to re-read the debug ring and redraw the panel. Sent from debug.SetSink whenever a new event is recorded.
internal/ui/program.go:63
StructDebugToggleMsg
DebugToggleMsg tells the TUI that debug.Enabled() may have changed, so it should recompute viewport heights. Sent by the /debug slash command.
internal/ui/program.go:67
StructDelegateTool
DelegateTool exposes one Subagent to the model as a callable tool. The model sees "delegate_<subagent name>" with the subagent's description and a sin
delegate.go:22
StructEntry
Entry is one piece of memory. Kind tags the role of the content so implementations can route or group it — e.g., SessionFiles uses KindSessionSummary
internal/memory/store.go:19
StructEvent
Event is one entry in the debug log. Message is the one-line summary shown in the panel; Payload is the optional long-form content (request JSON, full
internal/debug/debug.go:34
TypeAliasLevel
Level classifies an event's severity. Used by the UI to color-code lines.
internal/debug/debug.go:18
StructLoggingStrategy
LoggingStrategy wraps another strategy and appends each non-trivial compaction (before / after) to a file. Use it to inspect strategies and compare th
internal/compact/logging.go:15
StructMCPStatusMsg
MCPStatusMsg reports progress while MCP servers are being connected in the background at startup. The TUI shows a "loading…" line above the input box
internal/ui/program.go:72
StructMCPTool
MCPTool wraps one remote tool so the agent's local Registry can dispatch to it. The agent loop sees a Tool like any other.
internal/mcp/register.go:17
StructMessage
internal/api/types.go:40
StructMockProvider
MockProvider is a Provider implementation that returns canned responses. It's the recommended way to test the agent loop, compaction strategies, and a
internal/provider/mock.go:22
StructNoCompaction
NoCompaction is the default — never modifies messages.
internal/compact/nocompaction.go:10
StructNoMemory
NoMemory is the do-nothing fallback. Every method succeeds with empty output. Used as the initial value of Default and as the test seam for "what if m
internal/memory/store.go:54
StructOpenAIProvider
OpenAIProvider implements Provider on OpenAI's Chat Completions API. Works for any chat-capable model: gpt-4o, gpt-5, gpt-5-codex, o3-mini, etc. This
internal/provider/openai.go:21
FuncTypeProgressFunc
ProgressFunc reports background progress while Register is iterating the server list. server is the current server's name (empty on Begin/Done); total
internal/mcp/register.go:96
TypeAliasProgressStatus
ProgressStatus is one phase of MCP server bring-up. A ProgressFunc gets called once per phase per server, plus ProgressBegin/ProgressDone bracketing t
internal/mcp/register.go:83
InterfaceProvider
internal/provider/provider.go:12
StructReadFileTool
internal/tool/readfile.go:12
StructRecallTool
RecallTool surfaces past memory entries (typically prior session summaries) that match a query. Match semantics depend on the Store — SessionFiles (th
internal/tool/recall.go:18
StructRegistry
internal/subagent/registry.go:26
StructRegistry
internal/tool/registry.go:19
StructRememberTool
RememberTool writes a piece of memory through the active memory.Default store. Persistence semantics depend on the Store implementation — see follow_a
internal/tool/remember.go:17
StructResearch
Research is a focused subagent for read-only investigation. It gets the file-reading tools but not bash, and runs with a tight system prompt so it sta
internal/subagent/research.go:14
StructResponse
internal/api/types.go:72
TypeAliasRole
internal/api/types.go:11
StructServerConfig
ServerConfig describes one MCP server to connect to. Either Command (with optional Args) for stdio, or URL (with optional Headers) for HTTP. The loade
internal/mcp/register.go:49
StructSessionFiles
SessionFiles is the default Store: one markdown file per session under <root>/sessions/, with <root>/index.json as a fast-lookup layer over them. Both
internal/memory/sessionfiles.go:24
StructSessionRecord
SessionRecord is the metadata stored in index.json — one entry per session file. Path is relative to the store's root directory.
internal/memory/sessionfiles.go:34
StructSlidingWindow
SlidingWindow keeps the last KeepLast messages and drops everything older. It snaps to a safe boundary so it never separates a tool_use from its tool_
internal/compact/slidingwindow.go:12
StructSpinner
internal/ui/spinner.go:19
TypeAliasStopReason
internal/api/types.go:64
InterfaceStore
Store is the persistence layer. Three operations cover the natural rhythm of agent memory: write (Save), search (Recall), and the always-loaded prefac
internal/memory/store.go:40
InterfaceSubagent
Subagent is one focused agent type. Run takes a task description and returns the final text — same shape as a tool but with its own context window und
internal/subagent/registry.go:20
StructSummarize
Summarize calls the provider to summarize old turns once the history exceeds Threshold, replacing them with a single synthetic user message.
internal/compact/summarize.go:14
InterfaceTool
internal/tool/registry.go:14
StructToolDef
internal/api/types.go:57
StructUsage
Usage reports the token accounting for one API call. Providers fill it in; the harness accumulates totals for the session.
internal/api/types.go:80
FuncTypeUsageFunc
UsageFunc returns the session's cumulative token usage and estimated cost in USD. Cost is -1 if unknown (e.g. unrecognized model). The TUI renders thi
internal/ui/program.go:24
StructWriteFileTool
internal/tool/writefile.go:12
StructagentDoneMsg
internal messages
internal/ui/program.go:83
Structchapter
chapter is what the templates see for a single rendered chapter.
cmd/sitegen/main.go:60
StructchapterData
chapterData is everything the chapter template needs.
cmd/sitegen/main.go:118
StructchatInputModel
── main message input ────────────────────────────────────────────────────
internal/ui/input.go:28
Structcommand
commands.go:19
Structconfig
cmd/sitegen/main.go:159
StructconfirmModel
── confirm prompt ────────────────────────────────────────────────────────
internal/ui/input.go:141
TypeAliasdebugMode
internal/ui/program.go:144
StructechoTool
The agent loop prints `[tool] …` lines and assistant text to stdout by design (chapter 01). Tests don't silence them — running `go test -v` will inter
internal/agent/agent_test.go:23
Structexercise
exercise is an extension prompt: a self-contained task that builds on the harness. Has a numeric slug prefix (01-, 02-, …) and a difficulty tag pulled
cmd/sitegen/main.go:93
StructexerciseData
exerciseData is everything the exercise template needs.
cmd/sitegen/main.go:146
StructfakeTool
fakeTool is a Tool used by tests that need a registered tool but don't care about its behavior — Execute just returns a canned string.
internal/tool/registry_test.go:13
Structgroup
group is a section in the landing-page curriculum.
cmd/sitegen/main.go:71
Structguide
guide is a how-to recipe: shorter than a chapter, no curriculum number, linked from its own section on the landing page.
cmd/sitegen/main.go:80
StructguideData
guideData is everything the guide template needs. Guides don't get prev/next nav (there are only a handful) — just a back-to-index link.
cmd/sitegen/main.go:134
Structharness
internal/ui/program.go:95
StructheaderRoundTripper
headerRoundTripper injects a fixed set of headers into every request. Used for auth tokens on HTTP MCP transports.
internal/mcp/client.go:113
StructlandingData
landingData is everything the index template needs.
cmd/sitegen/main.go:106
TypeAliasmodelState
── model ─────────────────────────────────────────────────────────────────
internal/ui/program.go:87
StructopenaiRates
internal/provider/openai.go:230
Structpricing
pricing is per-million-token rates in USD. Update from https://www.anthropic.com/pricing when rates change.
internal/provider/anthropic.go:72
StructshineTickMsg
shineTickMsg drives the startup banner shine animation. Self-perpetuates until the shine peak passes off the right edge of the banner.
internal/ui/program.go:80
InterfacetokenReporter
tokenReporter is what cmdTokens type-asserts to. We didn't widen the Provider interface because not every backend has a "tokens" concept; any provider
commands.go:56
StructtoolBrief
internal/provider/payloads.go:16
Structtracker
Active tracks subagents currently running. Used by the UI to show "what's executing right now."
internal/subagent/registry.go:58