claudeacp

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 38 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

acp-go-claude

acp-go-claude exposes Claude Code through the Agent Client Protocol. Each ACP session runs one Claude process using stream-json and the native control protocol. Claude inherits the adapter's environment and uses its own settings, authentication, and permission policies.

A conversation started over ACP can continue through the native CLI with the same home and working directory:

claude --resume NATIVE_SESSION_ID

New, load, and resume responses and session-list entries expose the current native ID as _meta.claude.nativeSessionId. Use it for native CLI continuation. ACP requests continue to use the stable ACP sessionId. The store's configuration record saves both IDs with the matching native history.

Install and run

go install github.com/savid/acp-go-claude/cmd/acp-go-claude@latest
acp-go-claude [-path claude] [-home DIR] [-model MODEL] [-seed-file rel=host]... [-debug]

-path selects the executable; -home sets CLAUDE_CONFIG_DIR; -model selects the default native model identifier. -seed-file writes a file relative to the native home before launch. -scratch-dir selects the parent for temporary quota probes; empty uses system temp. -version prints the adapter version. Diagnostics go to stderr. OpenTelemetry uses the standard OTEL_* variables.

Embed

err := claudeacp.Serve(ctx, os.Stdin, os.Stdout,
    claudeacp.WithHome("/srv/claude"),
    claudeacp.WithSessionStore(store),
)

WithEnv overlays the inherited environment. Session env applies after it; WithHome applies last. Only ACP_GO_CLAUDE_INTERNAL_* markers are dropped. Session extraPathDirs prepend to the resulting PATH; empty PATH components are omitted. Executable lookup uses the base environment before session overrides. The adapter sets no native tuning variables; memory and traffic settings such as CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC and CLAUDE_CODE_TOOL_MEMORY_LIMIT are the host's to pass through these environments.

Process option Meaning
WithExecutablePath Select the native executable.
WithHome Set CLAUDE_CONFIG_DIR.
WithEnv Overlay the inherited environment.
WithScratchDir Parent for temporary quota probes; empty uses system temp.
WithSeedFiles Seed native configuration files without overwriting unmanaged files.
WithDefaultModel, WithConfiguredModels Set the default model and append host-configured model IDs to the native catalog.
WithSessionStore Select the durability store.
WithConcurrencyLimits Configurable concurrency.
WithImageLimits, WithInputHandoffRoot Set image byte limits and the root for image handoffs.
WithLogger Supply the structured logger.
WithTracerProvider, WithMeterProvider, WithTextMapPropagator Configure OpenTelemetry providers and context propagation.
WithAgentName, WithAgentTitle, WithAgentVersion Set the identity advertised at initialize.
WithClaudeSettingSources Select native settings sources.
WithClaudeSettingsFile Add a native settings file.
Session options

_meta.claude.options on new, load, and resume requests, or WithSessionClaudeOptions(NewClaudeOptions(...)) from Go:

Field Meaning
model Native model identifier or alias
env Session environment overlay
extraPathDirs Ordered absolute directories prepended to PATH
permissionMode Native permission policy
systemPrompt Native system prompt
bare Native bare mode
effort Native effort setting
outputSchema Nonempty JSON schema for native structured output

agentCapabilities._meta.claude.structuredOutput advertises the schema surface. session/set_config_option exposes model, mode, effort, and output_style when available. Model and command catalogs come from native initialization. Structured output appears on the turn's final usage update at _meta.claude.structuredOutput. Delegated updates carry _meta.claude.parentToolUseId.

Each top-level model call reports usage_update with the context its request occupies at message_start and the context it leaves at message_delta. The message_delta update carries the call's token breakdown from claude's input_tokens, cache_read_input_tokens, cache_creation_input_tokens, and output_tokens, leaving out any figure claude did not report, and the response id as responseId. A usage report whose figures are all zero or absent, as a gateway replaying a cached response sends, reports nothing.

Assistant text, thought, and image chunks, live or replayed, carry the model response's id as messageId: the message.id claude records from the gateway's response, so every chunk of one response shares it with that call's responseId. A response without an id, and a record claude writes itself (model <synthetic>, such as an API error notice), carry neither.

Native permission requests are relayed to ACP; a failed or cancelled answer denies the operation. Native form and URL elicitations require the matching client capability. mcpServers on ACP requests must be empty.

