Documentation
¶
Index ¶
- Constants
- func AdvertisedContextWindows(endpoint, apiKey string) (map[string]int, string)
- func AgentProcessEnv(options json.RawMessage) ([]string, error)
- func ConfigureSignOn(enabled bool)
- func ContextClassLabel(window int) string
- func MappedContextClassesDiffer(p provider.Provider, windows map[string]int) bool
- func PreviewSettings(p provider.Provider) (string, error)
- func Run(p provider.Provider, args []string) error
- func SigningEnabled() bool
- func UserSettingsPath() string
- func WriteGlobalSigning(enabled bool) (changed bool, err error)
- type AgentLaunch
- type ClaudeAccountAgentLaunch
- type DefaultAgentLaunch
- type GlobalSigning
- type Launch
- type RuntimeSettings
Constants ¶
const ( SubagentModelEnv = "CLAUDE_CODE_SUBAGENT_MODEL" ToolUseConcurrencyEnv = "CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY" ToolSearchEnv = "ENABLE_TOOL_SEARCH" // DefaultOutputStyle sets Claude Code's output style for every ccl-launched // session. "Concise" favors terse, direct responses over extra explanation. DefaultOutputStyle = "Concise" )
Variables ¶
This section is empty.
Functions ¶
func AdvertisedContextWindows ¶ added in v1.3.16
AdvertisedContextWindows reads the context window of every model a runtime exposes, keyed by lowercased model id, plus the catalog it came from.
Subscription runtimes only reveal windows through the Codex client catalog; the plain OpenAI list is trimmed to id/object/created/owned_by. Both shapes are tried so API-key gateways still work. The values are advisory: they may be a client-side catalog cap rather than what the server enforces.
func AgentProcessEnv ¶ added in v1.5.22
func AgentProcessEnv(options json.RawMessage) ([]string, error)
AgentProcessEnv supplies initial authentication for the adapter's auth probe. All other provider settings belong to SDK options, so a long-lived adapter cannot pass its initial provider's custom env to sessions using another one.
func ConfigureSignOn ¶ added in v1.6.6
func ConfigureSignOn(enabled bool)
ConfigureSignOn records the persisted switch. It must be called once a command has loaded its config, before any Claude Code launch.
func ContextClassLabel ¶ added in v1.3.16
ContextClassLabel names the sizing Claude Code will use for an advertised window, for diagnostics.
func MappedContextClassesDiffer ¶ added in v1.3.16
MappedContextClassesDiffer reports whether the provider's mapped models fall into more than one context class, which is when no session-wide context value could be correct for all of them.
func PreviewSettings ¶
PreviewSettings returns the JSON that would be written to the settings temp file.
func SigningEnabled ¶ added in v1.6.6
func SigningEnabled() bool
SigningEnabled reports whether ccl leaves Claude Code's attribution alone.
func UserSettingsPath ¶ added in v1.5.21
func UserSettingsPath() string
func WriteGlobalSigning ¶ added in v1.6.6
WriteGlobalSigning merges Claude Code's attribution setting into the user's settings file, keeping every other key.
Turning signing off writes ccl's empty attribution. Turning it back on only removes the value ccl wrote: a custom attribution text the user chose is left in place, and changed reports false.
Types ¶
type AgentLaunch ¶ added in v1.5.22
type AgentLaunch struct {
// contains filtered or unexported fields
}
AgentLaunch owns only CCL's provider runtime. The ACP adapter owns the SDK and its Claude executable, so preparing this launch needs no installed CLI and writes no temporary Claude settings file.
func PrepareAgentContext ¶ added in v1.5.22
func (*AgentLaunch) Close ¶ added in v1.5.22
func (l *AgentLaunch) Close()
func (*AgentLaunch) Options ¶ added in v1.5.22
func (l *AgentLaunch) Options(cwd string) (json.RawMessage, error)
Options is the upstream adapter's documented _meta.claudeCode.options object. Resolve preferences for the client's cwd, not CCL's startup cwd.
type ClaudeAccountAgentLaunch ¶ added in v1.7.11
ClaudeAccountAgentLaunch uses Claude's native subscription inside the selected profile; protocol and token refresh stay with the upstream SDK.
func (ClaudeAccountAgentLaunch) Close ¶ added in v1.7.11
func (ClaudeAccountAgentLaunch) Close()
func (ClaudeAccountAgentLaunch) Options ¶ added in v1.7.11
func (l ClaudeAccountAgentLaunch) Options(cwd string) (json.RawMessage, error)
type DefaultAgentLaunch ¶ added in v1.6.2
type DefaultAgentLaunch struct{}
DefaultAgentLaunch runs ACP sessions on Claude Code's own configuration (the "default" selector) exactly as it stands, including a running ccl proxy's overlay: no provider runtime, no settings, and every routing key the adapter's long-lived process may hold from another provider is put back to ccl's own environment, as a plain Claude Code launch would see it.
func (DefaultAgentLaunch) Close ¶ added in v1.6.2
func (DefaultAgentLaunch) Close()
func (DefaultAgentLaunch) Options ¶ added in v1.6.2
func (DefaultAgentLaunch) Options(cwd string) (json.RawMessage, error)
type GlobalSigning ¶ added in v1.6.6
type GlobalSigning int
GlobalSigning describes what ~/.claude/settings.json says about attribution.
const ( // GlobalSigningDefault means no attribution is configured, so Claude Code // signs. GlobalSigningDefault GlobalSigning = iota // GlobalSigningDisabled means the user's settings hide the signature. GlobalSigningDisabled // GlobalSigningCustom means the user configured their own attribution text. GlobalSigningCustom )
func ReadGlobalSigning ¶ added in v1.6.6
func ReadGlobalSigning() GlobalSigning
ReadGlobalSigning inspects the user's own Claude Code settings.
type Launch ¶ added in v1.5.13
type Launch struct {
Path string
SettingsPath string
Env []string
Session *providersession.Session
// DroppedContextOverride reports that the provider's context env was not a
// supported preset and was left out of this session.
DroppedContextOverride bool
// contains filtered or unexported fields
}
Launch is a prepared Claude Code process spec: settings file, env, and the optional embedded proxy. The caller must Close it.
func Prepare ¶ added in v1.5.13
Prepare resolves the provider runtime and writes a settings file without attaching stdio or printing. The caller must Close the result.
func PrepareContext ¶ added in v1.5.13
PrepareContext is Prepare with caller-controlled cancellation for provider discovery and embedded runtime startup.
type RuntimeSettings ¶ added in v1.3.1
type RuntimeSettings struct {
SubagentModel string
}
RuntimeSettings are ccl's Claude Code process defaults. Provider Env values override these defaults so advanced users retain an escape hatch.
func ResolveRuntimeSettings ¶ added in v1.3.1
func ResolveRuntimeSettings(p provider.Provider) RuntimeSettings