internal/

directory
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: Apache-2.0

Directories

Path Synopsis
Package api implements the wire-compatible control-plane REST surface: Anthropic Managed Agents resource CRUD (agents / environments / sessions) with the reference paths, JSON shapes, ID prefixes, pagination envelope, error envelope, and x-api-key management auth.
Package api implements the wire-compatible control-plane REST surface: Anthropic Managed Agents resource CRUD (agents / environments / sessions) with the reference paths, JSON shapes, ID prefixes, pagination envelope, error envelope, and x-api-key management auth.
Package brain is the orchestration loop (the plan's component 3): a stateless harness that claims model_turn work, replays the session's event log into a provider request, streams the model's turn back into Anthropic-native events, and drives the session state machine at turn end.
Package brain is the orchestration loop (the plan's component 3): a stateless harness that claims model_turn work, replays the session's event log into a provider request, streams the model's turn back into Anthropic-native events, and drives the session state machine at turn end.
Package domain holds the Anthropic-native core types that are the single source of truth for the platform.
Package domain holds the Anthropic-native core types that are the single source of truth for the platform.
Package events implements the append-only session event log — the single source of truth for session state — plus its live fan-out: per-session seq allocation, list queries, a Postgres LISTEN/NOTIFY broker for SSE subscribers, ephemeral event_start/event_delta preview frames, and the span.* events emitted from the same instrumentation point as OTel spans.
Package events implements the append-only session event log — the single source of truth for session state — plus its live fan-out: per-session seq allocation, list queries, a Postgres LISTEN/NOTIFY broker for SSE subscribers, ephemeral event_start/event_delta preview frames, and the span.* events emitted from the same instrumentation point as OTel spans.
Package executor is the hands' consumer: it pulls tool_exec work from the queue, runs the built-in toolset inside the session's sandbox, and appends the agent.tool_result events the brain resumes on.
Package executor is the hands' consumer: it pulls tool_exec work from the queue, runs the built-in toolset inside the session's sandbox, and appends the agent.tool_result events the brain resumes on.
Package pgtest is test support: it starts one Dockerized Postgres per test binary and hands out freshly-migrated databases, the same pattern the store/events/api suites carry privately.
Package pgtest is test support: it starts one Dockerized Postgres per test binary and hands out freshly-migrated databases, the same pattern the store/events/api suites carry privately.
Package provider abstracts model backends behind Anthropic Messages semantics.
Package provider abstracts model backends behind Anthropic Messages semantics.
anthropic
Package anthropic adapts any endpoint speaking the Anthropic Messages protocol to the provider interface, via the official SDK with a configurable base URL — an enterprise gateway, a proxy, or a self-hosted model are all just configuration.
Package anthropic adapts any endpoint speaking the Anthropic Messages protocol to the provider interface, via the official SDK with a configurable base URL — an enterprise gateway, a proxy, or a self-hosted model are all just configuration.
openai
Package openai adapts an OpenAI Chat Completions endpoint (OpenAI itself, a vLLM server, or an internal OpenAI-compatible gateway) to the provider interface.
Package openai adapts an OpenAI Chat Completions endpoint (OpenAI itself, a vLLM server, or an internal OpenAI-compatible gateway) to the provider interface.
Package queue is the internal work queue over Postgres (FOR UPDATE SKIP LOCKED, per the plan's component 4).
Package queue is the internal work queue over Postgres (FOR UPDATE SKIP LOCKED, per the plan's component 4).
Package sandbox is the "hands" boundary: a disposable per-session container where the built-in toolset executes.
Package sandbox is the "hands" boundary: a disposable per-session container where the built-in toolset executes.
backend
Package backend selects a sandbox provider by name, so the executor and the BYOC worker construct Docker or Kubernetes "hands" from the same config point instead of hard-coding one.
Package backend selects a sandbox provider by name, so the executor and the BYOC worker construct Docker or Kubernetes "hands" from the same config point instead of hard-coding one.
docker
Package docker is the v1 sandbox backend: one disposable container per session, driven over the Docker Engine API.
Package docker is the v1 sandbox backend: one disposable container per session, driven over the Docker Engine API.
k8s
Package k8s is the Kubernetes sandbox backend: one disposable Pod per session, driven over the Kubernetes API.
Package k8s is the Kubernetes sandbox backend: one disposable Pod per session, driven over the Kubernetes API.
sandboxtest
Package sandboxtest is the contract suite every sandbox.Provider must pass (CLAUDE.md: backend variability lives behind an interface with one shared suite).
Package sandboxtest is the contract suite every sandbox.Provider must pass (CLAUDE.md: backend variability lives behind an interface with one shared suite).
shell
Package shell runs the built-in bash tool as a persistent per-session shell, on top of the sandbox's stateless Exec + file primitives — no new backend surface.
Package shell runs the built-in bash tool as a persistent per-session shell, on top of the sandbox's stateless Exec + file primitives — no new backend surface.
Package store owns the Postgres schema.
Package store owns the Postgres schema.
Package telemetry initializes OpenTelemetry tracing and metrics for one process and provides W3C trace-context propagation helpers.
Package telemetry initializes OpenTelemetry tracing and metrics for one process and provides W3C trace-context propagation helpers.
Package toolset is the built-in agent_toolset_20260401: the six tools the platform executes for the model — bash, read, write, edit, glob, grep — run inside the session's sandbox.
Package toolset is the built-in agent_toolset_20260401: the six tools the platform executes for the model — bash, read, write, edit, glob, grep — run inside the session's sandbox.
Package worker is the BYOC (bring-your-own-compute) consumer of the work queue: the customer-hosted twin of internal/executor.
Package worker is the BYOC (bring-your-own-compute) consumer of the work queue: the customer-hosted twin of internal/executor.

Jump to

Keyboard shortcuts

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