acpsvc

package
v1.0.0-rc.7 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: Apache-2.0 Imports: 56 Imported by: 0 modules, 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.

Documentation

Index

Constants

View Source
const (
	// ExtMethodWorkspaceConfigOptions returns the current session-less config
	// options: result {"configOptions": [...]}.
	ExtMethodWorkspaceConfigOptions = "_contenox/workspaceConfigOptions"
	// ExtNotifyWorkspaceConfigOptionsChanged is pushed (no response) whenever
	// backend state changes: params {"configOptions": [...]}.
	ExtNotifyWorkspaceConfigOptionsChanged = "_contenox/workspaceConfigOptionsChanged"
)
View Source
const (
	ExtMethodSessionConnectors       = "_contenox/session/connectors"
	ExtMethodSessionConnectorsSet    = "_contenox/session/connectors/set"
	ExtMethodSessionConnectorsAdd    = "_contenox/session/connectors/add"
	ExtMethodSessionConnectorsRemove = "_contenox/session/connectors/remove"
	ExtMethodSessionConnectorsTool   = "_contenox/session/connectors/tools/set"
)
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 AvailableCommandsMetaKey = "contenox.availableCommands"

AvailableCommandsMetaKey carries the static slash-command list in the initialize response, so clients can offer commands before any session exists.

View Source
const ExtMethodAgentConfigOptions = "_contenox/agents/configOptions"
View Source
const ExtMethodAgentProblems = "_contenox/agents/problems"
View Source
const ExtMethodEnvelopesList = "_contenox/envelopes/list"
View Source
const ExtNotifyAgentDeclarationsChanged = "_contenox/agents/changed"

ExtNotifyAgentDeclarationsChanged is pushed to every connected client after a compile pass: the folder's files or their problems changed, so the app should re-read `_contenox/agents/problems`.

View Source
const (
	WorkspaceConfigOptionsMetaKey = "contenox.workspaceConfigOptions"
)

Variables

View Source
var ErrNoBoundSession = errors.New("acpsvc: no ACP transport bound to contenox-runtime 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 CleanupStaleACPManagedMCPServers(ctx context.Context, db libdb.DBManager) error

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 NewACPCwdResolver(transport func() *Transport) func(context.Context) string

func NewACPFileIO

func NewACPFileIO(transport func() *Transport) localtools.FileIO

func NewServeCwdResolver added in v0.36.0

func NewServeCwdResolver(db libdb.DBManager, roots *vfs.Factory) func(context.Context) string

func NotifyAgentDeclarationsChanged

func NotifyAgentDeclarationsChanged()

NotifyAgentDeclarationsChanged tells every connected client that the declaration folder was recompiled.

func ReadConfigValue

func ReadConfigValue(ctx context.Context, db libdb.DBManager, key string) string

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 LoadChainRegistryPath

func LoadChainRegistryPath(path string) (*ChainRegistry, error)

func NewChainRegistryFor

func NewChainRegistryFor(chain *taskengine.TaskChainDefinition, source string) *ChainRegistry

func (*ChainRegistry) Default

func (*ChainRegistry) Reload

func (r *ChainRegistry) Reload() error

Reload re-reads the chain from the file it was loaded from, so a session started after the declaration watcher recompiled sees the new version without a restart. An in-memory chain (shipped-tree fallback) has nothing to reload.

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

	LiveDefaults func(ctx context.Context) LiveDefaults

	WorkspaceID string
	ContenoxDir string

	WorkspaceRoots *vfs.Factory

	ShellSessions shellsession.Manager

	PolicyCatalog         func(workspaceID string) []string
	PolicyResolver        func(workspaceID, name string) string
	HITLDefaultPolicyName string

	UpdateBanner string

	EnvSetup *EnvSetupSpec

	SessionRouter *SessionRouter

	DecisionRecorder hitlservice.DecisionRecorder

	Approvals hitlservice.Service

	OracleMounted bool

	HITL hitlservice.PolicyEvaluator

	Instances agentinstance.Manager

	Connectors connectorservice.Service

	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 LiveDefaults

type LiveDefaults struct {
	Model       string
	Provider    string
	AltModel    string
	AltProvider string
	MaxTokens   string
	Think       string
	Locale      string
	OracleChat  string
}

type MissionAgentResolver

type MissionAgentResolver interface {
	GetByName(ctx context.Context, name string) (*runtimetypes.Agent, error)
}

type MissionDispatcher

type MissionDispatcher interface {
	Dispatch(ctx context.Context, req fleetservice.DispatchRequest) (fleetservice.DispatchResult, error)
}

type MissionForwardConfig

type MissionForwardConfig struct {
	Reachable func() bool
	TargetURL func() string
}

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 (*Transport) Cancel

func (*Transport) Close

func (t *Transport) Close(ctx context.Context) error

func (*Transport) CloseSession added in v0.36.0

func (*Transport) DeleteSession added in v0.36.0

func (*Transport) DeliverToContenoxSession

func (t *Transport) DeliverToContenoxSession(ctx context.Context, contenoxSessionID string, n libacp.SessionNotification) error

func (*Transport) Initialize

func (*Transport) ListSessions

func (*Transport) LoadSession

func (*Transport) Logout added in v0.36.0

func (*Transport) NewSession

func (*Transport) Prompt

func (*Transport) PromptContenoxSession

func (t *Transport) PromptContenoxSession(ctx context.Context, contenoxSessionID, text string) error

func (*Transport) ResumeSession added in v0.36.0

func (*Transport) SetSessionConfigOption added in v0.29.0

func (*Transport) SetSessionMode added in v0.36.0

func (*Transport) SetSessionModel added in v0.36.0

Jump to

Keyboard shortcuts

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