The lifecycle extension reports session and prompt state. Opting into _meta.claude.rawEvent.enabled also forwards native events on _claude/rawEvent, with inline image payloads redacted.

Account usage

_claude/accountUsage with {"sessionId": "<id>", "providerId": "anthropic"} reads the subscription allowance through that session's process, launching one if needed: the subscription type as plan, the session window as session, the weekly window as weekly_all, the fixed weekly windows as seven_day_oauth_apps, seven_day_opus, and seven_day_sonnet, and each model-scoped weekly window as weekly_scoped/<model display name> with that name as its label, each with its used percent and reset time. When supplied, explicitly denominated native monetary spending uses its reported currency and decimal exponent. Initialize advertises the read under _meta.claude.accountUsage as {"method": "_claude/accountUsage", "scope": "session", "providers": ["anthropic", "openai-codex", "opencode-go", "openrouter"]}. The read holds the session's foreground, so one that arrives during a prompt is refused with backpressure. Each limit carries observedAt; reading cached data does not renew it. A native config directory must have its own login to report saved-account usage. providerId is required and selects anthropic, openai-codex, opencode-go, or openrouter. The latter three are read only through the gateway ANTHROPIC_BASE_URL names, when it publishes a usage report; that gateway also answers anthropic when the native report and a setup-token probe supply nothing. An account that reports allowances but whose report claude could not fetch is the account_usage internal failure, so the host retries rather than records an account without allowance.

For an effective CLAUDE_CODE_OAUTH_TOKEN setup token without native usage, requesting account usage can spend inference tokens. The adapter forwards at most one native Haiku request and one native Fable request, with one output token each and no tools or project context. Input tokens still count. The requests use a temporary conversation and never change the user session. Only the first-party HTTPS route and credentials matching native effective settings are eligible; bare mode, credential helpers, and alternate routes are ineligible.

Observations are shared across sessions with the same effective credentials. Haiku refreshes no more than every five minutes and Fable every thirty minutes, only when a consumer requests usage. Fable must be probed to read its scoped allowance. An unavailable model is checked again after six hours. Failed probes back off for five minutes, fifteen minutes, then one hour; provider retry deadlines also apply. A 429 carrying quota headers is a usable reading.

Native turn quota events update their reported windows. A scoped quota error invalidates only that window. Repeated errors do not bypass cooldowns; a reported reset ends exhaustion suppression. Retained readings keep their original timestamps during failures. An account with no reported windows answers {"available": false, "reason": "not_reported"}.

Persistence

Provide an acpcore.SessionStore through WithSessionStore for durable recovery. The default is an in-memory store. Format claude-transcript-jsonl-v2 stores native transcript rows and one current configuration record under config, committed atomically. The record holds the session and native IDs, the listing title, cwd, the transcript location as nativePath, the accepted environment and paths, and the session's model, effort, permission mode, system prompt, bare mode, output schema, and output style. session/list reads only the records. A session closed before its first prompt retains its configuration and empty history.

The first commit publishes the whole generation. Each later commit reads only the transcript lines claude appended since the last one and appends them, rewriting the record only when it changed; a commit with nothing new writes nothing. A transcript that was replaced or rewritten is republished whole, and one that shrank fails the commit. Before claude continues a transcript, a final line left torn by a process that died mid-write is cut.

Transcripts remain in Claude's home under projects/<project>/<session-id>.jsonl. Load adopts newer native rows when the shared prefix matches, or materializes missing rows from the store. Divergent logs fail restore. session/load replays history; session/resume restores without replay. Close and delete leave native files in place.

Development

make test
make audit
make test-integration-smoke
make test-integration-live

Unit tests use a scripted native process. Smoke requires installed Claude and spends no model tokens. Live tests spend tokens and prove ACP → native CLI → ACP continuation in a temporary home. Native auth environment variables are inherited; ACP_GO_CLAUDE_HOME optionally supplies a portable credential file. ACP_GO_CLAUDE_MODEL selects the live test model.

Context compaction

Reports completed top-level compactions, with the native trigger and before/after context counts when present.

Notifications carry acp-go.dev/compaction on the notification’s _meta, with an otherwise empty session_info_update. The value is acp-go-core wire.Compaction: a required compactionId and status, and optional trigger, contextBefore, and contextAfter. Each completed attempt has a distinct ID. Unknown facts are omitted. These are live notifications; historical replay emits none. Usage accounting is independent.

Documentation

Overview

Package claudeacp exposes the claude coding agent CLI as an Agent Client Protocol agent.

