acpclient

package
v0.4.43 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MCPServerNames added in v0.3.25

func MCPServerNames(servers []acpsdk.McpServer) []string

MCPServerNames returns non-empty server names from ACP session/new payloads.

func ToMCPServers

func ToMCPServers(specs []capacp.SessionMCPServer) []acpsdk.McpServer

ToMCPServers converts harness MCP specs into ACP SDK values for session/new.

Types

type RestoreStrategy added in v0.4.20

type RestoreStrategy string

RestoreStrategy selects how acp-remote re-attaches to a saved ACP session id.

const (
	// StrategyResume only calls session/resume (legacy default when no plugin is injected).
	StrategyResume RestoreStrategy = "resume"
	// StrategyLoad only calls session/load (Cursor CLI documents load, not resume).
	StrategyLoad RestoreStrategy = "load"
	// StrategyAuto tries resume when advertised, then load when advertised.
	StrategyAuto RestoreStrategy = "auto"
	// StrategySkip never calls restore; always session/new (+ replay).
	StrategySkip RestoreStrategy = "skip"
	// StrategyCursor is an alias for load tuned for Cursor agent acp: Cursor does
	// not implement session/resume, but persists prompted sessions so that
	// session/load re-attaches after a subprocess restart (verified with the
	// session id returned by session/new; sessions never prompted are not yet
	// persisted, so load fails with "not found" and the caller falls back to
	// session/new, which is harmless because there is no history to lose).
	StrategyCursor RestoreStrategy = "cursor"
)

type Restorer added in v0.4.20

type Restorer struct {
	// contains filtered or unexported fields
}

Restorer implements capacp.SessionRestorer with a fixed strategy.

func NewRestorer added in v0.4.20

func NewRestorer(strategy RestoreStrategy) *Restorer

func (*Restorer) Restore added in v0.4.20

Jump to

Keyboard shortcuts

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