embeddedcli

package
v2.0.2-preview.3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 16 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

This section is empty.

Variables

This section is empty.

Functions

func Path

func Path() string

func RuntimeLibPath

func RuntimeLibPath() string

RuntimeLibPath returns the on-disk path to the installed native in-process runtime library (cdylib), or "" when no runtime library was bundled or the CLI could not be installed. It ensures the embedded CLI is installed first.

func RuntimePath

func RuntimePath() (string, error)

RuntimePath returns the installed copilot-runtime executable, or "" when the application bundle predates the out-of-process runtime pair. Installation failures are returned to the caller.

func Setup

func Setup(cfg Config)

Types

type Config

type Config struct {
	Cli     io.Reader
	CliHash []byte

	License []byte

	RuntimeLib     io.Reader
	RuntimeLibHash []byte

	RuntimeExecutable     io.Reader
	RuntimeExecutableHash []byte
	RuntimeNode           io.Reader
	RuntimeNodeHash       []byte
	RuntimeAssets         io.Reader
	RuntimeAssetsHash     []byte

	// LinuxMuslCli and LinuxMuslRuntimeLib are optional alternatives selected
	// automatically when the application runs on a musl-based Linux system.
	LinuxMuslCli                   io.Reader
	LinuxMuslCliHash               []byte
	LinuxMuslRuntimeLib            io.Reader
	LinuxMuslRuntimeLibHash        []byte
	LinuxMuslRuntimeExecutable     io.Reader
	LinuxMuslRuntimeExecutableHash []byte
	LinuxMuslRuntimeNode           io.Reader
	LinuxMuslRuntimeNodeHash       []byte
	LinuxMuslRuntimeAssets         io.Reader
	LinuxMuslRuntimeAssetsHash     []byte

	Directory string
	Version   string
}

Config defines the inputs used to install and locate the embedded Copilot CLI.

Cli and CliHash are required. If Directory is empty, the CLI is installed into the per-user cache directory or a protected fallback cache. When Version is set, the CLI is installed into a version-specific child directory so multiple versions can coexist. License, when provided, is written next to the installed binary.

RuntimeExecutable and RuntimeNode form the adjacent out-of-process runtime pair. RuntimeAssets is a filtered release package archive containing auxiliary binaries and resources. RuntimeLib is the same cdylib bytes installed under the natural platform name for the optional in-process transport.

Jump to

Keyboard shortcuts

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