Most hosts run the agent over a pair of JSON-RPC streams using Serve. Serve starts one Claude stream-json process per ACP session, maps ACP requests onto Claude's control protocol, and streams ACP session updates back to the client. claude inherits the adapter's environment and keeps its sessions in its own home, so a session started over ACP can be continued natively with `claude --resume` after the adapter closes.

Hosts that need durable remote resume provide WithSessionStore. The store is the durability boundary for session/list, session/load and session/resume; claude's own transcript is the native copy an operator can continue outside ACP.

Hosts that need adapter telemetry provide OpenTelemetry providers with WithTracerProvider and WithMeterProvider; the package never configures global providers.

Index

Examples

Constants

View Source
const (
	// RawEventMethod is the notification carrying one raw claude event when a
	// session opted in through _meta.claude.rawEvent.enabled.
	RawEventMethod = "_claude/rawEvent"
	// AccountUsageMethod is the request reading the subscription allowance
	// through one session's claude process.
	AccountUsageMethod = "_claude/accountUsage"
	// SessionStoreFormat identifies the store layout this package writes: raw
	// claude session JSONL rows under the main subpath plus the adapter's session
	// record under the config subpath.
	SessionStoreFormat = "claude-transcript-jsonl-v2"
)

Variables

This section is empty.

Functions

func Serve

func Serve(ctx context.Context, input io.Reader, output io.Writer, opts ...Option) (returnErr error)

Serve runs an ACP agent over the provided streams. It blocks until the context is cancelled or the peer closes the connection, then closes the agent.

Example (Initialize)

ExampleServe_initialize embeds the agent over a pair of pipes, the same wiring a host uses for stdio, and reads the capabilities the handshake advertises.

package main

import (
	"bufio"
	"context"
	"encoding/json"
	"fmt"
	"io"

	claudeacp "github.com/savid/acp-go-claude"
)

func main() {
	ctx, cancel := context.WithCancel(context.Background())
	defer cancel()

	clientToAgentReader, clientToAgentWriter := io.Pipe()
	agentToClientReader, agentToClientWriter := io.Pipe()

	done := make(chan error, 1)

	go func() {
		done <- claudeacp.Serve(ctx, clientToAgentReader, agentToClientWriter)
	}()

	_, _ = fmt.Fprintln(clientToAgentWriter,
		`{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":1}}`)

	line, _ := bufio.NewReader(agentToClientReader).ReadString('\n')

	cancel()
	_ = clientToAgentWriter.Close()
	<-done

	var response struct {
		Result struct {
			AuthMethods       []any `json:"authMethods"`
			AgentCapabilities struct {
				LoadSession         bool           `json:"loadSession"`
				SessionCapabilities map[string]any `json:"sessionCapabilities"`
			} `json:"agentCapabilities"`
		} `json:"result"`
	}

	_ = json.Unmarshal([]byte(line), &response)

	fmt.Println(len(response.Result.AuthMethods))
	fmt.Println(response.Result.AgentCapabilities.LoadSession)
	fmt.Println(len(response.Result.AgentCapabilities.SessionCapabilities))
}
Output:
0
true
5

func SetModelRequest

func SetModelRequest(sessionID acp.SessionId, model string) acp.SetSessionConfigOptionRequest

SetModelRequest constructs a model selector update by native identifier.

func ValidateClaudeSessionMeta added in v0.2.0

func ValidateClaudeSessionMeta(meta map[string]any) error

ValidateClaudeSessionMeta runs the owned-namespace parsing of a session lifecycle request's _meta without an Agent and returns the same refusal.

func WithSessionClaudeOptions

func WithSessionClaudeOptions(options ClaudeOptions) wire.SessionRequestOption

WithSessionClaudeOptions merges claude-specific options into _meta.claude.options.

func WithSessionOutputSchema

func WithSessionOutputSchema(schema map[string]any) wire.SessionRequestOption

WithSessionOutputSchema sets the native structured-output JSON schema. An empty schema is refused at session start.

func WithSessionRawEvents

func WithSessionRawEvents(enabled bool) wire.SessionRequestOption

WithSessionRawEvents toggles raw claude event emission for the session.

Types

type Agent

type Agent struct {
	// contains filtered or unexported fields
}

Agent exposes the claude coding agent through ACP.

func NewAgent

func NewAgent(opts ...Option) *Agent

