internal/

directory
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2026 License: Apache-2.0

Directories

Path Synopsis
kernel
agentinstance
Package agentinstance spawns and owns running ACP agent instances on a server-rooted context, independent of any client connection, and lets multiple viewers attach to a session's event stream.
Package agentinstance spawns and owns running ACP agent instances on a server-rooted context, independent of any client connection, and lets multiple viewers attach to a session's event stream.
nativeturn
Package nativeturn is the serve-level survival layer for native ACP chain turns: an in-flight turn runs on a serve-rooted Registry, so a dropped connection detaches a viewer without cancelling the turn.
Package nativeturn is the serve-level survival layer for native ACP chain turns: an in-flight turn runs on a serve-rooted Registry, so a dropped connection detaches a viewer without cancelling the turn.
taskengine
Package taskengine orchestrates an agent: it drives LLM turns, tool calls and routing in a loop, defined as a JSON chain.
Package taskengine orchestrates an agent: it drives LLM turns, tool calls and routing in a loop, defined as a JSON chain.
taskengine/llmretry
Package llmretry wraps a single LLM call with classified retry, exponential backoff, and an optional model fallback.
Package llmretry wraps a single LLM call with classified retry, exponential backoff, and an optional model fallback.
Package libsandbox confines a spawned foreign agent to "the wall": every path out of its tools and workspace — filesystem, network, environment — is absent by construction.
Package libsandbox confines a spawned foreign agent to "the wall": every path out of its tools and workspace — filesystem, network, environment — is absent by construction.
models
llmrepo
Package llmrepo provides a unified facade over LLM backends discovered via runtimestate: prompt, chat, streaming, embedding, and tokenization through a single ModelRepo interface.
Package llmrepo provides a unified facade over LLM backends discovered via runtimestate: prompt, chat, streaming, embedding, and tokenization through a single ModelRepo interface.
modelrepo
Package modelrepo defines the provider-facing contracts for LLM backends: the Provider interface, per-capability client interfaces, and shared request/response types.
Package modelrepo defines the provider-facing contracts for LLM backends: the Provider interface, per-capability client interfaces, and shared request/response types.
modelrepo/anthropic
Package anthropic is a direct (non-Vertex) provider for the Anthropic API, which speaks the Messages API.
Package anthropic is a direct (non-Vertex) provider for the Anthropic API, which speaks the Messages API.
modelrepo/bedrock
Package bedrock is a provider for AWS Bedrock via the unified Converse API.
Package bedrock is a provider for AWS Bedrock via the unified Converse API.
modelrepo/codec/chatcompletions
Package chatcompletions is a transport-agnostic codec for the OpenAI Chat Completions wire format.
Package chatcompletions is a transport-agnostic codec for the OpenAI Chat Completions wire format.
modelrepo/codec/messages
Package messages is a transport-agnostic codec for Anthropic's Messages API wire format.
Package messages is a transport-agnostic codec for Anthropic's Messages API wire format.
modelrepo/gemini
Package gemini implements the modelrepo.Provider contract against Google's Gemini Generative Language API.
Package gemini implements the modelrepo.Provider contract against Google's Gemini Generative Language API.
modelrepo/ollama
Package ollama implements the modelrepo.Provider contract against Ollama HTTP endpoints.
Package ollama implements the modelrepo.Provider contract against Ollama HTTP endpoints.
modelrepo/openai
Package openai implements the modelrepo.Provider contract against the OpenAI HTTP API and OpenAI-compatible endpoints.
Package openai implements the modelrepo.Provider contract against the OpenAI HTTP API and OpenAI-compatible endpoints.
modelrepo/vertex
Package vertex implements the modelrepo.Provider contract against Google Vertex AI publisher endpoints, using OAuth bearer tokens minted from service-account credentials.
Package vertex implements the modelrepo.Provider contract against Google Vertex AI publisher endpoints, using OAuth bearer tokens minted from service-account credentials.
modelrepo/vllm
Package vllm implements the modelrepo.Provider contract against vLLM OpenAI-compatible HTTP endpoints.
Package vllm implements the modelrepo.Provider contract against vLLM OpenAI-compatible HTTP endpoints.
ollamatokenizer
Package ollamatokenizer provides Tokenizer implementations used by llmrepo to count and split tokens for a given model: an HTTP client, a heuristic estimator, and a mock.
Package ollamatokenizer provides Tokenizer implementations used by llmrepo to count and split tokens for a given model: an HTTP client, a heuristic estimator, and a mock.
runtimestate
Package runtimestate reconciles the declared state of LLM backends against their observed state, read-only, intended to run repeatedly from a background task.
Package runtimestate reconciles the declared state of LLM backends against their observed state, read-only, intended to run repeatedly from a background task.
Package relayacp carries ACP over a relay connection, so a remote client is just another ACP client of this runtime, routed by librelay.Frame.Session to its own libacp.AgentSideConnection.
Package relayacp carries ACP over a relay connection, so a remote client is just another ACP client of this runtime, routed by librelay.Frame.Session to its own libacp.AgentSideConnection.
Package relaycreds reads and writes the relay enrolment a machine obtained with `contenox login`: the instance token, the relay's public key, and the endpoint both apply to.
Package relaycreds reads and writes the relay enrolment a machine obtained with `contenox login`: the instance token, the relay's public key, and the endpoint both apply to.
Package relaylink is the runtime half of the relay connection: it dials a relay, completes the librelay handshake, holds the connection, proves the peer is alive with heartbeats, and redials with backoff when it is not.
Package relaylink is the runtime half of the relay connection: it dials a relay, completes the librelay handshake, holds the connection, proves the peer is alive with heartbeats, and redials with backoff when it is not.
Package relaypair redeems a pairing key for this machine's relay credentials via one POST; what comes back is what relaycreds stores.
Package relaypair redeems a pairing key for this machine's relay credentials via one POST; what comes back is what relaycreds stores.
Package relaytest is an in-memory stand-in for a relay, for testing a connector without a network.
Package relaytest is an in-memory stand-in for a relay, for testing a connector without a network.
services
accessview
Package accessview computes HITL policy verdicts (reachability plus read/write decisions) for a batch of workspace-relative paths, always returning the full reason rather than only the interesting cases.
Package accessview computes HITL policy verdicts (reachability plus read/write decisions) for a batch of workspace-relative paths, always returning the full reason rather than only the interesting cases.
agentdecl
Package agentdecl reads agent declarations — Markdown with a YAML frontmatter header — and renders each as the task chain and human-in-the-loop policy that run it.
Package agentdecl reads agent declarations — Markdown with a YAML frontmatter header — and renders each as the task chain and human-in-the-loop policy that run it.
agenthost
Package agenthost is the runtime's client/host-role primitive for driving another ACP agent over stdio.
Package agenthost is the runtime's client/host-role primitive for driving another ACP agent over stdio.
agentregistryservice
Package agentregistryservice stores declared agent configurations ("external_acp" or "chain") as the single source of truth for what can be spawned.
Package agentregistryservice stores declared agent configurations ("external_acp" or "chain") as the single source of truth for what can be spawned.
agentservice
Package agentservice runs prompts against a task chain and persists their session history.
Package agentservice runs prompts against a task chain and persists their session history.
agentview
Package agentview computes, for a workspace path, the access the agent would actually have, by running the agent's own gates rather than a parallel reimplementation.
Package agentview computes, for a workspace path, the access the agent would actually have, by running the agent's own gates rather than a parallel reimplementation.
chainagents
Package chainagents seeds the declared-agent registry from the runtime's own task chains.
Package chainagents seeds the declared-agent registry from the runtime's own task chains.
chatservice
Package chatservice persists the conversation thread.
Package chatservice persists the conversation thread.
clikv
Package clikv reads and writes the CLI's persisted settings (the cli.* KV namespace) and owns the scope of every one of them.
Package clikv reads and writes the CLI's persisted settings (the cli.* KV namespace) and owns the scope of every one of them.
echotool
Package echotool is the wiring fixture: one tool, `echo`, that returns its input and nothing else.
Package echotool is the wiring fixture: one tool, `echo`, that returns its input and nothing else.
eventlog
Package eventlog is the service tier over the durable, append-only domain event log, which itself lives in internal/store/runtimetypes.
Package eventlog is the service tier over the durable, append-only domain event log, which itself lives in internal/store/runtimetypes.
eventtrigger
Package eventtrigger routes durable events to the task chains operators configured to react to them, declared in trigger-*.json files.
Package eventtrigger routes durable events to the task chains operators configured to react to them, declared in trigger-*.json files.
fleetservice
build.go composes an in-process fleet: agent registry, agentinstance kernel, operator inbox, report router, and the fleet Service, so a host process can dispatch missions as subagents of itself.
build.go composes an in-process fleet: agent registry, agentinstance kernel, operator inbox, report router, and the fleet Service, so a host process can dispatch missions as subagents of itself.
gointel
Package gointel is the agent's in-process Go code intelligence: a warm, type-checked view of the Go module under the workspace root, exposed as read-only tools (go_describe, go_definition, go_references, go_implementations, go_symbols, go_diagnostics).
Package gointel is the agent's in-process Go code intelligence: a warm, type-checked view of the Go module under the workspace root, exposed as read-only tools (go_describe, go_definition, go_references, go_implementations, go_symbols, go_diagnostics).
gojatool
Package gojatool is the agent's embedded ECMAScript sandbox: script tools (operator *.js files) and goja_eval (model-driven bounded compute) on one goja runtime.
Package gojatool is the agent's embedded ECMAScript sandbox: script tools (operator *.js files) and goja_eval (model-driven bounded compute) on one goja runtime.
hitlservice
Package hitlservice evaluates approval policies for tool calls, returning allow/deny/approve decisions.
Package hitlservice evaluates approval policies for tool calls, returning allow/deny/approve decisions.
jqtool
Package jqtool is the agent's jq engine: one tool, `jq_query`, that runs a jq program (github.com/itchyny/gojq, pure Go) over a JSON or YAML document and returns the emitted values.
Package jqtool is the agent's jq engine: one tool, `jq_query`, that runs a jq program (github.com/itchyny/gojq, pure Go) over a JSON or YAML document and returns the emitted values.
localtools
Package localtools provides tools that fire around chain execution: approval gates and host-side helpers.
Package localtools provides tools that fire around chain execution: approval gates and host-side helpers.
localtools/mcpoauth
Package mcpoauth implements the MCP OAuth 2.1 Authorization Code + PKCE flow for CLI clients: server metadata discovery (RFC 8414), dynamic client registration (RFC 7591), and the local callback server.
Package mcpoauth implements the MCP OAuth 2.1 Authorization Code + PKCE flow for CLI clients: server metadata discovery (RFC 8414), dynamic client registration (RFC 7591), and the local callback server.
mcpserverservice
Package mcpserverservice stores MCP server configs.
Package mcpserverservice stores MCP server configs.
mcpworker
Package mcpworker keeps MCP server connections alive across chain steps.
Package mcpworker keeps MCP server connections alive across chain steps.
missionchanges
Package missionchanges answers two oversight questions from a mission's already-journaled work: what the unit changed, and whether its attention wandered outside its workspace.
Package missionchanges answers two oversight questions from a mission's already-journaled work: what the unit changed, and whether its attention wandered outside its workspace.
missionservice
Package missionservice stores mission records: the durable, agent-reportable half of the fleet manager.
Package missionservice stores mission records: the durable, agent-reportable half of the fleet manager.
missiontools
Package missiontools is the per-mission tool grant a dispatched unit holds while running unattended: report progress, ask for attention, maintain a living plan, end with a verdict, and heartbeat.
Package missiontools is the per-mission tool grant a dispatched unit holds while running unattended: report progress, ask for attention, maintain a living plan, end with a verdict, and heartbeat.
onboarding
Package onboarding is the first-run zero-config path: it registers a probed local Ollama backend and sets it as default.
Package onboarding is the first-run zero-config path: it registers a probed local Ollama backend and sets it as default.
operatorinbox
Package operatorinbox is the durable attention surface for mission reports that reached no live supervising session.
Package operatorinbox is the durable attention surface for mission reports that reached no live supervising session.
oracletools
Package oracletools is the oracle's tool grant: one model-facing tool, submit_verdict, bound to one durable ask for one chain execution.
Package oracletools is the oracle's tool grant: one model-facing tool, submit_verdict, bound to one durable ask for one chain execution.
presence
Package presence lets an editor-spawned contenox process self-register into the shared store so the fleet board can show it.
Package presence lets an editor-spawned contenox process self-register into the shared store so the fleet board can show it.
project
Package project owns a project's portable identity marker at <projectRoot>/.contenox/workspace.id: a stable UUID plus an optional friendly Name, travelling with the directory rather than the host-local grant list.
Package project owns a project's portable identity marker at <projectRoot>/.contenox/workspace.id: a stable UUID plus an optional friendly Name, travelling with the directory rather than the host-local grant list.
reportrouter
Package reportrouter delivers missionservice's report, ask, status and plan-revision events to the session that fired the mission, falling back to the operator inbox when none is live.
Package reportrouter delivers missionservice's report, ask, status and plan-revision events to the session that fired the mission, falling back to the operator inbox when none is live.
searchtool
Package searchtool exposes the workspace retrieval index to an agent as one local toolset, provider "workspace", one tool: workspace_search.
Package searchtool exposes the workspace retrieval index to an agent as one local toolset, provider "workspace", one tool: workspace_search.
sessionservice
Package sessionservice stores CLI chat sessions so conversations persist across terminal restarts.
Package sessionservice stores CLI chat sessions so conversations persist across terminal restarts.
setupcheck
Package setupcheck evaluates local runtime readiness (defaults, backends) for the CLI.
Package setupcheck evaluates local runtime readiness (defaults, backends) for the CLI.
shellenvservice
Package shellenvservice persists the operator-defined environment variables contenox injects into shells it spawns, layered on top of the environment scrub so they always win.
Package shellenvservice persists the operator-defined environment variables contenox injects into shells it spawns, layered on top of the environment scrub so they always win.
toolguidance
Package toolguidance appends short orientation lines to a tool's textual result, derived from per-session counters.
Package toolguidance appends short orientation lines to a tool's textual result, derived from per-session counters.
vfs
Package vfs is the single home for workspace-root containment: resolving a candidate path against a root and rejecting anything that escapes it, symlinks included.
Package vfs is the single home for workspace-root containment: resolving a candidate path against a root and rejecting anything that escapes it, symlinks included.
workspacegrants
Package workspacegrants owns the durable, hot-reloadable workspace-root allowlist beyond serve's launch-time roots: a durable config value plus a fire-and-forget bus doorbell that tells a running serve to reload.
Package workspacegrants owns the durable, hot-reloadable workspace-root allowlist beyond serve's launch-time roots: a durable config value plus a fire-and-forget bus doorbell that tells a running serve to reload.
workspaceindex
Package workspaceindex builds and queries a local retrieval index over a workspace: `contenox index` fills it, `contenox search` reads it, and a local tool exposes the same read to the agent.
Package workspaceindex builds and queries a local retrieval index over a workspace: `contenox index` fills it, `contenox search` reads it, and a local tool exposes the same read to the agent.
store
surfaces
beam/app
Package app is beam's composition loop: the app-shell that owns the single select over terminal input, the engine-bridge event stream, and one deterministic ticker, folding each event into component state and committing exactly one frame per iteration.
Package app is beam's composition loop: the app-shell that owns the single select over terminal input, the engine-bridge event stream, and one deterministic ticker, folding each event into component state and committing exactly one frame per iteration.
beam/comp/approval
Package approval renders beam's in-session HITL card: tool, arguments, policy rule, and diff, in that order — diff last, closest to the y/n line — across pending/resolved/cancelled.
Package approval renders beam's in-session HITL card: tool, arguments, policy rule, and diff, in that order — diff last, closest to the y/n line — across pending/resolved/cancelled.
beam/comp/brand
Package brand renders beam's identity device: the fresh-session welcome header and the persistent status-bar identity segment, both built around the vertical brand-mint beam-bar `▌` and, once per session, the logo-mark as block art.
Package brand renders beam's identity device: the fresh-session welcome header and the persistent status-bar identity segment, both built around the vertical brand-mint beam-bar `▌` and, once per session, the logo-mark as block art.
beam/comp/composer
Package composer owns beam's input buffer: a pure state machine over text, agnostic to terminals and key encodings, behind the bottom-fixed composer region.
Package composer owns beam's input buffer: a pure state machine over text, agnostic to terminals and key encodings, behind the bottom-fixed composer region.
beam/comp/fileaddr
Package fileaddr sources the candidates behind beam's @-mention picker: the files of the session's grant-bounded workspace root (via vfs, the only dependency on it under beamtui), filtered like the agent's own find_files, ranked and capped by comp/picker.
Package fileaddr sources the candidates behind beam's @-mention picker: the files of the session's grant-bounded workspace root (via vfs, the only dependency on it under beamtui), filtered like the agent's own find_files, ranked and capped by comp/picker.
beam/comp/palette
Package palette owns slash-command discovery for beam's composer: the merged remote+local command set, the case-insensitive `/` prefix filter, and the overlay rows drawn in the live region.
Package palette owns slash-command discovery for beam's composer: the merged remote+local command set, the case-insensitive `/` prefix filter, and the overlay rows drawn in the live region.
beam/comp/picker
Package picker is beam's generic keyboard list overlay: the filtered, ranked, windowed list every "choose one of these" surface renders through.
Package picker is beam's generic keyboard list overlay: the filtered, ranked, windowed list every "choose one of these" surface renders through.
beam/comp/statusbar
Package statusbar renders beam's persistent one-line status bar: identity, session, activity, context budget, operator inbox, missions and connection health.
Package statusbar renders beam's persistent one-line status bar: identity, session, activity, context budget, operator inbox, missions and connection health.
beam/comp/transcript
Package transcript renders one beam session's ordered record — user turns, streamed assistant prose, thought traces, tool-call cards, mission reports and lifecycle cards, shell output and turn notices — as frame data.
Package transcript renders one beam session's ordered record — user turns, streamed assistant prose, thought traces, tool-call cards, mission reports and lifecycle cards, shell output and turn notices — as frame data.
beam/frame
Package frame is beam's rendering schema: the pure-data contract between components (pure functions of (state, width) -> []Line) and the terminal engine that draws it.
Package frame is beam's rendering schema: the pure-data contract between components (pure functions of (state, width) -> []Line) and the terminal engine that draws it.
beam/input
Package input defines beam's decoded terminal input events and the pure parser that produces them from raw bytes.
Package input defines beam's decoded terminal input events and the pure parser that produces them from raw bytes.
beam/keymap
Package keymap is beam's sole key arbiter.
Package keymap is beam's sole key arbiter.
beam/sanitize
Package sanitize is beam's one gate between untrusted text and a [frame.Span], which draws its text as literal cells with no interpretation beyond the style table.
Package sanitize is beam's one gate between untrusted text and a [frame.Span], which draws its text as literal cells with no interpretation beyond the style table.
beam/sessionvitals
Package sessionvitals holds the surface-neutral facts about one live agent session — what is happening right now (Tracker), how full the context window is (ContextUsage), what deserves the operator's attention (Alerter), and what a session is called (Label, Roster).
Package sessionvitals holds the surface-neutral facts about one live agent session — what is happening right now (Tracker), how full the context window is (ContextUsage), what deserves the operator's attention (Alerter), and what a session is called (Label, Roster).
beam/style
Package style is beam's only StyleID→terminal-attributes table: the tier ladder (truecolor → 256 → 16 → mono), the capability snapshot that selects a tier, the brand ladder, and the glyph set that carries meaning when color is unavailable.
Package style is beam's only StyleID→terminal-attributes table: the tier ladder (truecolor → 256 → 16 → mono), the capability snapshot that selects a tier, the brand ladder, and the glyph set that carries meaning when color is unavailable.
beam/term
Package term owns the terminal: the only beam package allowed to read terminal state or write to the tty.
Package term owns the terminal: the only beam package allowed to read terminal state or write to the tty.
beam/testkit
Package testkit is beam's shared test infrastructure: the reference encoding that turns frame data into reviewable golden files, the golden compare/update helper, the fixture corpus, FakeEngineBridge, and the liveness frame-diff harness.
Package testkit is beam's shared test infrastructure: the reference encoding that turns frame data into reviewable golden files, the golden compare/update helper, the fixture corpus, FakeEngineBridge, and the liveness frame-diff harness.
beam/textwidth
Package textwidth centralizes rune-safe terminal cell-width math for beam: every width measurement, truncation, pad, and wrap goes through here instead of ad hoc len() arithmetic.
Package textwidth centralizes rune-safe terminal cell-width math for beam: every width measurement, truncation, pad, and wrap goes through here instead of ad hoc len() arithmetic.
beam/vfs
Package vfs is the single home for workspace-root containment: resolving a candidate path against a root and rejecting anything that escapes it, symlinks included.
Package vfs is the single home for workspace-root containment: resolving a candidate path against a root and rejecting anything that escapes it, symlinks included.
contenoxcli/brand
Package brand renders contenox's identity device for plain-writer surfaces: the logo-mark as block art beside the wordmark.
Package brand renders contenox's identity device for plain-writer surfaces: the logo-mark as block art beside the wordmark.
contenoxcli/sanitize
Package sanitize is beam's gate between untrusted text and a rendered span.
Package sanitize is beam's gate between untrusted text and a rendered span.
contenoxcli/textwidth
Package textwidth centralizes rune-safe terminal cell-width math for beam.
Package textwidth centralizes rune-safe terminal cell-width math for beam.
fleetboot
Package fleetboot builds the in-process mission fleet a surface embeds so /mission is dispatched as a subagent of the host process.
Package fleetboot builds the in-process mission fleet a surface embeds so /mission is dispatched as a subagent of the host process.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL