Documentation
¶
Index ¶
- Constants
- Variables
- 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 NewServeCwdResolver(db libdb.DBManager, roots *vfs.Factory) func(context.Context) string
- func ReadConfigValue(ctx context.Context, db libdb.DBManager, key string) string
- type ChainRegistry
- type Deps
- type EnvSetupSpec
- type MissionAgentResolver
- type MissionDispatcher
- type MissionForwardConfig
- type SessionRouter
- func (r *SessionRouter) AskApproval(ctx context.Context, req hitlservice.ApprovalRequest) (bool, error)
- func (r *SessionRouter) DeliverToContenoxSession(ctx context.Context, contenoxSessionID string, n libacp.SessionNotification) error
- func (r *SessionRouter) PromptContenoxSession(ctx context.Context, contenoxSessionID, text string) error
- type Transport
- func (t *Transport) AskApproval(ctx context.Context, req hitlservice.ApprovalRequest) (bool, error)
- func (t *Transport) Authenticate(ctx context.Context, req libacp.AuthenticateRequest) (libacp.AuthenticateResponse, error)
- func (t *Transport) Cancel(ctx context.Context, req libacp.CancelNotification) error
- func (t *Transport) Close(ctx context.Context) error
- func (t *Transport) CloseSession(ctx context.Context, req libacp.CloseSessionRequest) (libacp.CloseSessionResponse, error)
- func (t *Transport) DeleteSession(ctx context.Context, req libacp.DeleteSessionRequest) (libacp.DeleteSessionResponse, error)
- func (t *Transport) DeliverToContenoxSession(ctx context.Context, contenoxSessionID string, n libacp.SessionNotification) error
- func (t *Transport) Initialize(ctx 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) Logout(_ context.Context, _ libacp.LogoutRequest) (libacp.LogoutResponse, 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) PromptContenoxSession(ctx context.Context, contenoxSessionID, text string) error
- func (t *Transport) ResumeSession(ctx context.Context, req libacp.ResumeSessionRequest) (libacp.ResumeSessionResponse, error)
- func (t *Transport) SetSessionConfigOption(ctx context.Context, req libacp.SetSessionConfigOptionRequest) (libacp.SetSessionConfigOptionResponse, error)
- func (t *Transport) SetSessionMode(_ context.Context, _ libacp.SetSessionModeRequest) (libacp.SetSessionModeResponse, error)
- func (t *Transport) SetSessionModel(_ context.Context, _ libacp.SetSessionModelRequest) (libacp.SetSessionModelResponse, error)
Constants ¶
View Source
const ( TerminalOutputMetaKey = "contenox.terminalOutput" TerminalOutputUpdateKind libacp.SessionUpdateKind = "_contenox.terminalOutput" )
View Source
const AdoptMetaKey = "contenox.adopt"
View Source
const AgentMetaKey = "contenox.agent"
View Source
const AgentModeConfigOptionID = "contenox.agent-mode"
View Source
const AgentModelConfigOptionID = "contenox.agent-model"
View Source
const (
WorkspaceConfigOptionsMetaKey = "contenox.workspaceConfigOptions"
)
Variables ¶
View Source
var ErrNoBoundSession = errors.New("acpsvc: no ACP transport bound to contenox session")
View Source
var ErrSessionBusy = fmt.Errorf("acpsvc: the session already has a turn in flight")
View Source
var ErrSessionNotLive = errors.New("acpsvc: no live session for that contenox id on this connection")
Functions ¶
func CleanupStaleACPManagedMCPServers ¶ added in v0.29.0
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
func NewServeCwdResolver ¶ added in v0.36.0
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)
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 string
WorkspaceRoots *vfs.Factory
ShellSessions shellsession.Manager
KnownPolicies []string
HITLDefaultPolicyName string
UpdateBanner string
EnvSetup *EnvSetupSpec
SessionRouter *SessionRouter
Instances agentinstance.Manager
NativeTurns *nativeturn.Registry
Fleet MissionDispatcher
Agents MissionAgentResolver
MissionForwarded *MissionForwardConfig
}
type EnvSetupSpec ¶ added in v0.36.0
type EnvSetupSpec struct {
Vars []libacp.AuthEnvVar
Complete func(ctx context.Context) error
}
type MissionAgentResolver ¶
type MissionDispatcher ¶
type MissionDispatcher interface {
Dispatch(ctx context.Context, req fleetservice.DispatchRequest) (fleetservice.DispatchResult, error)
}
type MissionForwardConfig ¶
type SessionRouter ¶
type SessionRouter struct {
// contains filtered or unexported fields
}
func NewSessionRouter ¶
func NewSessionRouter() *SessionRouter
func (*SessionRouter) AskApproval ¶
func (r *SessionRouter) AskApproval(ctx context.Context, req hitlservice.ApprovalRequest) (bool, error)
func (*SessionRouter) DeliverToContenoxSession ¶
func (r *SessionRouter) DeliverToContenoxSession(ctx context.Context, contenoxSessionID string, n libacp.SessionNotification) error
func (*SessionRouter) PromptContenoxSession ¶
func (r *SessionRouter) PromptContenoxSession(ctx context.Context, contenoxSessionID, text string) error
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(ctx context.Context, req libacp.AuthenticateRequest) (libacp.AuthenticateResponse, error)
func (*Transport) CloseSession ¶ added in v0.36.0
func (t *Transport) CloseSession(ctx context.Context, req libacp.CloseSessionRequest) (libacp.CloseSessionResponse, error)
func (*Transport) DeleteSession ¶ added in v0.36.0
func (t *Transport) DeleteSession(ctx context.Context, req libacp.DeleteSessionRequest) (libacp.DeleteSessionResponse, error)
func (*Transport) DeliverToContenoxSession ¶
func (*Transport) Initialize ¶
func (t *Transport) Initialize(ctx 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) Logout ¶ added in v0.36.0
func (t *Transport) Logout(_ context.Context, _ libacp.LogoutRequest) (libacp.LogoutResponse, 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) PromptContenoxSession ¶
func (*Transport) ResumeSession ¶ added in v0.36.0
func (t *Transport) ResumeSession(ctx context.Context, req libacp.ResumeSessionRequest) (libacp.ResumeSessionResponse, error)
func (*Transport) SetSessionConfigOption ¶ added in v0.29.0
func (t *Transport) SetSessionConfigOption(ctx context.Context, req libacp.SetSessionConfigOptionRequest) (libacp.SetSessionConfigOptionResponse, error)
func (*Transport) SetSessionMode ¶ added in v0.36.0
func (t *Transport) SetSessionMode(_ context.Context, _ libacp.SetSessionModeRequest) (libacp.SetSessionModeResponse, error)
func (*Transport) SetSessionModel ¶ added in v0.36.0
func (t *Transport) SetSessionModel(_ context.Context, _ libacp.SetSessionModelRequest) (libacp.SetSessionModelResponse, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.