Directories
¶
| Path | Synopsis |
|---|---|
|
Package artifact persists oversized tool output to disk instead of forcing it either into RAM/context unbounded or truncating it away — the two bad options a tool result otherwise has.
|
Package artifact persists oversized tool output to disk instead of forcing it either into RAM/context unbounded or truncating it away — the two bad options a tool result otherwise has. |
|
Package breaker implements a per-provider circuit breaker so a single failing upstream never gets hammered with retries and never blocks requests from reaching healthy providers.
|
Package breaker implements a per-provider circuit breaker so a single failing upstream never gets hammered with retries and never blocks requests from reaching healthy providers. |
|
cli
|
|
|
app
Package app is the Kram CLI's Bubble Tea program: a chat transcript over a durable daemon session, with a compact live footer tracking the gateway's real fallback behavior and two on-demand panels — routing strategy and context-window usage.
|
Package app is the Kram CLI's Bubble Tea program: a chat transcript over a durable daemon session, with a compact live footer tracking the gateway's real fallback behavior and two on-demand panels — routing strategy and context-window usage. |
|
daemonclient
Package daemonclient is the CLI's HTTP client for a running kram-daemon: creating sessions and sending messages.
|
Package daemonclient is the CLI's HTTP client for a running kram-daemon: creating sessions and sending messages. |
|
statusclient
Package statusclient is the CLI's HTTP client for a running kram-gateway's /admin/status: real per-provider telemetry and combo definitions, used to draw the footer and the expanded strategy panel.
|
Package statusclient is the CLI's HTTP client for a running kram-gateway's /admin/status: real per-provider telemetry and combo definitions, used to draw the footer and the expanded strategy panel. |
|
Package config loads kram-gateway's YAML configuration: which upstream providers exist, how they're grouped into fallback combos, and which routing strategy each combo uses.
|
Package config loads kram-gateway's YAML configuration: which upstream providers exist, how they're grouped into fallback combos, and which routing strategy each combo uses. |
|
Package credentials is a small local store for provider API keys, so Kram's accounts screen has somewhere to put a key the user pastes in instead of asking them to export an env var by hand every session (the friction that motivated this package in the first place — env vars only take effect in the exact shell they were exported in, which is an easy thing to get wrong).
|
Package credentials is a small local store for provider API keys, so Kram's accounts screen has somewhere to put a key the user pastes in instead of asking them to export an env var by hand every session (the friction that motivated this package in the first place — env vars only take effect in the exact shell they were exported in, which is an easy thing to get wrong). |
|
Package customprovider is a small local store of user-registered OpenAI-compatible endpoints — the accounts screen's "+ adicionar provedor customizado" flow, for pointing Kram at a local or LAN server (llama.cpp, LM Studio, Ollama's OpenAI endpoint, vLLM, text-generation-webui — all speak the same chat-completions wire format internal/provider/openai_compat.go already talks) that the fixed internal/providercatalog list has no way to represent.
|
Package customprovider is a small local store of user-registered OpenAI-compatible endpoints — the accounts screen's "+ adicionar provedor customizado" flow, for pointing Kram at a local or LAN server (llama.cpp, LM Studio, Ollama's OpenAI endpoint, vLLM, text-generation-webui — all speak the same chat-completions wire format internal/provider/openai_compat.go already talks) that the fixed internal/providercatalog list has no way to represent. |
|
Package daemon wires up and runs the Kram daemon's HTTP server — extracted out of cmd/daemon so the unified cmd/kram binary can start a daemon in-process (a goroutine, not a subprocess) instead of shelling out to a separate binary.
|
Package daemon wires up and runs the Kram daemon's HTTP server — extracted out of cmd/daemon so the unified cmd/kram binary can start a daemon in-process (a goroutine, not a subprocess) instead of shelling out to a separate binary. |
|
agent
Package agent is Kram's tool-calling loop: the piece that actually makes the daemon useful rather than a plain chat relay.
|
Package agent is Kram's tool-calling loop: the piece that actually makes the daemon useful rather than a plain chat relay. |
|
compaction
Package compaction keeps a long session's history within a model's context budget using the tiered strategy every production agent loop we looked at converges on (opencode, Crush): cheap structural pruning first, full LLM summarization only as a last resort.
|
Package compaction keeps a long session's history within a model's context budget using the tiered strategy every production agent loop we looked at converges on (opencode, Crush): cheap structural pruning first, full LLM summarization only as a last resort. |
|
contextpolicy
Package contextpolicy turns Kram's context limits into one explicit plan.
|
Package contextpolicy turns Kram's context limits into one explicit plan. |
|
gatewayclient
Package gatewayclient is the daemon's HTTP client for kram-gateway.
|
Package gatewayclient is the daemon's HTTP client for kram-gateway. |
|
server
Package server exposes the daemon's HTTP control surface: sessions are created, listed and messaged through here.
|
Package server exposes the daemon's HTTP control surface: sessions are created, listed and messaged through here. |
|
session
Package session owns session lifecycle (create/list/get) — the durable record a client attaches to.
|
Package session owns session lifecycle (create/list/get) — the durable record a client attaches to. |
|
store
Package store persists sessions and messages to a local SQLite database so the daemon remains the single source of truth across restarts — a client disconnecting, or the daemon itself being restarted, never loses a session's history, including its tool-call trail.
|
Package store persists sessions and messages to a local SQLite database so the daemon remains the single source of truth across restarts — a client disconnecting, or the daemon itself being restarted, never loses a session's history, including its tool-call trail. |
|
tools
Package tools: grep is a pure-Go recursive search over the workspace — no dependency on an external ripgrep/grep binary being installed, in keeping with Kram's "never crash / always works" goal.
|
Package tools: grep is a pure-Go recursive search over the workspace — no dependency on an external ripgrep/grep binary being installed, in keeping with Kram's "never crash / always works" goal. |
|
Package gateway wires up and runs kram-gateway's HTTP server — extracted out of cmd/gateway so the unified cmd/kram binary can start a gateway in-process (a goroutine, not a subprocess) instead of shelling out to a separate binary.
|
Package gateway wires up and runs kram-gateway's HTTP server — extracted out of cmd/gateway so the unified cmd/kram binary can start a gateway in-process (a goroutine, not a subprocess) instead of shelling out to a separate binary. |
|
Package kramhome resolves Kram's own local config directory — the one shared root that credentials, tool/skill settings, and global skills all live under, so there's a single place this decision is made instead of each package inventing its own path.
|
Package kramhome resolves Kram's own local config directory — the one shared root that credentials, tool/skill settings, and global skills all live under, so there's a single place this decision is made instead of each package inventing its own path. |
|
Package lsp is a from-scratch Language Server Protocol client — the way Kram gets real semantic navigation (diagnostics, go-to-definition, find-references) instead of only grep/glob's text matching.
|
Package lsp is a from-scratch Language Server Protocol client — the way Kram gets real semantic navigation (diagnostics, go-to-definition, find-references) instead of only grep/glob's text matching. |
|
Schema cache: a best-effort, on-disk record of what tools/list (plus serverInfo) returned for a given server the last time Kram actually connected to it.
|
Schema cache: a best-effort, on-disk record of what tools/list (plus serverInfo) returned for a given server the last time Kram actually connected to it. |
|
Anthropic's browser-login flow, unlike OpenAI's (openai.go), is not something extracted from a real shipping client — no local reference implementation of it was found anywhere (see DECISIONS.md).
|
Anthropic's browser-login flow, unlike OpenAI's (openai.go), is not something extracted from a real shipping client — no local reference implementation of it was found anywhere (see DECISIONS.md). |
|
Package onboarding tracks whether the first-run setup wizard has been completed — a small, versioned marker so a future wizard redesign can force existing installs through it again (bump currentVersion), while a completed install on the current version never sees it uninvited.
|
Package onboarding tracks whether the first-run setup wizard has been completed — a small, versioned marker so a future wizard redesign can force existing installs through it again (bump currentVersion), while a completed install on the current version never sees it uninvited. |
|
Package openai defines the OpenAI-compatible wire format that kram-gateway exposes to clients, regardless of which upstream provider actually serves the request.
|
Package openai defines the OpenAI-compatible wire format that kram-gateway exposes to clients, regardless of which upstream provider actually serves the request. |
|
Package permission evaluates whether a tool call is allowed to run without asking, must ask the user first, or is blocked outright — a deterministic policy layer between the model deciding to call a tool and the tool actually running.
|
Package permission evaluates whether a tool call is allowed to run without asking, must ask the user first, or is blocked outright — a deterministic policy layer between the model deciding to call a tool and the tool actually running. |
|
Package provider defines the common interface every upstream LLM backend implements, and the normalized streaming event shape the router/server work with regardless of which provider served the request.
|
Package provider defines the common interface every upstream LLM backend implements, and the normalized streaming event shape the router/server work with regardless of which provider served the request. |
|
Package providercatalog is the single list of LLM providers Kram knows how to auto-configure — shared by cmd/kram's env-var autodetection and the CLI's "accounts" screen, so the two never drift into disagreeing about what a provider is called or which env var it reads.
|
Package providercatalog is the single list of LLM providers Kram knows how to auto-configure — shared by cmd/kram's env-var autodetection and the CLI's "accounts" screen, so the two never drift into disagreeing about what a provider is called or which env var it reads. |
|
Package providerping does the minimum possible real check of whether a configured provider account is actually reachable and authorized right now — a "list models" call (the same convention nearly every one of these APIs supports), never a real completion request.
|
Package providerping does the minimum possible real check of whether a configured provider account is actually reachable and authorized right now — a "list models" call (the same convention nearly every one of these APIs supports), never a real completion request. |
|
Package router decides which provider serves a request, in what order, based on each combo's configured strategy — and, once a response comes back, whether it was actually good enough to accept.
|
Package router decides which provider serves a request, in what order, based on each combo's configured strategy — and, once a response comes back, whether it was actually good enough to accept. |
|
Package server exposes kram-gateway's OpenAI-compatible HTTP API and wires together routing, circuit breaking and telemetry for each request.
|
Package server exposes kram-gateway's OpenAI-compatible HTTP API and wires together routing, circuit breaking and telemetry for each request. |
|
Package shell centralizes two things every direct `exec.Command("sh", "-c", ...)` call in this codebase used to assume, silently, and got wrong on at least one platform: that a POSIX shell exists to run the string through, and that killing "the process" is enough to stop whatever it started.
|
Package shell centralizes two things every direct `exec.Command("sh", "-c", ...)` call in this codebase used to assume, silently, and got wrong on at least one platform: that a POSIX shell exists to run the string through, and that killing "the process" is enough to stop whatever it started. |
|
Package snapshot gives Kram a way to capture and restore the workspace's file state without ever touching the user's own git repository — no `git reset --hard`, no checkout, no change to their index, staging area, current branch, or commits.
|
Package snapshot gives Kram a way to capture and restore the workspace's file state without ever touching the user's own git repository — no `git reset --hard`, no checkout, no change to their index, staging area, current branch, or commits. |
|
Package telemetry tracks lightweight in-memory, per-provider counters so /admin/status can report what the gateway has been doing without needing an external metrics backend.
|
Package telemetry tracks lightweight in-memory, per-provider counters so /admin/status can report what the gateway has been doing without needing an external metrics backend. |
|
Package toolsettings is a small local store of which tools and skills are disabled — the on/off switch behind the CLI's tools/skills screen.
|
Package toolsettings is a small local store of which tools and skills are disabled — the on/off switch behind the CLI's tools/skills screen. |
Click to show internal directories.
Click to hide internal directories.