internal/

directory
v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 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: it runs an in-flight turn on a serve-rooted Registry, off any single connection, so a dropped connection detaches a viewer without cancelling the turn.
Package nativeturn is the serve-level survival layer for native ACP chain turns: it runs an in-flight turn on a serve-rooted Registry, off any single connection, 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 you version in git.
Package taskengine orchestrates an agent: it drives LLM turns, tool calls, and routing in a loop, defined as a JSON chain you version in git.
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, not merely denied by policy.
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, not merely denied by policy.
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 (api.anthropic.com), which speaks the Messages API.
Package anthropic is a direct (non-Vertex) provider for the Anthropic API (api.anthropic.com), 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 (request/response and SSE streaming).
Package chatcompletions is a transport-agnostic codec for the OpenAI Chat Completions wire format (request/response and SSE streaming).
modelrepo/codec/messages
Package messages is a transport-agnostic codec for Anthropic's Messages API wire format (request, content-block response, and named-SSE-event streaming).
Package messages is a transport-agnostic codec for Anthropic's Messages API wire format (request, content-block response, and named-SSE-event streaming).
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.
Package ollamatokenizer provides Tokenizer implementations used by llmrepo to count and split tokens for a given model.
runtimestate
Package runtimestate reconciles the declared state of LLM backends against their observed state, read-only, intended to run repeatedly from an external background task.
Package runtimestate reconciles the declared state of LLM backends against their observed state, read-only, intended to run repeatedly from an external 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 it authenticates with, the relay's public key it authenticates the relay with, and the endpoint both apply to.
Package relaycreds reads and writes the relay enrolment a machine obtained with `contenox login`: the instance token it authenticates with, the relay's public key it authenticates the relay with, 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.
agenthost
Package agenthost is the runtime's client/host-role primitive for driving another ACP agent over stdio, the way an editor spawns an agent binary and drives it as a client.
Package agenthost is the runtime's client/host-role primitive for driving another ACP agent over stdio, the way an editor spawns an agent binary and drives it as a client.
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, so a reviewed chain can be fired as a fleet unit without a second registration step.
Package chainagents seeds the declared-agent registry from the runtime's own task chains, so a reviewed chain can be fired as a fleet unit without a second registration step.
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.
eventlog
Package eventlog is the service tier over the durable, append-only domain event log behind the beta event-dispatch tier.
Package eventlog is the service tier over the durable, append-only domain event log behind the beta event-dispatch tier.
eventtrigger
Package eventtrigger routes durable events (internal/services/eventlog) to the task chains operators configured to react to them.
Package eventtrigger routes durable events (internal/services/eventlog) to the task chains operators configured to react to them.
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.
gitreview
Package gitreview projects a repository's changes as structured data for a human review surface, diffing between any two of WORKTREE, INDEX, HEAD, or a named revision.
Package gitreview projects a repository's changes as structured data for a human review surface, diffing between any two of WORKTREE, INDEX, HEAD, or a named revision.
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.
Package mcpoauth implements the MCP OAuth 2.1 Authorization Code + PKCE flow for CLI clients.
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 did the unit change, and did its attention wander outside its workspace.
Package missionchanges answers two oversight questions from a mission's already-journaled work: what did the unit change, and did its attention wander 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 beam's first-run zero-config path: the mutating sibling to setupcheck.EnrichResultWithOllamaProbe that registers a probed local Ollama backend and sets it as default.
Package onboarding is beam's first-run zero-config path: the mutating sibling to setupcheck.EnrichResultWithOllamaProbe that 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 — a sibling store to hitlservice's approval inbox (informational, not answerable), not an overloaded row in it.
Package operatorinbox is the durable attention surface for mission reports that reached no live supervising session — a sibling store to hitlservice's approval inbox (informational, not answerable), not an overloaded row in it.
oracletools
Package oracletools is the oracle attention driver's tool grant: exactly one model-facing tool, submit_verdict, bound to exactly one durable ask for exactly one chain execution.
Package oracletools is the oracle attention driver's tool grant: exactly one model-facing tool, submit_verdict, bound to exactly one durable ask for exactly one chain execution.
presence
Package presence lets an editor-spawned contenox process (`contenox acp`, `serve` itself) self-register into the shared store so the fleet board can show it.
Package presence lets an editor-spawned contenox process (`contenox acp`, `serve` itself) self-register into the shared store so the fleet board can show it.
project
Package project owns a project's portable identity marker — <projectRoot>/.contenox/workspace.id — read and written the same way by serve, the CLI, and the /workspace/roots API.
Package project owns a project's portable identity marker — <projectRoot>/.contenox/workspace.id — read and written the same way by serve, the CLI, and the /workspace/roots API.
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.
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).
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 (local_shell, shell_session, the interactive terminal), 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 (local_shell, shell_session, the interactive terminal), layered on top of the environment scrub so they always win.
shellsession
Package shellsession manages one persistent PTY-backed shell per chat session, rooted at the session's workspace root and outliving individual commands.
Package shellsession manages one persistent PTY-backed shell per chat session, rooted at the session's workspace root and outliving individual commands.
terminalservice
Package terminalservice manages local PTY-backed shell sessions.
Package terminalservice manages local PTY-backed shell sessions.
toolguidance
Package toolguidance appends short orientation lines to a tool's textual result: a repeat-call marker, a re-read hint, and a periodic scope summary, derived from per-session counters the harness maintains.
Package toolguidance appends short orientation lines to a tool's textual result: a repeat-call marker, a re-read hint, and a periodic scope summary, derived from per-session counters the harness maintains.
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 (source of truth, read via clikv) plus a fire-and-forget bus doorbell (RootsChangedSubject) 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 (source of truth, read via clikv) plus a fire-and-forget bus doorbell (RootsChangedSubject) 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
beamtui/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.
beamtui/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.
beamtui/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.
beamtui/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.
beamtui/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.
beamtui/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.
beamtui/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.
beamtui/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.
beamtui/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.
beamtui/enginebridge
Package enginebridge is the seam between a beam surface and the contenox runtime: an in-process ACP loopback (acpsvc.Transport wired to a libacp.ClientSideConnection) turned into a typed Event vocabulary a renderer can consume without knowing ACP exists.
Package enginebridge is the seam between a beam surface and the contenox runtime: an in-process ACP loopback (acpsvc.Transport wired to a libacp.ClientSideConnection) turned into a typed Event vocabulary a renderer can consume without knowing ACP exists.
beamtui/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.
beamtui/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.
beamtui/keymap
Package keymap is beam's sole key arbiter.
Package keymap is beam's sole key arbiter.
beamtui/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.
beamtui/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.
beamtui/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.
beamtui/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.
beamtui/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.
contenoxcli
acp_toolset.go composes the local tool providers an ACP session (contenox acp/acpx — Zed, JetBrains, OpenClaw) gets.
acp_toolset.go composes the local tool providers an ACP session (contenox acp/acpx — Zed, JetBrains, OpenClaw) gets.
fleetboot
Package fleetboot builds the in-process mission fleet a surface embeds so `/mission` is dispatched as a subagent of the host process, with reports delivered back to the session that fired them.
Package fleetboot builds the in-process mission fleet a surface embeds so `/mission` is dispatched as a subagent of the host process, with reports delivered back to the session that fired them.

Jump to

Keyboard shortcuts

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