NewAgent creates an ACP agent for the claude coding agent CLI. Construction never fails; a refused option is reported by Initialize and every session-establishing method as claude_invalid_options.

func (*Agent) Authenticate

func (a *Agent) Authenticate(_ context.Context, params acp.AuthenticateRequest) (acp.AuthenticateResponse, error)

Authenticate exists because the SDK interface requires it. The harness authenticates itself in its own home, outside ACP.

func (*Agent) Cancel

func (a *Agent) Cancel(ctx context.Context, params acp.CancelNotification) (err error)

Cancel interrupts the session's in-flight turn. It is wire-silent on an unknown session or with no turn in flight.

func (*Agent) Close

func (a *Agent) Close() error

Close runs the shutdown ladder for every session and refuses every later request.

func (*Agent) CloseSession

func (a *Agent) CloseSession(ctx context.Context, params acp.CloseSessionRequest) (resp acp.CloseSessionResponse, err error)

CloseSession runs the shutdown ladder for one session.

func (*Agent) HandleExtensionMethod

func (a *Agent) HandleExtensionMethod(ctx context.Context, method string, params json.RawMessage) (any, error)

HandleExtensionMethod serves the account-usage read; every other extension method is method-not-found.

func (*Agent) Initialize

func (a *Agent) Initialize(ctx context.Context, params acp.InitializeRequest) (resp acp.InitializeResponse, err error)

Initialize implements ACP initialize.

func (*Agent) ListSessions

func (a *Agent) ListSessions(ctx context.Context, params acp.ListSessionsRequest) (resp acp.ListSessionsResponse, err error)

ListSessions lists live sessions and stored sessions, newest first.

func (*Agent) LoadSession

func (a *Agent) LoadSession(ctx context.Context, params acp.LoadSessionRequest) (resp acp.LoadSessionResponse, err error)

LoadSession restores a session and replays its history.

func (*Agent) Logout

func (a *Agent) Logout(_ context.Context, params acp.LogoutRequest) (acp.LogoutResponse, error)

Logout exists because the SDK interface requires it.

func (*Agent) NewSession

func (a *Agent) NewSession(ctx context.Context, params acp.NewSessionRequest) (resp acp.NewSessionResponse, err error)

NewSession creates and starts a claude session.

func (*Agent) Prompt

func (a *Agent) Prompt(ctx context.Context, params acp.PromptRequest) (resp acp.PromptResponse, err error)

Prompt sends one turn to claude and streams updates until it settles.

func (*Agent) ResumeSession

func (a *Agent) ResumeSession(ctx context.Context, params acp.ResumeSessionRequest) (resp acp.ResumeSessionResponse, err error)

ResumeSession restores a session without replaying its history.

func (*Agent) SetSessionConfigOption

func (a *Agent) SetSessionConfigOption(ctx context.Context, params acp.SetSessionConfigOptionRequest) (resp acp.SetSessionConfigOptionResponse, err error)

SetSessionConfigOption applies one select value.

func (*Agent) SetSessionMode

SetSessionMode exists because the SDK interface requires it. Native modes are config options, never ACP session modes.

func (*Agent) UnstableDeleteSession

func (a *Agent) UnstableDeleteSession(ctx context.Context, params acp.UnstableDeleteSessionRequest) (resp acp.UnstableDeleteSessionResponse, err error)

UnstableDeleteSession tombstones the session first, then closes any live session with the same id. Native state stays in claude's home.

type ClaudeOption

type ClaudeOption func(*ClaudeOptions)

ClaudeOption configures ClaudeOptions values.

func WithClaudeBare

func WithClaudeBare(enabled bool) ClaudeOption

WithClaudeBare requests Claude's native bare mode.

func WithClaudeEffort added in v0.2.0

func WithClaudeEffort(level string) ClaudeOption

WithClaudeEffort configures the reasoning level passed to claude.

func WithClaudeEnv

func WithClaudeEnv(env map[string]string) ClaudeOption

WithClaudeEnv configures the session environment overlay.

func WithClaudeExtraPathDirs

func WithClaudeExtraPathDirs(dirs ...string) ClaudeOption

WithClaudeExtraPathDirs configures the directories prepended to the session PATH.

func WithClaudeModel

func WithClaudeModel(model string) ClaudeOption

WithClaudeModel configures the session model by native identifier.

func WithClaudeOutputSchema

func WithClaudeOutputSchema(schema map[string]any) ClaudeOption

