Documentation
¶
Index ¶
- Constants
- func AdvertisedContextWindows(endpoint, apiKey string) (map[string]int, string)
- func AgentProcessEnv(options json.RawMessage) ([]string, error)
- 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 UserSettingsPath() string
- type AgentLaunch
- type DefaultAgentLaunch
- type Launch
- type Proxy
- 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 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 UserSettingsPath ¶ added in v1.5.21
func UserSettingsPath() string
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 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 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 Proxy ¶ added in v1.5.21
type Proxy struct {
Runtime *oauthproxy.Runtime
Settings map[string]json.RawMessage
// contains filtered or unexported fields
}
Proxy is a standalone runtime and the same model/settings view used by the launcher. Settings contain only the local credential, never the upstream key.
func PrepareProxy ¶ added in v1.5.21
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