Documentation
¶
Index ¶
- func CleanupStaleACPManagedMCPServers(ctx context.Context, db libdb.DBManager) error
- func New(deps Deps) libacp.AgentFactory
- func NewACPCommandRunner(transport func() *Transport) localtools.CommandRunner
- func NewACPCommandRunnerWithShell(transport func() *Transport, shell localtools.PlatformShell) localtools.CommandRunner
- func NewACPCwdResolver(transport func() *Transport) func(context.Context) string
- func NewACPFileIO(transport func() *Transport) localtools.FileIO
- func ReadConfigValue(ctx context.Context, db libdb.DBManager, key string) string
- type ChainRegistry
- type Deps
- type Transport
- func (t *Transport) AskApproval(ctx context.Context, req hitlservice.ApprovalRequest) (bool, error)
- func (t *Transport) Authenticate(_ context.Context, req libacp.AuthenticateRequest) (libacp.AuthenticateResponse, error)
- func (t *Transport) Cancel(_ context.Context, _ libacp.CancelNotification) error
- func (t *Transport) Close(ctx context.Context) error
- func (t *Transport) Initialize(_ context.Context, req libacp.InitializeRequest) (libacp.InitializeResponse, error)
- func (t *Transport) ListSessions(ctx context.Context, req libacp.ListSessionsRequest) (libacp.ListSessionsResponse, error)
- func (t *Transport) LoadSession(ctx context.Context, req libacp.LoadSessionRequest) (libacp.LoadSessionResponse, error)
- func (t *Transport) NewSession(ctx context.Context, req libacp.NewSessionRequest) (libacp.NewSessionResponse, error)
- func (t *Transport) Prompt(ctx context.Context, req libacp.PromptRequest) (libacp.PromptResponse, error)
- func (t *Transport) SetSessionConfigOption(ctx context.Context, req libacp.SetSessionConfigOptionRequest) (libacp.SetSessionConfigOptionResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupStaleACPManagedMCPServers ¶ added in v0.29.0
CleanupStaleACPManagedMCPServers removes client-scoped ACP MCP registrations left behind by a previous process. Durable MCP configuration must be created through the normal `contenox mcp` commands or HTTP API; session/new and session/load MCP servers are temporary by ACP contract.
func New ¶
func New(deps Deps) libacp.AgentFactory
func NewACPCommandRunner ¶
func NewACPCommandRunner(transport func() *Transport) localtools.CommandRunner
func NewACPCommandRunnerWithShell ¶ added in v0.28.4
func NewACPCommandRunnerWithShell(transport func() *Transport, shell localtools.PlatformShell) localtools.CommandRunner
func NewACPCwdResolver ¶
func NewACPFileIO ¶
func NewACPFileIO(transport func() *Transport) localtools.FileIO
Types ¶
type ChainRegistry ¶
type ChainRegistry struct {
// contains filtered or unexported fields
}
func LoadChainRegistry ¶
func LoadChainRegistry() (*ChainRegistry, error)
func LoadChainRegistryFrom ¶
func LoadChainRegistryFrom(filename, envVar string) (*ChainRegistry, error)
LoadChainRegistryFrom loads the ACP chain for a specific profile: filename is the ~/.contenox/ file the chain is read from, envVar overrides that path. A missing file is a hard error (fail closed) — callers must not fall back to a different chain.
func (*ChainRegistry) Default ¶
func (r *ChainRegistry) Default() *taskengine.TaskChainDefinition
func (*ChainRegistry) Source ¶
func (r *ChainRegistry) Source() string
type Deps ¶
type Deps struct {
Engine *enginesvc.Engine
DB libdb.DBManager
ChainRegistry *ChainRegistry
DefaultModel string
DefaultProvider string
DefaultAltModel string
DefaultAltProvider string
DefaultMaxTokens string
DefaultThink string
WorkspaceID string
// ContenoxDir is the active .contenox directory, used to locate auxiliary
// chains (e.g. chain-compact.json for the /compact command).
ContenoxDir string
// KnownPolicies are the HITL policy preset names shown by /policy when
// listing. Display only — empty just omits the list.
KnownPolicies []string
// HITLDefaultPolicyName is the policy the engine falls back to when no
// override is set, shown by /policy so the status is accurate. Display only.
HITLDefaultPolicyName string
// UpdateBanner is an optional one-shot message sent to the client as an
// agent_message_chunk on the first session created or loaded. Empty = no banner.
UpdateBanner string
}
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
func (*Transport) AskApproval ¶
func (t *Transport) AskApproval(ctx context.Context, req hitlservice.ApprovalRequest) (bool, error)
func (*Transport) Authenticate ¶
func (t *Transport) Authenticate(_ context.Context, req libacp.AuthenticateRequest) (libacp.AuthenticateResponse, error)
func (*Transport) Initialize ¶
func (t *Transport) Initialize(_ context.Context, req libacp.InitializeRequest) (libacp.InitializeResponse, error)
func (*Transport) ListSessions ¶
func (t *Transport) ListSessions(ctx context.Context, req libacp.ListSessionsRequest) (libacp.ListSessionsResponse, error)
func (*Transport) LoadSession ¶
func (t *Transport) LoadSession(ctx context.Context, req libacp.LoadSessionRequest) (libacp.LoadSessionResponse, error)
func (*Transport) NewSession ¶
func (t *Transport) NewSession(ctx context.Context, req libacp.NewSessionRequest) (libacp.NewSessionResponse, error)
func (*Transport) Prompt ¶
func (t *Transport) Prompt(ctx context.Context, req libacp.PromptRequest) (libacp.PromptResponse, error)
func (*Transport) SetSessionConfigOption ¶ added in v0.29.0
func (t *Transport) SetSessionConfigOption(ctx context.Context, req libacp.SetSessionConfigOptionRequest) (libacp.SetSessionConfigOptionResponse, error)
Click to show internal directories.
Click to hide internal directories.