WithClaudeOutputSchema configures native structured output.

func WithClaudePermissionMode

func WithClaudePermissionMode(mode string) ClaudeOption

WithClaudePermissionMode selects the native permission policy.

func WithClaudeSystemPrompt

func WithClaudeSystemPrompt(text string) ClaudeOption

WithClaudeSystemPrompt replaces the native system prompt.

type ClaudeOptions

type ClaudeOptions struct {
	// Model selects the claude model for this session by native identifier.
	Model string `json:"model,omitempty"`
	// Env overlays the session's claude process environment.
	Env map[string]string `json:"env,omitempty"`
	// ExtraPathDirs are absolute directories prepended, in order, to the PATH
	// of this session's claude process.
	ExtraPathDirs []string `json:"extraPathDirs,omitempty"`
	// OutputSchema is the native structured-output JSON schema.
	OutputSchema map[string]any `json:"outputSchema,omitempty"`
	// Effort is a reasoning-level value passed unchanged to claude.
	Effort string `json:"effort,omitempty"`
	// PermissionMode selects Claude's native permission policy.
	PermissionMode string `json:"permissionMode,omitempty"`
	// Bare requests Claude's native bare mode; an explicit false travels.
	Bare bool `json:"bare,omitempty"`

	// SystemPrompt replaces the native system prompt.
	SystemPrompt string `json:"systemPrompt,omitempty"`
	// contains filtered or unexported fields
}

ClaudeOptions is the per-session options struct carried at _meta.claude.options.

func NewClaudeOptions

func NewClaudeOptions(opts ...ClaudeOption) ClaudeOptions

NewClaudeOptions constructs ClaudeOptions from functional options.

Example
package main

import (
	"fmt"

	claudeacp "github.com/savid/acp-go-claude"
)

func main() {
	options := claudeacp.NewClaudeOptions(
		claudeacp.WithClaudeModel("haiku"),
		claudeacp.WithClaudeEffort("high"),
		claudeacp.WithClaudePermissionMode("plan"),
	)

	fmt.Println(options.Model)
	fmt.Println(options.Effort)
	fmt.Println(options.PermissionMode)
}
Output:
haiku
high
plan

func (ClaudeOptions) Meta

func (options ClaudeOptions) Meta() map[string]any

Meta returns exactly {"claude": {"options": {...}}} with the non-zero fields.

type ConcurrencyLimits

type ConcurrencyLimits struct {
	MaxActiveSessions        int
	MaxConcurrentClientCalls int
}

ConcurrencyLimits controls per-agent backpressure. Zero fields use defaults.

type ImageLimits

type ImageLimits struct {
	MaxInputBytesPerImage     int64
	MaxInputBytesPerPrompt    int64
	MaxOutputBytesPerImage    int64
	MaxOutputBytesPerToolCall int64
}

ImageLimits bounds decoded image bytes. A zero field disables that policy limit; the frame clamp still applies.

type Option

type Option func(*Options)

Option configures the claude ACP agent.

func WithAgentName

func WithAgentName(name string) Option

WithAgentName sets the protocol identifier advertised during ACP initialize.

func WithAgentTitle

func WithAgentTitle(title string) Option

WithAgentTitle sets the human-readable agent name advertised during ACP initialize.

func WithAgentVersion

func WithAgentVersion(version string) Option

WithAgentVersion sets the agent version advertised during ACP initialize.

func WithClaudeSettingSources

func WithClaudeSettingSources(sources []string) Option

WithClaudeSettingSources selects user, project, and local native settings sources.

func WithClaudeSettingsFile

func WithClaudeSettingsFile(path string) Option

WithClaudeSettingsFile passes an additional native settings file.

func WithConcurrencyLimits

func WithConcurrencyLimits(limits ConcurrencyLimits) Option

WithConcurrencyLimits sets process-local backpressure limits.

func WithConfiguredModels added in v0.2.0

func WithConfiguredModels(ids []string) Option

WithConfiguredModels names the models the host lists explicitly.

func WithDefaultModel

func WithDefaultModel(model string) Option

WithDefaultModel selects the model for new sessions by native identifier.

func WithEnv

func WithEnv(env map[string]string) Option

WithEnv sets the static agent-scoped environment overlay applied to every claude process after the inherited environment and before the session env.

func WithExecutablePath

func WithExecutablePath(path string) Option

WithExecutablePath selects the claude executable.

