Documentation
¶
Index ¶
- func DAGUsesManaged(dag *ir.DAG) bool
- func DeleteSession(ctx context.Context, hostConfig Config, directory, sessionID string) error
- func SessionAvailable(ctx context.Context, hostConfig Config, directory, sessionID string) (bool, error)
- func SharingDisabled(value any) bool
- func UnavailableEnv(err error) []string
- func WithHost(ctx context.Context, host *Host) context.Context
- type Config
- type Host
- type ModeResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DAGUsesManaged ¶
DAGUsesManaged reports whether a DAG has a host-compatible managed OpenCode step.
func DeleteSession ¶
DeleteSession removes a host-owned OpenCode session after its DAG run is removed.
func SessionAvailable ¶
func SessionAvailable(ctx context.Context, hostConfig Config, directory, sessionID string) (bool, error)
SessionAvailable reports whether a managed session exists in directory.
func SharingDisabled ¶
SharingDisabled checks the effective sharing setting in either API's config response. V2 returns ordered documents; the last defined value wins.
func UnavailableEnv ¶
UnavailableEnv returns a private transport error for a required managed step.
Types ¶
type Config ¶
Config contains the private loopback connection used by managed harness steps.
func ConfigFromContext ¶
ConfigFromContext resolves a host-owned or process-injected connection.
type Host ¶
type Host struct {
// contains filtered or unexported fields
}
Host lazily owns one OpenCode server process.
func New ¶
func New(parent context.Context, settings config.OpenCodeConfig) *Host
New creates an idle host whose lifecycle ends with parent.