func WithHome

func WithHome(path string) Option

WithHome sets claude's native config root, passed to every session as CLAUDE_CONFIG_DIR.

func WithImageLimits

func WithImageLimits(limits ImageLimits) Option

WithImageLimits bounds decoded image bytes. A zero field disables that policy limit; a negative field fails construction.

func WithInputHandoffRoot

func WithInputHandoffRoot(dir string) Option

WithInputHandoffRoot sets the absolute directory under which handoff-form prompt images are read. The adapter never writes there.

func WithLogger

func WithLogger(logger *slog.Logger) Option

WithLogger configures structured diagnostic logging.

func WithMeterProvider

func WithMeterProvider(provider metric.MeterProvider) Option

WithMeterProvider configures the OpenTelemetry meter provider.

func WithScratchDir

func WithScratchDir(dir string) Option

WithScratchDir sets the parent directory for temporary quota probes.

func WithSeedFiles

func WithSeedFiles(files map[string]string) Option

WithSeedFiles registers files written into claude's config root before each launch. Keys are paths relative to that root; values are the contents.

func WithSessionStore

func WithSessionStore(store acpcore.SessionStore) Option

WithSessionStore configures the session store.

func WithTextMapPropagator

func WithTextMapPropagator(propagator propagation.TextMapPropagator) Option

WithTextMapPropagator configures trace-context extraction from ACP _meta.

func WithTracerProvider

func WithTracerProvider(provider trace.TracerProvider) Option

WithTracerProvider configures the OpenTelemetry tracer provider.

type Options

type Options struct {
	// AgentName is the protocol identifier advertised during ACP initialize.
	AgentName string
	// AgentTitle is the human-readable agent name advertised during ACP initialize.
	AgentTitle string
	// AgentVersion is the agent version advertised during ACP initialize.
	AgentVersion string

	// ExecutablePath selects the claude executable. A bare name is searched on the
	// base PATH; a path containing a separator is used as given. Empty means
	// "claude".
	ExecutablePath string
	// Home is claude's native config, auth, and runtime root, passed to every
	// session as CLAUDE_CONFIG_DIR. Empty leaves claude to resolve its home from
	// the inherited environment exactly as it would from a shell.
	Home string
	// ScratchDir is the absolute parent for temporary quota probes. Empty uses
	// the system temporary directory.
	ScratchDir string
	// InputHandoffRoot is the absolute directory under which handoff-form
	// prompt images are read. Empty rejects the handoff form.
	InputHandoffRoot string
	// DefaultModel selects the model for new sessions by native identifier.
	DefaultModel string
	// ConfiguredModels are the model ids the host lists explicitly, using native identifiers.
	ConfiguredModels []string
	// Env is the static agent-scoped overlay on the inherited process
	// environment every claude process runs with.
	Env map[string]string

	// Logger receives structured diagnostic logs. If nil, the default logger is used.
	Logger *slog.Logger
	// TracerProvider records adapter spans. If nil, tracing is a no-op.
	TracerProvider trace.TracerProvider
	// MeterProvider records adapter metrics. If nil, metrics are no-ops.
	MeterProvider metric.MeterProvider
	// TextMapPropagator extracts trace context from ACP _meta. If nil, W3C
	// trace context plus baggage propagation is used.
	TextMapPropagator propagation.TextMapPropagator

	// SessionStore is the durability boundary for session rows. Nil installs a
	// fresh in-memory store.
	SessionStore acpcore.SessionStore
	// ConcurrencyLimits controls process-local backpressure.
	ConcurrencyLimits ConcurrencyLimits
	// SeedFiles maps paths relative to claude's config root to file contents
	// written there before each launch.
	SeedFiles map[string]string
	// ImageLimits bounds decoded image bytes on prompt input and emitted
	// output. Every field defaults to 6 MiB when the option is omitted.
	ImageLimits ImageLimits

	// ClaudeSettingSources selects native settings sources. Nil uses native defaults.
	ClaudeSettingSources []string
	// ClaudeSettingsFile passes an additional native settings file.
	ClaudeSettingsFile string
	// contains filtered or unexported fields
}

Options configures the ACP agent process and the claude stream-json sessions it starts.

Directories

Path Synopsis
cmd
acp-go-claude command
Package integration holds the tests that run against an installed Claude Code.
Package integration holds the tests that run against an installed Claude Code.
internal

Jump to

Keyboard shortcuts

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