Documentation
¶
Index ¶
- Constants
- Variables
- func AcceptWorkerReceipt(ctx context.Context, receipt any, updateID *string) error
- func Activate(ctx context.Context, allowIncomplete bool) ([]string, error)
- func ActivateDependencies(ctx context.Context, projectRoot string) error
- func ActivationEnvironment(ctx context.Context, projectRoot string) ([]string, error)
- func AllPackages() []string
- func AnchorImportable(ctx context.Context, anchor string) bool
- func AnchorSitePackages(ctx context.Context, anchor string) []string
- func ApplicableRequirements(specs []string) ([]string, error)
- func ArgparseWidth() int
- func Available(ctx context.Context, extra string) (bool, error)
- func BaseEnvironment(env map[string]string) (map[string]string, error)
- func BaseVenv(projectRoot string) (string, error)
- func Bash(ctx context.Context) (string, error)
- func BestInMinor(versions []string, minor Minor) (string, bool)
- func BinaryInstall() bool
- func BridgedIndexSettings(ambient map[string]string, sitePrefix string) (map[string]string, error)
- func BtbnIndex() (map[string]map[string][2]string, error)
- func BtbnVersions(target string) ([]string, error)
- func CLICommandName(projectRoot string) (string, error)
- func CanonicalDefaultName(name string) string
- func CanonicalizeName(name string) string
- func CarriedExtras(ctx context.Context, p StatePackage, recorded []string) ([]string, error)
- func Check(ctx context.Context, includeVenv bool) ([]string, error)
- func CheckProjectLock(ctx context.Context, opts CheckProjectLockOptions) error
- func CheckoutGitDir(root string) (string, error)
- func CheckoutPlaces(paths ...string) []string
- func ClassifyUVFailure(stage string, code int, output string) error
- func CmdDoctor(ctx context.Context, repair bool) (int, error)
- func CmdEnv(ctx context.Context, names []string) (int, error)
- func CmdEnvironment(ctx context.Context, args EnvironmentArgs) (int, error)
- func CmdGC(ctx context.Context) (int, error)
- func CmdInstall(ctx context.Context, args InstallArgs) (int, error)
- func CmdLock(ctx context.Context, args LockArgs) (int, error)
- func CmdRepair(ctx context.Context) (int, error)
- func CmdStatus(ctx context.Context) (int, error)
- func CmdUpdate(ctx context.Context, args UpdateArgs, out io.Writer) (int, error)
- func CmdUpdateArgs(ctx context.Context, args UpdateArgs) (int, error)
- func CollectGenerations(ctx context.Context, project string, minAge time.Duration) ([]string, error)
- func CollectOrphanInstallStates(installs string) ([]string, error)
- func CollectPartials(root string, graceSeconds float64) error
- func CollectSupersededGenerations(ctx context.Context, projectRoot string) error
- func CommandArgv(argv []string) ([]string, error)
- func CommittedVenv(ctx context.Context, projectRoot string) (string, error)
- func CompareVersionKeys(a, b []versionKeyPart) int
- func ComposeEnv(diffs []EnvDiff, base map[string]string) map[string]string
- func ContinueLegacyPostSwap(ctx context.Context, handoffPath string, argvTail []string) (int, error)
- func Copies(ctx context.Context, dirs []string) ([]string, error)
- func CoreRequirementError(ctx context.Context, declaration *PythonDeclaration) (string, error)
- func CorruptCacheEntries(cache string) map[string][]string
- func CorruptCachedPackages(cache string) map[string]bool
- func CurrentTarget() (string, error)
- func DebDataTar(name, archive string) ([]byte, error)
- func DeclineExtras(ctx context.Context, names []string) error
- func Declined(ctx context.Context, projectRoot string) (map[string]bool, error)
- func DeclinedExtrasPath(ctx context.Context, projectRoot string) string
- func DeclinedPath(ctx context.Context, projectRoot string) string
- func DefaultPackageNames() []string
- func DefaultPackages(ctx context.Context, names []string, target string, ...) ([]string, error)
- func DependencyHomeRoot(ctx context.Context) string
- func DependencyHomes(ctx context.Context) ([]string, error)
- func DigestMatches(root string, recorded *string) (bool, error)
- func DistInstalled(req, site string) (installed, known bool)
- func DroppableExtras(projectRoot string) ([]string, error)
- func DunderVersion() string
- func DurableWriteBytes(path string, data []byte) error
- func EdgeBlock(err error) string
- func EnabledMemberDirs(ctx context.Context, selection MemberSelection) ([]string, error)
- func EnabledPluginDirs(ctx context.Context, opts EnabledPluginsOptions) ([]string, error)
- func EncodePluginInput(p PluginInput) map[string]any
- func EnsureEnvironment(ctx context.Context, opts EnsureEnvironmentOptions) (string, error)
- func EnsureExtra(ctx context.Context, name string, opts ExtraOptions) (string, error)
- func EnsureExtrasEnvironment(ctx context.Context, name string, extras []string, out io.Writer) (string, error)
- func EnsureInstallLaunchers(ctx context.Context, repoRoot, outDir string) ([]string, error)
- func EnsureProjectRootOnPath()
- func EnsurePythonTool(ctx context.Context, opts EnsurePythonToolOptions) (string, error)
- func EnsureRuntimeEnvironment(ctx context.Context, opts RuntimeEnvironmentOptions) (string, error)
- func EnsureToolsForSync(ctx context.Context) error
- func EntryPointCount() int
- func EnvFor(names []string, base map[string]string) map[string]string
- func EnvList(env map[string]string) []string
- func EnvironmentPython(name, root string) (string, bool, error)
- func EnvironmentRuntimeFactsPath(ctx context.Context, projectRoot string) string
- func EnvironmentStoreRoot(ctx context.Context, projectRoot string, honorRuntimeOverride bool) (string, error)
- func ErrorClass(err error) string
- func ExeIsVenvBound(exe, venvDir string) bool
- func ExposeOnPathDisabled(ctx context.Context) (bool, error)
- func ExtraInterpreter(ctx context.Context, name string) (string, bool)
- func ExtraKey(name string) string
- func ExtraProvisioned(ctx context.Context, name string) bool
- func ExtraPythonCommand(ctx context.Context, name string) ([]string, error)
- func ExtraSitePackages(ctx context.Context, name string) (string, bool)
- func ExtraSupported(ctx context.Context, extra string) (bool, error)
- func ExtraSupportedIn(ctx context.Context, extra string, environment map[string]string, ...) (bool, error)
- func Extract(archive, dest string) error
- func ExtractTar(r io.ReadSeeker, dest string) error
- func ExtractTarFile(archive, dest string) error
- func ExtrasLockPath(root string) string
- func ExtrasRoot(ctx context.Context) string
- func FactsPath(ctx context.Context) (string, error)
- func FailedCachedPackages(output string) map[string]bool
- func FileDigest(path string) (string, bool, error)
- func FinalizeReceipt(ctx context.Context, outcome string, exitCode int, token *ReceiptToken) string
- func FlattenSingleDir(dest string) error
- func GetText(url string, headers map[string]string) (string, error)
- func GitArgvBytes(cmdline []byte) []string
- func GitNeverLocks(sub string) bool
- func GitProgram(arg0 string) string
- func GitSubcommandOf(cmdline []string) string
- func GitWorksIn(args []string, cwd string, env map[string]string, places []string) bool
- func GithubReleaseTags(repo, stripPrefix string) ([]string, error)
- func HashURL(rawURL string) (string, error)
- func ImportPathEntries() []string
- func IndexLockHolder(gitDir, root string) string
- func InstallConfiguredFeaturesMissingDeps(ctx context.Context, projectRoot string) error
- func InstallHint(extra string) string
- func InstallKey(projectRoot string) string
- func InstallLibatomicBeforeLock(ctx context.Context)
- func InstallNodeSidecar(ctx context.Context, pluginDir string, explicit bool) string
- func InstallPackage(ctx context.Context, p Package, lockfile *Lockfile, facts *Facts, store *Store, ...) (string, error)
- func InstallRoot() string
- func InstallRuntimeCommand(repoRoot string, args []string, opts LaunchCommandOptions) []string
- func InstallStampPath(projectRoot string) string
- func InstallStateDir(ctx context.Context, projectRoot string) string
- func InstallStatePermissionMessage(ctx context.Context, projectRoot string, err error) string
- func InstallationCommand(repoRoot string, args []string, opts LaunchCommandOptions) []string
- func InstallsRoot(ctx context.Context) string
- func InterruptedPullMarkerPath(root string) (string, error)
- func IronProxyAllowlistedEnv() map[string]string
- func IsDownloadKind(err error, kind DownloadErrorKind) bool
- func IsForwarded(key string) bool
- func IsIndexRedirect(key string) bool
- func IsInstalled(ctx context.Context, name string) (bool, error)
- func IsJunction(path string) bool
- func IsSealedTree(projectRoot string) (bool, error)
- func IsTransient(err error) bool
- func KnownExtras() []string
- func LastCompletedObject(ctx context.Context) *pyjson.Object
- func LastForUpdate(ctx context.Context, updateID string, consume bool) map[string]any
- func LastForUpdateObject(ctx context.Context, updateID string, consume bool) *pyjson.Object
- func LatestReceipt(ctx context.Context) map[string]any
- func LauncherBinary(target string) string
- func LauncherStart(repoRoot string, args []string) ([]string, bool)
- func LaunchersMain(ctx context.Context, repoRoot string, argv []string, stdout, stderr io.Writer) int
- func LazyInstallsAllowed() bool
- func LazyInstallsAllowedFor(ctx context.Context) bool
- func LeaseDirectory(generation string) (func(), error)
- func LeaseGeneration(environment string) (func(), error)
- func LeasesHeld(generation string) (bool, error)
- func LegacyPostSwapInvocation(argv []string) (string, []string, bool)
- func LegacySelection(ctx context.Context, projectRoot string) ([]string, error)
- func LiveCheckoutUnderTest(root string) bool
- func LlamaAppBucketVersions() []string
- func LlamaAppLatest() (string, bool)
- func LoadPackageDefinitions(definitions []PackageDefinition) error
- func LockAndSync(ctx context.Context, pluginDirs []MemberDir, extras []string, ...) error
- func LockFD(f *os.File, wait bool, timeout time.Duration) (bool, error)
- func LockPath(path string, timeout time.Duration, createDir bool) (*os.File, error)
- func LockProject(ctx context.Context, opts LockProjectOptions) error
- func LockUsageError(args LockArgs) string
- func LockfilePath() string
- func LongRoot(path string) string
- func MachineMatchesBinary(bin, target string) (match bool, known bool)
- func Main(ctx context.Context, command func(context.Context) (int, error)) (code int, err error)
- func ManagerLinked() bool
- func ManifestVersionError(manifest map[string]any, name string) (string, error)
- func MarkerOwnerIsLive(marker string) (bool, error)
- func MartinRiedlIndex() map[string]map[string]string
- func MartinRiedlVersions(target string) []string
- func MembersStamp(pluginDirs []MemberDir) (string, error)
- func MergeTree(src, dst string) error
- func MissingCompilerRemedy(output string) string
- func MustRegister(p Package)
- func NPMRegistry(env map[string]string) string
- func NPMRegistryURL(rawURL string, env map[string]string) string
- func Native(path string) string
- func NativeManifestFile(pluginDir string) (string, error)
- func NativeManifestFileFS(tree fs.FS, pluginDir string) (string, error)
- func NodeLatestVersions() ([]string, error)
- func NormalizePackageName(name string) string
- func NpmDistTags(name string) (map[string]any, error)
- func NpmEnv(cacheDir string, base map[string]string) map[string]string
- func OverriddenVersions(lock string) (map[string]map[string]bool, error)
- func OverrideCoreRepo(root string) (restore func())
- func OverridePublicationWrite(fn func(path string, data []byte) error) (restore func())
- func OverrideUVToolchain(uv, python string) (restore func())
- func OwningHomeRoot(ctx context.Context, projectRoot string) string
- func OwnsLauncher(target, root string) bool
- func OwnsUserPath(root string) bool
- func PackageOf(rawURL string) (string, error)
- func ParseRequirement(text string) (*pyRequirement, error)
- func ParseTermuxIndex(text string) map[string]PoolPackage
- func PartialLock(root, key string, cancelled func() bool, wait bool) (release func(), acquired bool, err error)
- func PartialsRoot() string
- func PatchRepoRoot(dir string) func()
- func PayloadCommandDir(projectRoot string) (string, error)
- func PayloadVenv(projectRoot string) (string, error)
- func PbsVersions(minor, triple string) ([]string, error)
- func PinLauncherHome()
- func PinnedBuildDefaults(python string, env map[string]string) (map[string]string, error)
- func PinnedPythonFullVersion() (string, error)
- func PinnedPythonVersion() (major, minor string, err error)
- func PipConfIndexURL(env map[string]string, sitePrefix string) (string, error)
- func PipConfigCandidates(env map[string]string, sitePrefix string) []string
- func PluginSpellings(pluginDir, key string) (map[string]bool, error)
- func PoolAssetName(rawURL, sha string) string
- func PrepareWindowsEnvironment(source, state string, env map[string]string) (map[string]string, error)
- func ProbeReason(bin string, exitCode int, stdout, stderr []byte) string
- func ProjectPython(ctx context.Context, projectRoot string) (string, error)
- func ProjectVenvDir(root string) (string, error)
- func PruneSitePth(venv string)
- func PublishLaunchers(ctx context.Context, projectRoot string, create bool) error
- func PythonTool(name, executable, root string) (string, bool, error)
- func ReadBytesOrNone(path string) ([]byte, bool, error)
- func ReadGitRevisionFingerprint(repoRoot string) (string, bool)
- func ReadHomeSelection(ctx context.Context, homeDir string) (map[string]any, error)
- func ReadInstallStamp(projectRoot string) *pyjson.Object
- func ReadNativeManifest(path string) (map[string]any, error)
- func ReadNativeManifestFS(tree fs.FS, name string) (map[string]any, error)
- func RecordDeclined(ctx context.Context, add, remove []string, projectRoot string) (map[string]bool, error)
- func RecordFeatureList(ctx context.Context, extras []string)
- func RecordPluginChecks(ctx context.Context, results []any)
- func RecordRefusal(ctx context.Context, code, detail string)
- func RecordStep(ctx context.Context, name string, ok bool, detail string)
- func RecordVenvRebuild(ctx context.Context, ok bool, reason string)
- func RecordWarning(ctx context.Context, message string)
- func RecoverIfNeeded(ctx context.Context, projectRoot string, argv []string, explicit bool) (bool, error)
- func RefreshDependencies(ctx context.Context, projectRoot string) (string, error)
- func Register(p Package) error
- func RelayVenv(ctx context.Context) string
- func ReleaseAllLeases()
- func ReleaseAssetURL(name string) string
- func ReleaseDeadLock(lock, root string, anyGit bool) (bool, error)
- func RemoveCorruptEntries(cache string, names map[string]bool) error
- func RemoveExtra(ctx context.Context, name string) error
- func RemoveTree(path string) error
- func RepairDependencies(ctx context.Context, projectRoot string) error
- func RepairTermuxPins(table *OrderedObject, lockfile *Lockfile, stale []Retired, ...) (int, error)
- func RepoRoot() string
- func RequirementAppliesHere(ctx context.Context, req string) bool
- func RequirementDistName(req string) string
- func ResolveInstallBinary(root string) string
- func RetryHeld(operation func() error) error
- func RetryNetwork[T any](operation func() (T, error), opts RetryOptions) (T, error)
- func ReuseIndexResponses[T any](operation func() (T, error)) (T, error)
- func RunContained(cmd *exec.Cmd, label string, opts ContainOptions) (string, error)
- func RunningFromSelectedEnvironment(ctx context.Context, projectRoot string) (bool, string, error)
- func RuntimeEnvironment(ctx context.Context) (map[string]string, error)
- func RuntimeEnvironmentReady(ctx context.Context) (string, bool, error)
- func RuntimeFactsPath(ctx context.Context) string
- func RuntimeLock(ctx context.Context, project string, timeout time.Duration) (held bool, release func(), err error)
- func RuntimeSetStore(venv string) string
- func SaveTermuxTable(table *OrderedObject, path string) error
- func Sealed(ctx context.Context) (bool, error)
- func SealedDirs(ctx context.Context, name string) ([]string, error)
- func SelectedPluginDir(pluginsDir, name, installing string) (string, error)
- func SelectedSitePackages(ctx context.Context) (string, error)
- func SelectedVenv(ctx context.Context, projectRoot string) (string, error)
- func ServeWorker(ctx context.Context, controls io.ReadCloser, wire io.Writer) error
- func SetBuildTag(version string)
- func SetCommandArgv(split func([]string) []string)
- func SetPluginManifestHost(host *PluginManifestHost)
- func SetUpdateLockHooks(hooks UpdateLockHooks)
- func SetUpdateReceiptHooks(hooks UpdateReceiptHooks)
- func ShouldSkipExternalSecretSources() bool
- func SignManagedPython(python string) bool
- func SitePackages(venv string) (string, error)
- func SourceInstallPackages(names []string) ([]string, error)
- func SpecifierSetAdmits(spec, version string) (admits, invalid bool, err error)
- func StageLauncher(ctx context.Context, name, root, outDir string) (string, error)
- func StopForRelaunchIncomplete(ctx context.Context) error
- func StoreFirstPath(ctx context.Context, path string) (string, error)
- func StorePathDirs(ctx context.Context) ([]string, error)
- func StoreRoot(ctx context.Context) (string, error)
- func SwapAnchorImportable(fn func(ctx context.Context, anchor string) bool) func(ctx context.Context, anchor string) bool
- func SwapCountsAsHolder(fn func(args []string, anyGit bool) bool) func(args []string, anyGit bool) bool
- func SwapExposeCLI(...) ...
- func SwapInstallCommandSteps(steps InstallCommandSteps) func()
- func SwapLockRunner(...) ...
- func SwapLockWhich(fn func(name string) (string, bool)) func(name string) (string, bool)
- func SwapLockfilePath(fn func() string) func() string
- func SwapPlatformGates(gates map[string]string) map[string]string
- func SwapPublishOwnLaunchers(fn func(ctx context.Context, repoRoot, outDir string) ([]string, error)) func(ctx context.Context, repoRoot, outDir string) ([]string, error)
- func SwapToolchain(fn func(context.Context, bool, bool) (string, string, bool, error)) func(context.Context, bool, bool) (string, string, bool, error)
- func SwapUpdateResolution(resolve func(Package, []string, *string, map[string]any) (*Resolved, error), ...) func()
- func SyncOutput(ctx context.Context) io.Writer
- func SyncVenv(ctx context.Context, opts SyncVenvOptions) error
- func TermuxTablePath() string
- func ToolRoots(names []string) ([]string, error)
- func Toolchain(ctx context.Context, realize, explicit bool) (uv, python string, found bool, err error)
- func TreeDigest(root string) (string, error)
- func TryInstallLibatomic(ctx context.Context) (bool, string)
- func UnexpectedIncompatibilities(report, lock string) ([]string, error)
- func UnlockFD(f *os.File)
- func UnpackDeb(name, archive, staged string) error
- func UnsupportedRequirements(specs []string) ([]string, error)
- func UpdateMechanisms() []string
- func UpdateRetryRecovered() bool
- func UserFacingApplies(ctx context.Context) (bool, error)
- func UserFacingPath(ctx context.Context, path string) (string, error)
- func UvCacheDir(ctx context.Context) (string, error)
- func UvCachePath() string
- func UvLauncher(ctx context.Context, name string) (string, error)
- func ValidateEnvironment(ctx context.Context, python string, argvPrefix []string, env map[string]string, ...) error
- func VenvBinDir(venv string, windows bool) string
- func VenvCommand(ctx context.Context, projectRoot, venv string, options []string) ([]string, error)
- func VenvIsCurrent(ctx context.Context, opts VenvIsCurrentOptions) (bool, error)
- func VenvPython(venv string) string
- func VenvPythonVersion(venv string) (major, minor string, ok bool, err error)
- func VerboseOutput(env map[string]string) bool
- func VersionKey(version string) []versionKeyPart
- func WindowsBashCandidates(onPath string, env map[string]string) []string
- func WindowsBinLaunchers() []string
- func WithCLIStderr(ctx context.Context, w io.Writer) context.Context
- func WithIcebathNodePath(env map[string]string) map[string]string
- func WithReceiptScope(ctx context.Context) context.Context
- func WithRuntimeStore(ctx context.Context, dir string) context.Context
- func WithUpdateCorrelation(ctx context.Context, provider func() string) context.Context
- func WorkerContext(ctx context.Context, updateID *string) func()
- func WorkerMain() int
- func WritableStoreRoot(ctx context.Context) (string, error)
- type ArgparseColors
- type Artifact
- type BasePackage
- func (b *BasePackage) Base() *BasePackage
- func (b *BasePackage) Binary(entry, target string) string
- func (b *BasePackage) BinaryReason(bin, entry, target string) string
- func (b *BasePackage) DepsOn(target string) []string
- func (b *BasePackage) Env(entry, target string) EnvDiff
- func (b *BasePackage) FetchURL(version, target string) (string, error)
- func (b *BasePackage) FetchURLs(version, target string) ([]string, error)
- func (b *BasePackage) KnownSHA256(version, url string) (string, error)
- func (b *BasePackage) LatestVersions(target, locked string) ([]string, error)
- func (b *BasePackage) MissingReason(target string) string
- func (b *BasePackage) OnPath() bool
- func (b *BasePackage) RepairStagedVerification(entry, target, reason string) (string, string)
- func (b *BasePackage) Stage(store *Store, staged, version, target string) error
- func (b *BasePackage) StoreEntry(version, target string) string
- func (b *BasePackage) Style() string
- func (b *BasePackage) Unpack(archive, staged, target string) error
- func (b *BasePackage) Verify(entry, target string) string
- type BinaryPackage
- type BuildEnvironmentOptions
- type BuildFailure
- type Bws
- type CalledProcessError
- type Candidates
- type CarriedFailure
- type CarriedTrial
- type CheckProjectLockOptions
- type Chromium
- func (p *Chromium) Binary(entry, target string) string
- func (p *Chromium) CheckEnv(entry, target string) error
- func (p *Chromium) Env(entry, target string) EnvDiff
- func (p *Chromium) FetchURL(version, target string) (string, error)
- func (p *Chromium) Stage(store *Store, staged, version, target string) error
- func (p *Chromium) StoreEntry(version, target string) string
- func (p *Chromium) Verify(entry, target string) string
- type ConfiguredFeatureGap
- type ContainOptions
- type CuaDriver
- type DebMain
- type DebPackage
- type DestinationExistsError
- type DistributionPin
- type Download
- type DownloadError
- type DownloadErrorKind
- type DownloadOptions
- type DriftReport
- type EnabledPluginsOptions
- type EnsureEnvironmentOptions
- type EnsureOptions
- type EnsurePythonToolOptions
- type EntryPoint
- type EnvChecker
- type EnvDiff
- type EnvironmentArgs
- type EvictingSync
- type ExposeResult
- type ExtraEntry
- type ExtraOptions
- type ExtraSource
- type ExtraState
- type FactRecord
- type Facts
- func (f *Facts) EntriesInUse() map[string]bool
- func (f *Facts) EnvFor(name, storeRoot string) EnvDiff
- func (f *Facts) Forget(names []string) error
- func (f *Facts) Get(name string) (map[string]any, bool)
- func (f *Facts) Installed(name string, expectedVersion *string, storeRoot string, ...) bool
- func (f *Facts) Record(name, version, entry string, env EnvDiff, storeRoot string, extra FactRecord) error
- func (f *Facts) RecordState(name, stamp string, extras []string, environment, resolvedLock string) error
- func (f *Facts) Reload() error
- func (f *Facts) Retain(names map[string]bool) error
- type Ffmpeg
- func (t *Ffmpeg) Binary(entry, target string) string
- func (t *Ffmpeg) DebPackageName() string
- func (p *Ffmpeg) FetchURL(version, target string) (string, error)
- func (p *Ffmpeg) LatestVersions(target, locked string) ([]string, error)
- func (t *Ffmpeg) MainRel(target string) string
- func (t *Ffmpeg) Stage(store *Store, staged, version, target string) error
- func (t *Ffmpeg) Unpack(archive, staged, target string) error
- func (t *Ffmpeg) Verify(entry, target string) string
- type Gh
- type Git
- type HTTPError
- type HomePlugins
- type Identity
- type IncompleteReadError
- type InstallArgs
- type InstallCommandSteps
- type InstallError
- type InstallPackageOptions
- type InstallProgress
- type InstalledPackage
- type InvalidMarkerError
- type InvalidRequirementError
- type IronProxy
- type JSONRecord
- type LaunchCommandOptions
- type LiveTail
- type LlamaCpp
- func (p *LlamaCpp) FetchURL(version, target string) (string, error)
- func (p *LlamaCpp) FetchURLs(version, target string) ([]string, error)
- func (p *LlamaCpp) KnownSHA256(version, url string) (string, error)
- func (p *LlamaCpp) LatestVersions(target, locked string) ([]string, error)
- func (p *LlamaCpp) MissingReason(target string) string
- func (p *LlamaCpp) Stage(store *Store, staged, version, target string) error
- func (p *LlamaCpp) Unpack(archive, staged, target string) error
- type Location
- type LocationOptions
- type LockAndSyncOptions
- type LockArgs
- type LockHold
- type LockProjectOptions
- type LockedFile
- type LockedPackage
- type Lockfile
- func (l *Lockfile) Artifacts(name, target string) []map[string]any
- func (l *Lockfile) Names() []string
- func (l *Lockfile) PinnedArtifacts(name string) map[string]any
- func (l *Lockfile) Save() error
- func (l *Lockfile) SetPin(name, version string, artifacts map[string]any)
- func (l *Lockfile) Version(name string) (string, bool)
- type ManagedEnvironmentOptions
- type ManagerAbsentError
- type MemberDir
- type MemberSelection
- type Members
- type Minor
- type NoCommittedEnvironment
- type Nodejs
- func (t *Nodejs) Binary(entry, target string) string
- func (t *Nodejs) DebPackageName() string
- func (p *Nodejs) FetchURL(version, target string) (string, error)
- func (p *Nodejs) LatestVersions(target, locked string) ([]string, error)
- func (t *Nodejs) MainRel(target string) string
- func (p *Nodejs) RepairStagedVerification(entry, target, reason string) (string, string)
- func (t *Nodejs) Stage(store *Store, staged, version, target string) error
- func (t *Nodejs) Unpack(archive, staged, target string) error
- func (t *Nodejs) Verify(entry, target string) string
- type Npm
- type OrderedObject
- type Package
- type PackageDefinition
- type ParserSyntaxError
- type PauseEvent
- type Pin
- type PinMismatchError
- type PluginEntry
- type PluginEviction
- type PluginInput
- type PluginManifestHost
- type PluginSelection
- type PoolPackage
- type ProgressFunc
- type ProvenanceVerifier
- type PyError
- type Python
- func (t *Python) Binary(entry, target string) string
- func (t *Python) DebPackageName() string
- func (p *Python) FetchURL(version, target string) (string, error)
- func (p *Python) LatestVersions(target, locked string) ([]string, error)
- func (t *Python) MainRel(target string) string
- func (p *Python) Stage(store *Store, staged, version, target string) error
- func (t *Python) Unpack(archive, staged, target string) error
- func (p *Python) Verify(entry, target string) string
- type PythonDeclaration
- type PythonEnvironment
- func (e *PythonEnvironment) Check(ctx context.Context, lock string) error
- func (e *PythonEnvironment) CheckLock(ctx context.Context, source string) error
- func (e *PythonEnvironment) Create(ctx context.Context) error
- func (e *PythonEnvironment) Executable() string
- func (e *PythonEnvironment) Lock(ctx context.Context, source string, upgrade bool, timeout time.Duration) error
- func (e *PythonEnvironment) PurgeCachedPackages(ctx context.Context, names []string) error
- func (e *PythonEnvironment) Sync(ctx context.Context, source string, opts SyncOptions) error
- type Range
- type RangeSet
- type ReceiptToken
- type RemoteDisconnectedError
- type ResolutionConflict
- type Resolved
- type Retired
- type RetryOptions
- type Ripgrep
- type Runner
- type RuntimeEnvironmentOptions
- type RuntimeRequirement
- type RuntimeSet
- type RuntimeUnprovisioned
- type Selection
- type SelectionCommit
- type SignedBinary
- type Source
- type StageOnlyOptions
- type StagedPlugin
- type StagedUpdate
- type StaleLockRowError
- type StatePackage
- type Store
- func (s *Store) Entry(name string) string
- func (s *Store) Fetch(rawURL, sha, scratch string, progress func(done, total int64) error, ...) (string, error)
- func (s *Store) FetchMany(artifacts []Artifact, scratch string, progress ProgressFunc, pause *PauseEvent) ([]string, error)
- func (s *Store) InstallLock() (func(), error)
- func (s *Store) Publish(staged, name string) (string, error)
- func (s *Store) Published(name string) bool
- func (s *Store) Scratch() (string, func(), error)
- type SyncOptions
- type SyncVenvOptions
- type SystemExit
- type TOMLDecodeError
- type TarFilterError
- type TarReadError
- type TargetCandidates
- type TargetVersion
- type UndefinedMarkerError
- type UnknownPackageError
- type UpdateArgs
- type UpdateLockHooks
- type UpdateReceiptHooks
- type Uv
- func (t *Uv) Binary(entry, target string) string
- func (t *Uv) DebPackageName() string
- func (p *Uv) FetchURL(version, target string) (string, error)
- func (p *Uv) LatestVersions(target, locked string) ([]string, error)
- func (t *Uv) MainRel(target string) string
- func (t *Uv) Stage(store *Store, staged, version, target string) error
- func (t *Uv) Unpack(archive, staged, target string) error
- func (t *Uv) Verify(entry, target string) string
- type Venv
- func (v *Venv) Apply(extras []string, explicit bool) error
- func (v *Venv) ExpectedStamp(extras []string) (string, error)
- func (v *Venv) Prepare(ctx context.Context, extras []string, opts VenvApplyOptions) (*VenvGeneration, error)
- func (v *Venv) ProjectRoot() string
- func (v *Venv) Stamp(ctx context.Context, extras []string, pluginDirs []MemberDir) (string, error)
- func (v *Venv) VenvDir(ctx context.Context) (string, error)
- type VenvApplyOptions
- type VenvGeneration
- type VenvIsCurrentOptions
- type VenvState
- type Wheel
- type WhisperCppCpu
- type WritableCopyOptions
Constants ¶
const DeclinedExtrasFilename = "declined-extras.json"
DeclinedExtrasFilename is the record of extras dropped with install without
const DeclinedFilename = "declined-packages.json"
DeclinedFilename records the default packages a user opted out of
const DefaultConnections = 8
DefaultConnections is the parallel range limit of one download
const DisabledByUpdateRecord = "disabled_by_update"
Plugins config key mapping each plugin an update disabled to what to undo once it fits
const EnvDisableLazyInstalls = "ICEBATH_DISABLE_LAZY_INSTALLS"
Environment variable the docker image and hermetic harness set to turn lazy installs off
const EnvInstallRoot = "ICEBATH_INSTALL_ROOT"
EnvInstallRoot names the tree whose install stamp a steward wrapper keeps outside the binary dir
const EnvRuntimeDir = "ICEBATH_RUNTIME_DIR"
EnvRuntimeDir points a running process at a non default tool store
const GCGraceSeconds = 6 * 60 * 60
GCGraceSeconds is how long an untouched partial survives collection
const ImportHealthEntry = "import-health"
Hidden entry an update's import health probe starts the install binary on, an update process for its dotenv load
const InstallLockTimeout = 10 * time.Second
InstallLockTimeout is how long a reader of install state waits for a writer before skipping
const InterruptedPullMarker = "icebath-update-pull"
File an interrupted checkout fast forward leaves in the git dir until its move is repaired
const LegacyAgentEntry = "__icebath_run_agent__"
LegacyAgentEntry is the argv entry that runs the legacy single query runner the icebath-agent command opens
const LockSchema = 1
LockSchema is the schema number of lock.json and facts.json
const MaxLine = 4096
MaxLine bounds one unterminated line, its end being the informative part
const NPMPublicRegistry = "https://registry.npmjs.org/"
NPMPublicRegistry is the registry lock.json records npm tarballs against
const PinDefaultHomeFlag = "--icebath-pin-default-home"
Hidden root flag pinning ICEBATH_HOME when unset, to its value or else to the install's default root
const RetryDownloadRemedy = "check that this machine reaches the address in the error, through its proxy when it uses one, then run the same command again"
RetryDownloadRemedy is the remedy of a download the network or its proxy refused
const StoreToken = "{{store}}"
StoreToken stands for the store root inside recorded env values
const TailLines = 80
TailLines is how many output lines a failure prints
const TermuxIndexURL = TermuxPool + "dists/stable/main/binary-aarch64/Packages"
TermuxIndexURL is the pool's aarch64 package index
const TermuxPool = "https://packages.termux.dev/apt/termux-main/"
TermuxPool is the Termux main package pool the bionic pins come from
const TermuxTableName = "termux_runtime_libs.json"
TermuxTableName is the runtime library pin table beside this package
const TimeoutHint = "uv timed out. If your network needs a package mirror, set index-url in " +
"pip.conf (bridged to uv automatically) or UV_INDEX_URL; raise UV_HTTP_TIMEOUT " +
"for slow links."
TimeoutHint tells a user whose uv run timed out how to reach a mirror
const UndatedIndexHint = "the package index did not report upload times, which locking icebath's " +
"dependencies needs for its 3-day release-age check. Use https://pypi.org/simple " +
"or a mirror that serves upload times (pip.conf index-url / UV_INDEX_URL), then retry."
UndatedIndexHint is the remedy when the index omits upload times the release age check needs
const UserAgent = "Mozilla/5.0 (X11; Linux x86_64) icebath-pm/1.0"
UserAgent is a browser shaped agent every asset CDN accepts, with identity encoding requested
const WaitForever time.Duration = -1
WaitForever makes a lock wait without a deadline
const WindowsPython3 = "python3.exe"
POSIX interpreter name the pinned Windows Python also answers to
Variables ¶
var AllTargets = []string{
"win32-x64",
"win32-arm64",
"linux-x64",
"linux-arm64",
"linux-x64-musl",
"linux-arm64-musl",
"linux-arm64-bionic",
"darwin-x64",
"darwin-arm64",
}
AllTargets lists every platform target PM pins artifacts for
var Anchors = lockAnchors()
Anchors maps each extra the binary carries to the imports that prove it installed
var ConfiguredFeaturesMissingDeps func(ctx context.Context) []ConfiguredFeatureGap
Configured platforms whose adapter check fails, assigned by the gateway aware update code
var CuaDriverChildEnv func() (map[string]string, error)
Computer use driver child environment, set by the extras tier and nil in a build without computer use
var ForwardedUVSettings = map[string]bool{ "UV_INDEX_URL": true, "UV_EXTRA_INDEX_URL": true, "UV_DEFAULT_INDEX": true, "UV_INDEX": true, "UV_NO_INDEX": true, "UV_FIND_LINKS": true, "UV_INDEX_STRATEGY": true, "UV_KEYRING_PROVIDER": true, "UV_NATIVE_TLS": true, "UV_INSECURE_HOST": true, "UV_HTTP_TIMEOUT": true, }
ForwardedUVSettings are the uv index and transport settings that survive into uv
var IndexRedirectSettings = map[string]bool{ "UV_INDEX_URL": true, "UV_EXTRA_INDEX_URL": true, "UV_DEFAULT_INDEX": true, "UV_INDEX": true, "UV_NO_INDEX": true, "UV_FIND_LINKS": true, "UV_INDEX_STRATEGY": true, "UV_KEYRING_PROVIDER": true, }
IndexRedirectSettings redirect where packages resolve from and are stripped by no config isolation
var JunkNames = map[string]bool{".DS_Store": true, "Thumbs.db": true, "desktop.ini": true, ".localized": true}
JunkNames is inert desktop metadata that never decides a package's layout or digest
var LooksLikeGatewayCommandLine func(cmdline string) bool
Matches a gateway command line, installed by the gateway status port, nil failing closed
var MuslTargets = map[string]bool{"linux-x64-musl": true, "linux-arm64-musl": true}
MuslTargets are the native musl userland targets
var ProxySubprocessEnvAllowlist = []string{
"PATH", "HOME", "TMPDIR", "TZ", "LANG", "LC_ALL", "LC_CTYPE", "NO_COLOR", "SSL_CERT_DIR", "SSL_CERT_FILE", "SYSTEMROOT", "USERPROFILE",
}
ProxySubprocessEnvAllowlist is the infrastructure only environment an iron-proxy child may see
var RelayRuntimeSet = &RuntimeSet{extra: relayExtra}
Set the relay environment holds, provisioned only when Relay plugins are switched on
var ReplaceWhenReleased = func(tmp, dest string, timeout time.Duration) error { deadline := time.Now().Add(timeout) delay := 100 * time.Millisecond for { err := renameFile(tmp, dest) if err == nil { return nil } if !isAccessError(err) { return err } if !time.Now().Before(deadline) { return &chainedError{msg: fmt.Sprintf("The download finished, but another program (usually an antivirus scan) kept %s open and it could not be renamed into place. Please try again.", filepath.Base(tmp)), cause: err} } time.Sleep(delay) delay = min(delay*2, 2*time.Second) } }
Renames a finished download into place, riding out a transient hold until the timeout
var RetiredDefaults = map[string]string{"agent-browser": "chromium"}
RetiredDefaults carries an old default's opt out over to the package that replaced it
var StartupImports = [][3]string{
{"ruamel.yaml", "ruamel.yaml", "YAML"},
{"python-dotenv", "dotenv", "load_dotenv"},
{"click", "click", "Command"},
{"certifi", "certifi", "contents"},
{"rich", "rich", "print"},
{"cryptography", "cryptography.hazmat.bindings._rust", "openssl"},
{"PyJWT", "jwt", "encode"},
}
StartupImports are the distribution, module and attribute triples a dependency environment must import
var UserFacingCopied = []string{"npm", "node", "python"}
Packages whose packaged dirs a sealed Windows payload swaps for writable copies
Functions ¶
func AcceptWorkerReceipt ¶
Files a worker's finished receipt under its update id after checking the correlation
func Activate ¶
Puts the installed store's tool dirs at the front of the process PATH and returns the check problems
func ActivateDependencies ¶
Selects the committed generation at boot, leasing it and pointing child imports and PATH at it
func ActivationEnvironment ¶
Environment of the installed PM packages with the committed site packages
func AnchorImportable ¶
Reports whether an extra environment or the selected environment holds the module
func AnchorSitePackages ¶
Site packages of every provisioned extra that names the anchor among its imports
func ApplicableRequirements ¶
Index requirements only, direct URLs and the core project itself dropped with markers kept
func Available ¶
Reports every anchor of an extra importable here, false in a build that leaves the package manager out
func BaseEnvironment ¶
Environment without ambient interpreter, project and cache selection, index and transport settings kept
func BaseVenv ¶
Payload environment, then the checkout's in tree venv, then the venv path a first install creates
func BestInMinor ¶
Highest version whose major and minor match, ok false when none does
func BinaryInstall ¶
func BinaryInstall() bool
Whether this install is the binary alone, its plugin Python environment built only for a selection declaring packages
func BridgedIndexSettings ¶
Uv index and transport settings the ambient environment asks for, pip knobs translated
func BtbnVersions ¶
Release versions with a supported BtbN asset for a target, in index order
func CLICommandName ¶
Name a person types to run this install's CLI, a channel build's qualified launcher name included
func CanonicalDefaultName ¶
Current name of a default package, a retired name mapping to its successor
func CanonicalizeName ¶
Normalizes a project or extra name like packaging canonicalize_name
func CarriedExtras ¶
Recorded extras a sync carries forward, still declared and not dropped with install without
func CheckProjectLock ¶
func CheckProjectLock(ctx context.Context, opts CheckProjectLockOptions) error
Checks a project lock is current
func ClassifyUVFailure ¶
Classified error of a failed uv stage, a resolver conflict, a build failure or a plain install error
func CmdDoctor ¶
Checks every locked package's installed state, verification and digest, then the uv cache
func CmdEnvironment ¶
func CmdEnvironment(ctx context.Context, args EnvironmentArgs) (int, error)
Makes a named side environment current and prints only its interpreter on stdout
func CmdInstall ¶
func CmdInstall(ctx context.Context, args InstallArgs) (int, error)
Installs the tool closure then the venv, the optional defaults last, recording the owning checkout for a full closure
func CmdUpdate ¶
Runs pm update, re-pinning changed packages unless checking, the termux pool pass running on its own
func CmdUpdateArgs ¶
func CmdUpdateArgs(ctx context.Context, args UpdateArgs) (int, error)
CmdUpdateArgs runs pm update, the driver living in update.go
func CollectGenerations ¶
func CollectGenerations(ctx context.Context, project string, minAge time.Duration) ([]string, error)
Removes unselected lease managed generations older than minAge whose readers have exited
func CollectOrphanInstallStates ¶
Removes every unheld orphan state dir under installs, rechecking each under its lock, and returns them
func CollectPartials ¶
Removes unowned partial pairs older than the grace period, skipping any a downloader owns
func CollectSupersededGenerations ¶
Collects the dependency generations a publish superseded, never failing the committed update
func CommandArgv ¶
Command words of argv as the registered CLI parser splits them, global options removed
func CommittedVenv ¶
Environment PM committed for the install or a sealed payload's own, never the pre PM in tree venv
func CompareVersionKeys ¶
func CompareVersionKeys(a, b []versionKeyPart) int
Orders two version keys the way Python compares their tuples
func ComposeEnv ¶
Composes package env diffs over base, dependents winning and PATH dirs prepended in their order
func ContinueLegacyPostSwap ¶
func ContinueLegacyPostSwap(ctx context.Context, handoffPath string, argvTail []string) (int, error)
Finishes a shipped updater's post swap hand off in a takeover child and returns the child's status
func Copies ¶
Dirs with each packaged npm, node and python dir swapped for its writable copy on a sealed Windows payload
func CoreRequirementError ¶
func CoreRequirementError(ctx context.Context, declaration *PythonDeclaration) (string, error)
Why an applicable icebath-agent requirement of the declaration rejects the running icebath, empty when none does
func CorruptCacheEntries ¶
Unpacked cache entries uv cannot install from, package to archive entry names, read only
func CorruptCachedPackages ¶
Packages with at least one corrupt unpacked cache entry
func CurrentTarget ¶
Platform target of this host, the libc flavour part of the triple
func DebDataTar ¶
The data tar of a deb, zstd payloads decompressed and lzma refused
func DeclineExtras ¶
Records install without for extras under the dependency lock so an in flight opt in cannot erase it
func Declined ¶
Declined default packages, a damaged record refusing rather than re adding a refused package
func DeclinedExtrasPath ¶
Declined extras record of an install, this binary's own tree when projectRoot is empty
func DeclinedPath ¶
Opt out record of an install, the binary's own tree when projectRoot is empty
func DefaultPackageNames ¶
func DefaultPackageNames() []string
Every package that may be declined, the default ones of any target
func DefaultPackages ¶
func DefaultPackages(ctx context.Context, names []string, target string, declinedNames map[string]bool) ([]string, error)
Optional defaults among the lockfile's names this install carries, skipping gaps and declined ones
func DependencyHomeRoot ¶
Data root dependency state is scoped to, the context home override's root when one is active
func DependencyHomes ¶
DependencyHomes exports the dependency home union for the plugin manager hooks of provider resolution
func DigestMatches ¶
Reports whether a tree matches a recorded digest, including one recorded before metadata was skipped
func DistInstalled ¶
Whether a distribution the requirement accepts is installed in a site directory, known false when it cannot be probed
func DroppableExtras ¶
Declared extras install without may drop, neither all nor anything all pulls in, every carried extra for a binary install
func DunderVersion ¶
func DunderVersion() string
Install stamp base version of the repo checkout, 0.0.0 when the stamp has none
func DurableWriteBytes ¶
Replaces path atomically and fsyncs file and directory so a crash leaves either old or new bytes
func EdgeBlock ¶
Explains a 403 or 429 that a CDN firewall sent instead of the server, empty otherwise
func EnabledMemberDirs ¶
func EnabledMemberDirs(ctx context.Context, selection MemberSelection) ([]string, error)
Selected plugins that install packages, misfits sitting out and a too new manifest refused
func EnabledPluginDirs ¶
func EnabledPluginDirs(ctx context.Context, opts EnabledPluginsOptions) ([]string, error)
Effective plugin selection as distinct plugin trees for the plugin installer
func EncodePluginInput ¶
func EncodePluginInput(p PluginInput) map[string]any
JSON form of a plugin input for the worker request, paths made absolute
func EnsureEnvironment ¶
func EnsureEnvironment(ctx context.Context, opts EnsureEnvironmentOptions) (string, error)
Selects a complete isolated dependency generation, retaining the previous one
func EnsureExtra ¶
Provisions an extra in this process with progress on the output, the step a user switching its feature on runs
func EnsureExtrasEnvironment ¶
func EnsureExtrasEnvironment(ctx context.Context, name string, extras []string, out io.Writer) (string, error)
Side environment NAME holding the pinned packages of the named extras, the pm environment extra mode of a binary install
func EnsureInstallLaunchers ¶
Publishes the install's own commands then conveniences in outDir, empty when any own command failed
func EnsureProjectRootOnPath ¶
func EnsureProjectRootOnPath()
Puts the running tree first on the import path, dropping entries that resolve to the same tree
func EnsurePythonTool ¶
func EnsurePythonTool(ctx context.Context, opts EnsurePythonToolOptions) (string, error)
Installs an isolated Python tool and returns its validated executable
func EnsureRuntimeEnvironment ¶
func EnsureRuntimeEnvironment(ctx context.Context, opts RuntimeEnvironmentOptions) (string, error)
Relay environment made to hold the pinned set in this process, the step the user switching Relay on runs
func EnsureToolsForSync ¶
Publishes every required tool of this tree's lockfile and puts them on PATH before a venv sync
func EnvFor ¶
Composed env of already installed packages over base, raising only when the store itself cannot be read
func EnvironmentPython ¶
Selected interpreter of a named side environment without acquiring tools or writing state, ok false when absent
func EnvironmentRuntimeFactsPath ¶
Installed state file of one checkout's dependency state
func EnvironmentStoreRoot ¶
func EnvironmentStoreRoot(ctx context.Context, projectRoot string, honorRuntimeOverride bool) (string, error)
Store of a tree from the context or process runtime override, a payload manifest, an install stamp, or the default root
func ExeIsVenvBound ¶
ExeIsVenvBound reports a launcher exe embedding the venv interpreter of the pre pm installer, which must be replaced
func ExposeOnPathDisabled ¶
ExposeOnPathDisabled exports exposeOnPathDisabled
func ExtraInterpreter ¶
Interpreter of a provisioned extra, false when the extra is unknown or not provisioned
func ExtraKey ¶
PEP 685 name uv matches an extra by, separator runs folded to one dash and lowercased
func ExtraProvisioned ¶
Whether an extra's environment is provisioned on this install
func ExtraPythonCommand ¶
Isolated interpreter command of a provisioned extra, an install error naming the command to run when it is missing
func ExtraSitePackages ¶
Site packages of a provisioned extra, false when it is not provisioned
func ExtraSupported ¶
Reports an extra installable on this machine, false in a build that leaves the package manager out
func ExtraSupportedIn ¶
func ExtraSupportedIn(ctx context.Context, extra string, environment map[string]string, importable func(string) bool) (bool, error)
ExtraSupportedIn reports an extra installable under an explicit marker environment and importability probe
func ExtractTar ¶
func ExtractTar(r io.ReadSeeker, dest string) error
Extracts a seekable tar stream the way tarfile extractall does under the store extraction filter, unsafe members refused
func ExtractTarFile ¶
Extracts a tarball file under the one containment policy every PM tar consumer shares
func ExtrasLockPath ¶
Extras lock of a source checkout, the file pm embeds
func ExtrasRoot ¶
Directory of the install state holding one environment per provisioned extra
func FailedCachedPackages ¶
Packages uv failed to install because their cached copy is corrupt, empty for any other failure
func FileDigest ¶
Hex sha256 of a file with ok false when it does not exist
func FinalizeReceipt ¶
Writes and rotates the receipt, a token restoring the outer receipt and panicking on reuse or another scope
func FlattenSingleDir ¶
Hoists a lone top level directory's contents unless it is the layout, refusing on any collision
func GetText ¶
Text of an index URL read with credentialed open, index headers, the operation's response cache and retries
func GitArgvBytes ¶
Exported gitArgvBytes for the probe tests of other packages
func GitNeverLocks ¶
Reports whether a subcommand is a daemon that never takes a lock
func GitProgram ¶
Exported gitProgram for the lock sweeps of other packages
func GitWorksIn ¶
Reports whether a git works in places by cwd, a path argument or a GIT_DIR style variable
func GithubReleaseTags ¶
Newest first version shaped release tags of a GitHub repo, a prefix stripped and drafts and prereleases skipped
func ImportPathEntries ¶
func ImportPathEntries() []string
ImportPathEntries exports importPathEntries
func InstallConfiguredFeaturesMissingDeps ¶
Adds the extras configured features need to the dependency environment, then lists the features still missing theirs
func InstallHint ¶
The one command users run for a missing extra
func InstallKey ¶
First sixteen hex digits of the sha256 of the resolved checkout path
func InstallLibatomicBeforeLock ¶
Installs libatomic interactively before PM takes its lock, only where sudo would actually prompt
func InstallNodeSidecar ¶
Installs a plugin's Node dependencies with PM's npm, returning a diagnostic or empty on success
func InstallPackage ¶
func InstallPackage(ctx context.Context, p Package, lockfile *Lockfile, facts *Facts, store *Store, target string, opts InstallPackageOptions) (string, error)
Realizes one pin, host installs committing facts and cross target stages carrying a pin marker
func InstallRoot ¶
func InstallRoot() string
Tree whose install stamp belongs to this process, the steward override or the binary dir
func InstallRuntimeCommand ¶
func InstallRuntimeCommand(repoRoot string, args []string, opts LaunchCommandOptions) []string
Installation bound argv safe to persist, the install binary pinning its home before the subcommand and args
func InstallStampPath ¶
Install stamp shared by every stamp reader, the executing tree resolving through the install root
func InstallStateDir ¶
Dependency state directory of one checkout
func InstallStatePermissionMessage ¶
Describes an access failure inside this install's dependency state, empty when the failure lies elsewhere
func InstallationCommand ¶
func InstallationCommand(repoRoot string, args []string, opts LaunchCommandOptions) []string
Persisted install command, the install's own binary when present and the runtime command otherwise
func InstallsRoot ¶
Directory holding every checkout's dependency state
func InterruptedPullMarkerPath ¶
Path of the interrupted pull marker inside root's git dir
func IronProxyAllowlistedEnv ¶
Infrastructure only environment of this process, never the operator's secrets
func IsDownloadKind ¶
func IsDownloadKind(err error, kind DownloadErrorKind) bool
Reports whether err is a downloader failure of the given kind
func IsForwarded ¶
Reports whether an ambient uv setting crosses into uv, index credentials matching by prefix
func IsIndexRedirect ¶
Reports whether a setting redirects package resolution rather than shaping transport
func IsInstalled ¶
Reports whether the current pin of a package is installed
func IsJunction ¶
Reports a Windows mount point reparse tag, false for anything that cannot be inspected or on POSIX
func IsSealedTree ¶
IsSealedTree exports isSealedTree
func IsTransient ¶
Reports whether a failure is a transient network condition worth retrying
func KnownExtras ¶
func KnownExtras() []string
Canonical names of every extra the binary carries, sorted
func LastCompletedObject ¶
Insertion ordered deep copy of the last receipt finalized in this scope
func LastForUpdate ¶
Last receipt completed in this scope under an update id, optionally consuming it
func LastForUpdateObject ¶
Insertion ordered form of the last receipt completed under an update id, optionally consuming it
func LatestReceipt ¶
Newest receipt of any kind, a pure read that never creates the receipts dir
func LauncherBinary ¶
LauncherBinary exports launcherBinary
func LauncherStart ¶
Launcher steps before the bootstrap, argv returned without a runtime command's leading home pin and whether it had one
func LaunchersMain ¶
func LaunchersMain(ctx context.Context, repoRoot string, argv []string, stdout, stderr io.Writer) int
Prints the runtime command or publishes the install's launchers into an output directory
func LazyInstallsAllowed ¶
func LazyInstallsAllowed() bool
Reports whether PM may install on demand for the process home and environment
func LazyInstallsAllowedFor ¶
Reports whether PM may install on demand under a context's home and worker policy, a broken config failing closed
func LeaseDirectory ¶
Pins a lease managed generation directory until release or process exit
func LeaseGeneration ¶
Pins a generation's parent directory for this process, the returned release letting go early
func LeasesHeld ¶
Reports whether any process still holds a lease on the generation
func LegacyPostSwapInvocation ¶
Hand off file and update flags of the exact fresh checkout command shipped updaters emit
func LegacySelection ¶
Extras PM's first generation selects when replacing a pre PM venv, all plus every supported opt in it held
func LiveCheckoutUnderTest ¶
Reports root as the checkout this binary runs from while go test or a pytest case drives the process
func LlamaAppBucketVersions ¶
func LlamaAppBucketVersions() []string
Build numbers the llama installer bucket tree lists, newest first, empty when unreachable
func LlamaAppLatest ¶
Build tag the llama installer's latest pointer resolves to as a bare build number, ok false when unreachable
func LoadPackageDefinitions ¶
func LoadPackageDefinitions(definitions []PackageDefinition) error
Restores explicit registrations by identity, refusing any this binary does not carry
func LockAndSync ¶
func LockAndSync(ctx context.Context, pluginDirs []MemberDir, extras []string, opts LockAndSyncOptions) error
Prepares a fresh generation from explicit inputs or a recorded workspace and syncs it with the prepared engine
func LockFD ¶
Takes the exclusive byte lock, polling until the timeout, WaitForever never gives up and zero tries once
func LockProject ¶
func LockProject(ctx context.Context, opts LockProjectOptions) error
Resolves a project's lock without creating or selecting an environment
func LockUsageError ¶
LockUsageError is the pm lock usage refusal for a bump name without a version or the reverse
func LockfilePath ¶
func LockfilePath() string
Path of the lockfile pm lock writes and every install reads
func LongRoot ¶
Spells a PM owned root in extended length form on Windows so deep paths beneath it survive MAX_PATH
func MachineMatchesBinary ¶
Reports whether the executable's architecture matches target, known false for scripts and shims
func Main ¶
Runs one pm command, reporting install errors and install state permission failures with status 1
func ManagerLinked ¶
func ManagerLinked() bool
Whether this build links the package manager, false where plugin changes publish with no dependency environment
func ManifestVersionError ¶
Why a manifest cannot load here, its required icebath version or a manifest_version newer than supported
func MarkerOwnerIsLive ¶
MarkerOwnerIsLive exports markerOwnerIsLive
func MartinRiedlIndex ¶
Target to version to epoch map of the martin riedl ffmpeg builds page
func MartinRiedlVersions ¶
Release versions the martin riedl page lists for a target, in page order
func MembersStamp ¶
Hash of the member inputs a generation copies, keyed by identity so staging paths never change it
func MergeTree ¶
Moves src's files into dst keeping both layouts, a file present in both failing loudly
func MissingCompilerRemedy ¶
Install hint for a build that failed because no compiler exists, empty otherwise
func MustRegister ¶
func MustRegister(p Package)
Registers a package from an init function, panicking on a definition without a name
func NPMRegistry ¶
Registry npm resolves for this environment, npm_config_registry beating the user npmrc
func NPMRegistryURL ¶
A public npm registry URL rebased onto the configured registry, other URLs unchanged
func NativeManifestFile ¶
Native plugin.yaml or plugin.yml of a plugin dir, empty when neither exists
func NativeManifestFileFS ¶
Native plugin.yaml or plugin.yml of a plugin dir inside a tree, empty when neither exists
func NodeLatestVersions ¶
Newest first node versions from nodejs.org's index
func NormalizePackageName ¶
PEP 503 normal form, the spelling uv's cache uses
func NpmDistTags ¶
Dist tags of an npm package from the configured registry
func NpmEnv ¶
Environment for PM's npm child with ambient Node and npm options removed and its cache pinned
func OverriddenVersions ¶
Locked versions of every dependency the lock's manifest overrides, keyed by normalized name
func OverrideCoreRepo ¶
func OverrideCoreRepo(root string) (restore func())
Points the core project root at dir until restore runs, the way tests patch the repo root
func OverridePublicationWrite ¶
Routes every publication durable write through fn until restore runs, the way tests patch durable_write_bytes
func OverrideUVToolchain ¶
func OverrideUVToolchain(uv, python string) (restore func())
Answers every toolchain lookup with the given uv and python binaries until restore runs, the way tests patch _toolchain
func OwningHomeRoot ¶
Data root owning a borrowed checkout's committed state, empty when the active root's state is that state
func OwnsUserPath ¶
True when new consoles resolve root, so it may put its commands on the User PATH
func PackageOf ¶
Pool package a pinned URL names, empty for any other source, an error where urlsplit raises
func ParseRequirement ¶
Parses a dependency specifier like packaging Requirement
func ParseTermuxIndex ¶
func ParseTermuxIndex(text string) map[string]PoolPackage
Package name to served archive from the RFC822 style index, stanzas without file or hash dropped
func PartialLock ¶
func PartialLock(root, key string, cancelled func() bool, wait bool) (release func(), acquired bool, err error)
Takes the cross process ownership lock of one partial key, the release closing it
func PartialsRoot ¶
func PartialsRoot() string
Machine scoped downloader partials area under the default root, writable even when the store is sealed
func PatchRepoRoot ¶
func PatchRepoRoot(dir string) func()
Makes dir the tree the running binary reports until the returned restore runs
func PayloadCommandDir ¶
Directory holding a sealed payload's own launchers, empty for every other tree
func PayloadVenv ¶
Environment a sealed payload ships beside its tree, empty when there is none
func PbsVersions ¶
Exact interpreter identity the newest matching python build standalone release advertises
func PinLauncherHome ¶
func PinLauncherHome()
Pins an unset ICEBATH_HOME to the install's default root, the home every launch of an install command settles on
func PinnedBuildDefaults ¶
Defaults for build variables the pinned interpreter records but this host lacks
func PinnedPythonFullVersion ¶
Full version of the pinned Python PM builds environments with, a RuntimeError when the lock pins none
func PinnedPythonVersion ¶
Major and minor version of the pinned Python for callers outside pm, a RuntimeError when the lock pins none
func PipConfIndexURL ¶
Index URL from the global section of pip config files, a decode failure raising like Python
func PipConfigCandidates ¶
Pip config files lowest precedence first, sitePrefix naming the interpreter whose site file applies
func PluginSpellings ¶
Spellings of a plugin directory and key that other packages match against plugins.disabled
func PoolAssetName ¶
Asset name a pool archive is republished under, its sha256 keeping the name unique and free of special characters
func PrepareWindowsEnvironment ¶
func PrepareWindowsEnvironment(source, state string, env map[string]string) (map[string]string, error)
Runs the checkout's Windows ARM64 build dependency provider and returns the environment it prepared
func ProbeReason ¶
Why a version probe failed, its exit code plus the tail of its output
func ProjectPython ¶
Interpreter of the install's selected dependency environment
func ProjectVenvDir ¶
ProjectVenvDir exports projectVenvDir
func PruneSitePth ¶
func PruneSitePth(venv string)
Drops the pth files that must never run inside a shipped payload, keeping every other one
func PublishLaunchers ¶
PublishLaunchers exports publishLaunchers
func PythonTool ¶
Selected tool entry point of a named side environment, never an installer executable
func ReadBytesOrNone ¶
File bytes with ok false when the file does not exist, other read failures returned as errors
func ReadGitRevisionFingerprint ¶
Cheap checkout fingerprint read from git metadata without spawning git, false on any OSError
func ReadHomeSelection ¶
Plugin and memory selection a home's config declares, nil when the home has no config yet
func ReadInstallStamp ¶
Install stamp of a tree as a JSON object, empty when missing, unreadable or not an object
func ReadNativeManifest ¶
Parsed native manifest, empty YAML an empty mapping and anything else but a mapping refused
func ReadNativeManifestFS ¶
Manifest mapping of a native manifest inside a tree, read and decoded the way ReadNativeManifest reads a file
func RecordDeclined ¶
func RecordDeclined(ctx context.Context, add, remove []string, projectRoot string) (map[string]bool, error)
Updates the recorded opt outs, writing only on change, and returns the new set
func RecordFeatureList ¶
Records the selected extras, nil standing for none recorded
func RecordPluginChecks ¶
Records plugin update check results, each serialized when it knows how
func RecordRefusal ¶
Records why this sync refused to act
func RecordStep ¶
Records one named step and its result
func RecordVenvRebuild ¶
Records whether the dependency environment rebuild succeeded and why
func RecordWarning ¶
Records a warning that reached the user during this sync
func RecoverIfNeeded ¶
func RecoverIfNeeded(ctx context.Context, projectRoot string, argv []string, explicit bool) (bool, error)
RecoverIfNeeded exports recoverIfNeeded
func RefreshDependencies ¶
Re-resolves the durable selection after an external update replaced its inputs and reports what happened
func Register ¶
Registers a package definition under its name, a later registration of the same name winning
func RelayVenv ¶
Environment the relay runtime set lives in, inside the install state and apart from the plugin environment
func ReleaseAllLeases ¶
func ReleaseAllLeases()
Releases every lease this process still holds, for the binary to call as it exits
func ReleaseAssetURL ¶
Asset URL on the release of this build, a source build reading the latest release
func ReleaseDeadLock ¶
Exported releaseDeadLock
func RemoveCorruptEntries ¶
Deletes the corrupt archive entries of names that uv cache clean left behind, under uv's cache lock
func RemoveExtra ¶
Deletes an extra's environment so nothing of it stays on disk
func RemoveTree ¶
Removes a tree, refusing a missing path, a symlink or a junction the way shutil rmtree does
func RepairDependencies ¶
Restores this installation's recorded dependency set and collects what the repair superseded
func RepairTermuxPins ¶
func RepairTermuxPins(table *OrderedObject, lockfile *Lockfile, stale []Retired, verify func(string) (string, error)) (int, error)
Repins every retired row to the pool's current archive after hashing its bytes, returning the count
func RequirementAppliesHere ¶
Whether the environment marker of a requirement admits this machine, true for one no marker probe can judge
func RequirementDistName ¶
Distribution name a requirement string starts with
func ResolveInstallBinary ¶
Install binary of a tree when present as a regular file, empty for an externally owned runtime
func RetryHeld ¶
Runs a rename like mutation and rides out transient Windows holds for about three seconds
func RetryNetwork ¶
func RetryNetwork[T any](operation func() (T, error), opts RetryOptions) (T, error)
Retries a whole idempotent request on transient failures, durable progress renewing the budget
func ReuseIndexResponses ¶
Runs one resolve or pin operation sharing successful index reads only inside it
func RunContained ¶
Runs a prepared child under the output policy and returns its captured output, failing on nonzero exit
func RunningFromSelectedEnvironment ¶
Exported form for pkg/memory setup, same answer as the package function
func RuntimeEnvironment ¶
Environment of an isolated runtime child, ambient interpreter selection stripped and the home and store pinned
func RuntimeEnvironmentReady ¶
Relay environment and whether it holds the pinned set with no provisioning changing it or left unfinished
func RuntimeFactsPath ¶
Installed state file of this binary's own dependency state
func RuntimeLock ¶
func RuntimeLock(ctx context.Context, project string, timeout time.Duration) (held bool, release func(), err error)
Holds the per install dependency lock, held false when the wait expired
func RuntimeSetStore ¶
Store beside the environment with its own facts, holding the interpreter and uv the environment is built on
func SaveTermuxTable ¶
func SaveTermuxTable(table *OrderedObject, path string) error
Writes the pin table indented in its key order with a trailing newline
func SealedDirs ¶
PATH dirs of the sealed store's install of a package, none when it is not installed there Sealed payload dirs holding a package's executables, the exported face for pkg/mcp
func SelectedPluginDir ¶
Tree a selection key names, the home's own plugins dir first then the bundled plugins, empty when neither has it
func SelectedSitePackages ¶
Site packages directory of the dependency environment the install currently selects
func SelectedVenv ¶
Committed environment of the install, or its original environment before the first sync
func ServeWorker ¶
Serves one JSON line PM request read from controls, writing callbacks and the result to wire
func SetBuildTag ¶
func SetBuildTag(version string)
Records the version stamped into the binary so pool archives resolve to that release's copies
func SetCommandArgv ¶
Installs the CLI parser's split of top level flags from the command a launch runs
func SetPluginManifestHost ¶
func SetPluginManifestHost(host *PluginManifestHost)
Installs the plugin manifest surface that declarations, admission and fit checks read
func SetUpdateLockHooks ¶
func SetUpdateLockHooks(hooks UpdateLockHooks)
Installs the checkout lock calls a takeover child is bound, resumed and handed lock descriptors through
func SetUpdateReceiptHooks ¶
func SetUpdateReceiptHooks(hooks UpdateReceiptHooks)
Installs the receipt call an incomplete handoff records its stop reason with
func ShouldSkipExternalSecretSources ¶
func ShouldSkipExternalSecretSources() bool
Reports an update process, whose dotenv loads must never resolve external secret sources
func SignManagedPython ¶
Ad hoc signs a managed Python with a stable identifier on macOS, false elsewhere or when signing fails
func SitePackages ¶
Site packages directory of a venv for the interpreter version the tree actually holds
func SourceInstallPackages ¶
Supported required roots for a source install, optional and internal tools entering only on request or through dependencies
func SpecifierSetAdmits ¶
Whether a PEP 440 specifier set admits version with prereleases allowed, invalid true for an unparsable set
func StageLauncher ¶
StageLauncher exports stageLauncher
func StopForRelaunchIncomplete ¶
Stops an update that has no completion request, naming the old version handoff and exiting 1
func StoreFirstPath ¶
PATH with the installed store's tool dirs moved to the front for children that prepend after activation
func StorePathDirs ¶
Deduped PATH dirs of installed store packages whose whole chain is installed, dependents first
func SwapAnchorImportable ¶
func SwapAnchorImportable(fn func(ctx context.Context, anchor string) bool) func(ctx context.Context, anchor string) bool
SwapAnchorImportable installs the anchor importability probe, returning the one it replaced
func SwapCountsAsHolder ¶
func SwapCountsAsHolder(fn func(args []string, anyGit bool) bool) func(args []string, anyGit bool) bool
Replaces the holder rule the probes consult and returns the previous one
func SwapExposeCLI ¶
func SwapExposeCLI(fn func(ctx context.Context, projectRoot string, create bool) (ExposeResult, error)) func(ctx context.Context, projectRoot string, create bool) (ExposeResult, error)
Replaces the PATH exposure of the launcher refresh and returns the previous one
func SwapInstallCommandSteps ¶
func SwapInstallCommandSteps(steps InstallCommandSteps) func()
Replaces the install command steps until the returned restore runs
func SwapLockRunner ¶
func SwapLockRunner(fn func(context.Context, []string, pysubprocess.Options) (*pysubprocess.Completed, error)) func(context.Context, []string, pysubprocess.Options) (*pysubprocess.Completed, error)
Replaces the subprocess runner of the lsof and ps probes and returns the previous one
func SwapLockWhich ¶
Replaces the executable lookup of the lsof and ps probes and returns the previous one
func SwapLockfilePath ¶
Replaces the lockfile path every install reads and returns the previous lookup
func SwapPlatformGates ¶
SwapPlatformGates installs the extra to marker table the gates read, returning the table it replaced
func SwapPublishOwnLaunchers ¶
func SwapPublishOwnLaunchers(fn func(ctx context.Context, repoRoot, outDir string) ([]string, error)) func(ctx context.Context, repoRoot, outDir string) ([]string, error)
Replaces the own command publication of the launcher refresh and returns the previous one
func SwapToolchain ¶
func SwapToolchain(fn func(context.Context, bool, bool) (string, string, bool, error)) func(context.Context, bool, bool) (string, string, bool, error)
Replaces the toolchain lookup the Python environment engine calls and returns the previous one
func SwapUpdateResolution ¶
func SwapUpdateResolution(resolve func(Package, []string, *string, map[string]any) (*Resolved, error), pin func(Package, *Resolved, map[string]any) (map[string]any, error)) func()
Replaces the release resolver and the artifact pinner of the update driver until the returned restore runs
func SyncOutput ¶
Writer a dependency sync prints operator messages to, the process stdout unless redirected
func SyncVenv ¶
func SyncVenv(ctx context.Context, opts SyncVenvOptions) error
Syncs an application caller's dependency environment, a foreign checkout through its worker, a projectless tree to its runtime set
func Toolchain ¶
func Toolchain(ctx context.Context, realize, explicit bool) (uv, python string, found bool, err error)
Pinned uv and Python binaries without host discovery, a read only probe reporting found false instead of installing
func TreeDigest ¶
Deterministic sha256 over a tree, skipping desktop metadata and bytecode caches
func TryInstallLibatomic ¶
Tries the distro libatomic package once per process and returns whether it ran and the remedy hint
func UnexpectedIncompatibilities ¶
Report lines a lock does not account for, nil when the report cannot be read line by line
func UnsupportedRequirements ¶
Requirements that name a direct URL, which the shared environment refuses
func UpdateMechanisms ¶
func UpdateMechanisms() []string
Install stamp updateMechanism values a build lane may write, as a fresh slice
func UpdateRetryRecovered ¶
func UpdateRetryRecovered() bool
Reports whether the last startup repair ran for an update command
func UserFacingApplies ¶
Reports a sealed payload on Windows, the only layout whose packaged executables user commands cannot start
func UserFacingPath ¶
PATH with the store's tool dirs moved behind the user's entries, PM Python stopping just before the Store alias dir
func UvCacheDir ¶
Machine scoped uv cache, merged once per uv.lock from the payload's shipped cache before it is used
func UvCachePath ¶
func UvCachePath() string
Machine scoped uv cache under the default root, never seeded or written here
func UvLauncher ¶
Installed uv or uvx launcher for a user declared MCP stdio command, empty when it is not installed
func ValidateEnvironment ¶
func ValidateEnvironment(ctx context.Context, python string, argvPrefix []string, env map[string]string, cwd string) error
Runs the startup import checks inside a candidate, through its argv prefix or else its isolated interpreter
func VenvBinDir ¶
Scripts on Windows and bin elsewhere, returned whether or not the venv exists
func VenvCommand ¶
Argv prefix running Python inside a venv, a sealed payload's venv first healed onto the payload's store interpreter
func VenvIsCurrent ¶
func VenvIsCurrent(ctx context.Context, opts VenvIsCurrentOptions) (bool, error)
Probes dependency currency without bootstrapping, a cold foreign worker answering not current
func VenvPython ¶
Interpreter inside a venv laid out for this platform, which may not exist
func VenvPythonVersion ¶
Major and minor version a POSIX venv holds from pyvenv.cfg or its lib directory, ok false when neither says
func VerboseOutput ¶
Reports whether child output streams unchanged, forced by ICEBATH_VERBOSE or implied by CI
func VersionKey ¶
func VersionKey(version string) []versionKeyPart
Sortable key of a version, numeric segments before alphabetic ones so a prerelease never beats its release
func WindowsBashCandidates ¶
Ordered bash.exe candidates for a Windows host, the override and Git roots first and a launcher PATH bash never
func WindowsBinLaunchers ¶
func WindowsBinLaunchers() []string
WindowsBinLaunchers lists the launcher names the managed bin directory publishes
func WithCLIStderr ¶
Context whose pm command errors print to w instead of the process stderr
func WithIcebathNodePath ¶
Installed pm npm and its Node dependency composed over env without provisioning anything
func WithReceiptScope ¶
Context with a fresh receipt scope whose bindings copy the parent's, so records stay local to it
func WithRuntimeStore ¶
Context whose runtime store is dir, the way ICEBATH_RUNTIME_DIR points a whole process at one
func WithUpdateCorrelation ¶
Context whose ambient update correlation id comes from the open update receipt the provider reads
func WorkerContext ¶
Carries the worker's update correlation into the scope until the returned restore runs
func WorkerMain ¶
func WorkerMain() int
Runs this process as the isolated PM worker over its standard streams and returns its exit status
Types ¶
type ArgparseColors ¶
type ArgparseColors struct {
Usage, Prog, Heading, SummaryLong, SummaryShort, SummaryLabel, LongOption, ShortOption, Label, Reset string
}
Color codes of the argparse theme for one stream, all empty when the stream shows no color
func ArgparseThemeFor ¶
func ArgparseThemeFor(stdout io.Writer) ArgparseColors
ArgparseThemeFor exports argparseTheme
type BasePackage ¶
type BasePackage struct {
Name string
Deps []string
Optional bool
Default bool
Internal bool
OffPath bool
URL string
Gaps map[string]string
VersionStyle string
EmulatedArchTargets []string
TargetDeps map[string][]string
// contains filtered or unexported fields
}
BasePackage carries the declarative fields and default behaviour every catalogue package embeds
func (*BasePackage) Base ¶
func (b *BasePackage) Base() *BasePackage
func (*BasePackage) Binary ¶
func (b *BasePackage) Binary(entry, target string) string
func (*BasePackage) BinaryReason ¶
func (b *BasePackage) BinaryReason(bin, entry, target string) string
Empty when the binary is present and arch plausible on target, else the diagnosis
func (*BasePackage) DepsOn ¶
func (b *BasePackage) DepsOn(target string) []string
Dependencies on target, the shared ones then those only that target needs
func (*BasePackage) Env ¶
func (b *BasePackage) Env(entry, target string) EnvDiff
func (*BasePackage) FetchURL ¶
func (b *BasePackage) FetchURL(version, target string) (string, error)
func (*BasePackage) FetchURLs ¶
func (b *BasePackage) FetchURLs(version, target string) ([]string, error)
func (*BasePackage) KnownSHA256 ¶
func (b *BasePackage) KnownSHA256(version, url string) (string, error)
func (*BasePackage) LatestVersions ¶
func (b *BasePackage) LatestVersions(target, locked string) ([]string, error)
func (*BasePackage) MissingReason ¶
func (b *BasePackage) MissingReason(target string) string
func (*BasePackage) OnPath ¶
func (b *BasePackage) OnPath() bool
Reports whether the package contributes PATH dirs
func (*BasePackage) RepairStagedVerification ¶
func (b *BasePackage) RepairStagedVerification(entry, target, reason string) (string, string)
func (*BasePackage) Stage ¶
func (b *BasePackage) Stage(store *Store, staged, version, target string) error
func (*BasePackage) StoreEntry ¶
func (b *BasePackage) StoreEntry(version, target string) string
func (*BasePackage) Style ¶
func (b *BasePackage) Style() string
Version labelling style of the lockfile version field, semver unless declared
func (*BasePackage) Unpack ¶
func (b *BasePackage) Unpack(archive, staged, target string) error
func (*BasePackage) Verify ¶
func (b *BasePackage) Verify(entry, target string) string
type BinaryPackage ¶
type BinaryPackage struct {
BasePackage
BinaryRel map[string]string
NoFlatten bool
NoProbe bool
ProbeArgs []string
ProbeCwd bool
}
BinaryPackage is a downloaded archive exposing one binary, the shape most tools take
func (*BinaryPackage) Binary ¶
func (b *BinaryPackage) Binary(entry, target string) string
func (*BinaryPackage) Rel ¶
func (b *BinaryPackage) Rel(target string) string
Relative binary path of a binary package for a target, empty when the package ships none there
func (*BinaryPackage) Stage ¶
func (b *BinaryPackage) Stage(store *Store, staged, version, target string) error
func (*BinaryPackage) Verify ¶
func (b *BinaryPackage) Verify(entry, target string) string
Checks file and architecture evidence everywhere and runs the smoke probe only on the native target
type BuildEnvironmentOptions ¶
type BuildEnvironmentOptions struct {
Source string
Out string
Python string
Cache string
Env map[string]string
Extras []string
Groups []string
AllExtras bool
NoInstallProject bool
Frozen bool
Sealed bool
Offline bool
Explicit bool
Timeout time.Duration
}
BuildEnvironmentOptions are build_environment's keywords, nil Env for None and Frozen true for Python's default
type BuildFailure ¶
type BuildFailure struct{ *InstallError }
BuildFailure is a package build backend that ran and failed
func (*BuildFailure) Unwrap ¶
func (e *BuildFailure) Unwrap() error
type Bws ¶
type Bws struct {
BinaryPackage
}
Bws is the Bitwarden secrets manager CLI, one static musl build serving every Linux userland
type CalledProcessError ¶
CalledProcessError is a contained child that exited nonzero, with the output it printed
func (*CalledProcessError) Error ¶
func (e *CalledProcessError) Error() string
type Candidates ¶
type Candidates struct{ Dirs []string }
Candidates discovers the enabled members and adds these candidate directories
type CarriedFailure ¶
CarriedFailure is why a carried extra keeps the environment from building and whether that is a build verdict
type CarriedTrial ¶
CarriedTrial is the sync a carried extra failed in, the selection inputs its trials rebuild from
type CheckProjectLockOptions ¶
type CheckProjectLockOptions struct {
Source string
Python string
Cache string
Env map[string]string
Offline bool
Explicit bool
Quiet bool
}
CheckProjectLockOptions are check_project_lock's keywords, Quiet capturing uv's output
type Chromium ¶
Chromium is the Chrome for Testing or Playwright mirror build, laid out the way Playwright resolves browsers
func (*Chromium) Binary ¶
First executable under the entry in path order, whichever enclosing directory the archive used
func (*Chromium) StoreEntry ¶
Entry named by Playwright revision only, all its resolver reads
type ConfiguredFeatureGap ¶
type ConfiguredFeatureGap struct {
Feature, Hint, Extra string
}
ConfiguredFeatureGap is one configured feature whose dependencies are missing, its label, install hint and candidate extra
type ContainOptions ¶
ContainOptions shape a contained child run
type CuaDriver ¶
type CuaDriver struct {
BinaryPackage
}
CuaDriver is the computer use driver, shipped by default wherever upstream builds it
func (*CuaDriver) FetchURL ¶
macOS takes the directory archive carrying the signed app identity, other targets the binary archive
func (*CuaDriver) LatestVersions ¶
type DebPackage ¶
type DebPackage struct {
BasePackage
DebName string
PrefixRel string
}
DebPackage stages a deb by ar and tar extraction, never dpkg and never package scripts
func (*DebPackage) DebPackageName ¶
func (d *DebPackage) DebPackageName() string
Control field name the deb must declare, the package name unless overridden
func (*DebPackage) Prefix ¶
func (d *DebPackage) Prefix() string
Prefix the staged tree keeps the payload under, the Termux usr prefix unless overridden
func (*DebPackage) Unpack ¶
func (d *DebPackage) Unpack(archive, staged, target string) error
func (*DebPackage) Verify ¶
func (d *DebPackage) Verify(entry, target string) string
type DestinationExistsError ¶
type DestinationExistsError struct{ Path string }
DestinationExistsError is a build destination that already exists, a FileExistsError in Python
func (*DestinationExistsError) Error ¶
func (e *DestinationExistsError) Error() string
func (*DestinationExistsError) Is ¶
func (e *DestinationExistsError) Is(target error) bool
type DistributionPin ¶
type DistributionPin struct {
Name, Version *string
}
Installed distribution as importlib metadata reports its Name and Version headers, nil when a header is absent
func DistributionPins ¶
func DistributionPins(environment string) ([]DistributionPin, error)
Name and version headers of every distribution in a generation's site packages in directory order
type Download ¶
type Download struct {
Sources []Source
Resume bool
Connections int
PartialsDir string
// contains filtered or unexported fields
}
Download is one resumable job, a plan of sources fetched with parallel ranges and verified before publication
func NewDownload ¶
func NewDownload(sources []Source, opts DownloadOptions) *Download
Plans a download, zero connections taking the default and partials landing in the managed area
type DownloadError ¶
type DownloadError struct {
Kind DownloadErrorKind
Message string
URL string
Status int
FallbackAllowed bool
Cause error
}
DownloadError is every downloader failure, the kind naming its class
func NewDownloadTransportError ¶
func NewDownloadTransportError(rawURL string, cause error) *DownloadError
Wraps an exhausted network failure with its URL, status and whether a pinned mirror may take over
func (*DownloadError) Error ¶
func (e *DownloadError) Error() string
type DownloadErrorKind ¶
type DownloadErrorKind int
DownloadErrorKind distinguishes the downloader failure classes
const ( // DownloadFailed is a generic downloader failure DownloadFailed DownloadErrorKind = iota // DownloadRangeFailed means the range or representation identity changed DownloadRangeFailed // DownloadHashFailed means the bytes did not match the pinned sha256 DownloadHashFailed // DownloadWasPaused means a pause stopped the transfer with partials intact DownloadWasPaused // DownloadTransportFailed is an exhausted network request with its status and URL DownloadTransportFailed )
type DownloadOptions ¶
type DownloadOptions struct {
DisableResume bool
Connections int
PartialsDir string
Pause *PauseEvent
}
DownloadOptions shape a download job
type DriftReport ¶
DriftReport maps each unhealthy package to its reason in the order the problems were found
type EnabledPluginsOptions ¶
type EnabledPluginsOptions struct {
ProposedHome string
Enabled []string
Disabled []string
Installing string
SkipInvalidSecondary bool
}
EnabledPluginsOptions propose a selection for one home, name a plugin being installed and tolerate broken secondaries
type EnsureEnvironmentOptions ¶
type EnsureEnvironmentOptions struct {
Name string
Requirements []string
Root string
Explicit bool
Timeout time.Duration
Executable string
}
EnsureEnvironmentOptions are ensure_environment's arguments, empty Root and Executable for None
type EnsureOptions ¶
type EnsureOptions struct {
BaseEnv map[string]string
Explicit bool
SkipVerify bool
Progress InstallProgress
PauseEvent *PauseEvent
DownloadProgress ProgressFunc
// contains filtered or unexported fields
}
EnsureOptions choose the base env, the explicit and verify policy, progress reporting and cancellation
type EnsurePythonToolOptions ¶
type EnsurePythonToolOptions struct {
Name string
Requirements []string
Executable string
Root string
Explicit bool
Timeout time.Duration
}
EnsurePythonToolOptions are ensure_python_tool's arguments, empty Root for None
type EntryPoint ¶
type EntryPoint struct {
Name string
Value string
Group string
DistName string
DistVersion string
DistSummary string
}
One entry point an installed distribution declares, with the distribution it came from
func SelectedEntryPoints ¶
func SelectedEntryPoints(ctx context.Context) ([]EntryPoint, error)
Entry points every distribution of the selected dependency environment declares, in directory order
type EnvChecker ¶
EnvChecker is a package whose env refuses an entry that cannot supply it
type EnvDiff ¶
EnvDiff is one package's environment contribution, PATH holding a list of directories to prepend
type EnvironmentArgs ¶
EnvironmentArgs are pm environment's arguments
type EvictingSync ¶
EvictingSync is how an update sync was asked, the extras it adds and whether explicit
type ExposeResult ¶
type ExposeResult struct {
OK bool
Skipped string
Error string
Path string
Mode string
Written []string
}
Result of a PATH exposure pass
type ExtraEntry ¶
type ExtraEntry struct {
Feature string `json:"feature"`
Aliases []string `json:"aliases,omitempty"`
Anchors []string `json:"anchors"`
Requires []string `json:"requires"`
Sources map[string]ExtraSource `json:"sources,omitempty"`
Tools []string `json:"tools,omitempty"`
Unsupported map[string]string `json:"unsupported,omitempty"`
Build map[string][]string `json:"build,omitempty"`
Packages []LockedPackage `json:"packages"`
BuildDeps []LockedPackage `json:"build_requires,omitempty"`
}
One optional feature set, its hand written spec and the resolution pm lock writes beside it
func ResolveExtra ¶
func ResolveExtra(name string) (string, *ExtraEntry, bool)
Canonical extra a name or alias selects, false for a name the lock does not carry
type ExtraOptions ¶
Output an extra's provisioning reports progress to
type ExtraSource ¶
Package index a requirement of an extra resolves from, limited to the platforms its marker admits
type ExtraState ¶
type ExtraState struct {
Name string
Feature string
Provisioned bool
Current bool
Unsupported string
}
Provisioning state of one extra, whether its environment exists and holds the pins this binary carries
func ExtraStates ¶
func ExtraStates(ctx context.Context) ([]ExtraState, error)
State of every extra this binary carries on this install
type FactRecord ¶
FactRecord is the identity and realized digest an install records beside its entry and env
type Facts ¶
type Facts struct {
Path string
// contains filtered or unexported fields
}
Facts is the installed state file, written only by pm
func (*Facts) EntriesInUse ¶
Store entry names recorded by tool facts
func (*Facts) Forget ¶
Drops the facts of packages pm no longer defines so gc reclaims their entries
func (*Facts) Installed ¶
func (f *Facts) Installed(name string, expectedVersion *string, storeRoot string, expectedIdentity *Identity) bool
Reports whether a tool fact matches the expected version and identity and its entry exists
func (*Facts) Record ¶
func (f *Facts) Record(name, version, entry string, env EnvDiff, storeRoot string, extra FactRecord) error
Records an installed tool entry, its templated env and the identity it came from
type Ffmpeg ¶
type Ffmpeg struct {
// contains filtered or unexported fields
}
Ffmpeg is BtbN on Windows and Linux, martin-riedl on macOS and the termux deb on bionic
func (*Ffmpeg) DebPackageName ¶
func (t *Ffmpeg) DebPackageName() string
Control field name the termux deb declares
func (*Ffmpeg) FetchURL ¶
Resolves the exact advertised asset for the version and target, refusing to relabel other bytes
func (*Ffmpeg) LatestVersions ¶
type Gh ¶
type Gh struct {
BinaryPackage
}
Gh is the GitHub CLI, whose libc independent Linux archive serves musl too
type Git ¶
type Git struct {
BinaryPackage
}
Git is Git for Windows carrying the bash contract, POSIX targets using the system git by choice
func (*Git) LatestVersions ¶
Release tags like v2.53.0.windows.3 become lock versions like 2.53.0+3
type HTTPError ¶
HTTPError is a non success response, carrying its status, reason, headers and request URL
type HomePlugins ¶
HomePlugins is one home's plugins dir with its enabled plugin names in config order
func EnabledPluginsOrdered ¶
func EnabledPluginsOrdered(ctx context.Context, opts EnabledPluginsOptions) ([]HomePlugins, error)
Every home's plugins dir with its ordered enabled names, the active memory provider joining its home's list
type IncompleteReadError ¶
IncompleteReadError is a body that ended before its declared length
func (*IncompleteReadError) Error ¶
func (e *IncompleteReadError) Error() string
type InstallArgs ¶
type InstallArgs struct {
Names []string
Extra []string
Without []string
ToolsOnly bool
TrustRecorded bool
Target *string
}
InstallArgs are pm install's arguments, a nil Target when not given
type InstallCommandSteps ¶
type InstallCommandSteps struct {
InstallNames func(ctx context.Context, names []string, target *string, verify bool) (int, error)
Activate func(ctx context.Context, allowIncomplete bool) ([]string, error)
SyncVenv func(ctx context.Context, opts SyncVenvOptions) error
EnsureExtra func(ctx context.Context, name string, opts ExtraOptions) (string, error)
}
InstallCommandSteps are the tool install, PATH activation, venv sync and extra provisioning steps the install command runs
type InstallError ¶
InstallError names the package that failed, why, and what the user can do about it
func NewInstallError ¶
func NewInstallError(pkg, cause, remedy string) *InstallError
Builds an install error with the default remedy when none is given
func RefuseLazyFor ¶
func RefuseLazyFor(ctx context.Context, name, what string) *InstallError
Records the refusal of an on demand install in a context's receipt scope and returns it
func UnknownExtraError ¶
func UnknownExtraError(name string) *InstallError
Refusal of an extra name the binary does not carry, listing the names it does
func (*InstallError) Error ¶
func (e *InstallError) Error() string
func (*InstallError) Unwrap ¶
func (e *InstallError) Unwrap() error
Failure the install error reports, nil when it was raised without one
type InstallPackageOptions ¶
type InstallPackageOptions struct {
Progress InstallProgress
PauseEvent *PauseEvent
DownloadProgress ProgressFunc
CopyFrom *Location
LockHeld bool
}
InstallPackageOptions report progress, pause, copy from a verified source, reuse a held lock and force a fresh copy
type InstallProgress ¶
InstallProgress reports download, unpack and verify stages, an error aborting the install
type InstalledPackage ¶
InstalledPackage is a selected PM entry in its ordinary spelling, Binary empty for a package without one
type InvalidMarkerError ¶
type InvalidMarkerError struct{ Message string }
InvalidMarkerError is packaging's InvalidMarker raised for marker text that does not parse
func (*InvalidMarkerError) Error ¶
func (e *InvalidMarkerError) Error() string
type InvalidRequirementError ¶
type InvalidRequirementError struct{ Message string }
InvalidRequirementError is a dependency specifier packaging refuses
func (*InvalidRequirementError) Error ¶
func (e *InvalidRequirementError) Error() string
type IronProxy ¶
type IronProxy struct {
SignedBinary
SigningKeyURL string
}
IronProxy is the egress proxy, its archive checksum enforced and its GPG signature checked when gpg exists
func (*IronProxy) VerifyProvenance ¶
type JSONRecord ¶
JSONRecord is a check result that serializes itself into the receipt
type LaunchCommandOptions ¶
LaunchCommandOptions selects the subcommand, the binary and a literal default home of an install command
type LiveTail ¶
type LiveTail struct {
Label *string
Stream io.Writer
Hide func(string) bool
Indent string
Live bool
Tail []string
// contains filtered or unexported fields
}
LiveTail contains a child's output behind one status line and prints the tail on failure
func NewLiveTail ¶
Opens a status line for label, a nil label running silently until a failure
func (*LiveTail) Close ¶
Ends the status line with a success mark, or a failure mark and the captured tail
func (*LiveTail) Discard ¶
func (t *LiveTail) Discard()
Clears the status line without a verdict, for a step that will be retried
func (*LiveTail) WriteString ¶
Takes child output text, bare carriage returns counting as line ends
type LlamaCpp ¶
type LlamaCpp struct {
BinaryPackage
Backend string
Assets map[string]string
Libgomp map[string]string
// contains filtered or unexported fields
}
LlamaCpp is one llama.cpp backend build with every library it loads staged beside llama-server
func (*LlamaCpp) KnownSHA256 ¶
Digest GitHub's release API publishes for the asset, so pinning skips the download
func (*LlamaCpp) LatestVersions ¶
The llama.app latest pointer first, then the bucket tree, then GitHub releases when the bucket shows nothing
func (*LlamaCpp) MissingReason ¶
Every known target upstream ships no build of this backend for
type Location ¶
Location is a tool package found installed, the facts that vouch for it and its store
func InstalledLocation ¶
func InstalledLocation(ctx context.Context, p Package, lockfile *Lockfile, target string, opts LocationOptions) (*Location, error)
Store and facts holding the current pin of a package, a prior pin when allowed, nil when none
func WritableCopy ¶
Location of PM's verified copy of an installed package in the writable store, copying it on first use
type LocationOptions ¶
LocationOptions verify bytes, accept a prior pin, choose roots with nil the default pair, and keep lookups read only
type LockAndSyncOptions ¶
type LockAndSyncOptions struct {
Root string
Source string
SeedLock string
Replay string
Environment *PythonEnvironment
Frozen bool
}
LockAndSyncOptions name a fresh generation root, the core source, an optional seed lock or recorded replay, and the engine
type LockHold ¶
Answer of a lock holder probe, Unknown when no platform proof exists and Holder naming a live owner
func HeldOpenLsof ¶
Exported heldOpenLsof for the injected process metadata tests of other packages
type LockProjectOptions ¶
type LockProjectOptions struct {
Source string
Upgrade bool
Python string
Env map[string]string
Cache string
Offline bool
Explicit bool
}
LockProjectOptions are lock_project's keywords, nil Env for None
type LockedFile ¶
One locked artifact, its download address and digest
type LockedPackage ¶
type LockedPackage struct {
Name string `json:"name"`
Version string `json:"version"`
Marker string `json:"marker,omitempty"`
Index string `json:"index,omitempty"`
Wheels []LockedFile `json:"wheels,omitempty"`
Sdist *LockedFile `json:"sdist,omitempty"`
}
One package of a resolved extra with the targets its marker admits and every artifact the lock allows
type Lockfile ¶
type Lockfile struct {
Path string
// contains filtered or unexported fields
}
Lockfile is a snapshot of lock.json with conflict checked publication of changed pins
func NewLockfile ¶
Reads the lockfile at path, a damaged or missing file reading as no pins
func (*Lockfile) Artifacts ¶
Every archive a target needs in extraction order, the any target covering target independent pins
func (*Lockfile) PinnedArtifacts ¶
Complete pin table of a package including targets without discovery
func (*Lockfile) Save ¶
Merges touched rows under the file's lock, refusing every row a concurrent editor changed
type ManagedEnvironmentOptions ¶
type ManagedEnvironmentOptions struct {
Python string
Cache string
Env map[string]string
Offline bool
Explicit bool
Output io.Writer
NoRealize bool
}
ManagedEnvironmentOptions select the interpreter, cache, env, network and output of a managed environment
type ManagerAbsentError ¶
type ManagerAbsentError struct{ Line string }
ManagerAbsentError is a package manager operation refused by a build that leaves the package manager out
func (*ManagerAbsentError) Error ¶
func (e *ManagerAbsentError) Error() string
type MemberDir ¶
MemberDir is one plugin member, the installed identity it answers to and the tree that supplies it
func BuildMemberDirs ¶
Enabled members for a build selecting core extras, judged on the markers of the build's interpreter
func MemberPaths ¶
Member dirs of plain paths, each its own identity
func MemberSources ¶
Installed identities mapped to build inputs, both resolved, a repeated identity taking its last source
type MemberSelection ¶
MemberSelection proposes one home's enabled and disabled lists, an empty home reading every config as written
type Members ¶
Members builds exactly these members and skips config discovery, Mapped when identities differ from sources
type Minor ¶
Minor is a major and minor pair, Ok false where Python returns None
type NoCommittedEnvironment ¶
type NoCommittedEnvironment struct{ Message string }
NoCommittedEnvironment refuses PM's store binary with nothing committed, only a repair fixes it
func (*NoCommittedEnvironment) Error ¶
func (e *NoCommittedEnvironment) Error() string
func (*NoCommittedEnvironment) Unwrap ¶
func (e *NoCommittedEnvironment) Unwrap() error
RuntimeError class callers catch it as
type Nodejs ¶
type Nodejs struct {
// contains filtered or unexported fields
}
Nodejs is nodejs.org for glibc, mac and Windows, unofficial builds for musl and the termux deb on bionic
func (*Nodejs) DebPackageName ¶
func (t *Nodejs) DebPackageName() string
Control field name the termux deb declares
func (*Nodejs) LatestVersions ¶
func (*Nodejs) RepairStagedVerification ¶
Installs the host libatomic official Linux Node needs, then re-probes, never from inspection paths
type Npm ¶
type Npm struct {
BinaryPackage
}
Npm installs itself with the node it extends, offline from the verified tarball
type OrderedObject ¶
OrderedObject is a JSON object that keeps its key order across a load and save
func LoadTermuxTable ¶
func LoadTermuxTable(path string) (*OrderedObject, error)
Loads the pin table keeping its key order, the default path falling back to the embedded copy
func (*OrderedObject) MarshalJSON ¶
func (o *OrderedObject) MarshalJSON() ([]byte, error)
Encodes the object with its keys in their recorded order
func (*OrderedObject) Set ¶
func (o *OrderedObject) Set(key string, value any)
Sets a key, appending it when new
type Package ¶
type Package interface {
Base() *BasePackage
MissingReason(target string) string
LatestVersions(target, locked string) ([]string, error)
FetchURL(version, target string) (string, error)
FetchURLs(version, target string) ([]string, error)
StoreEntry(version, target string) string
KnownSHA256(version, url string) (string, error)
Unpack(archive, staged, target string) error
Stage(store *Store, staged, version, target string) error
Binary(entry, target string) string
Verify(entry, target string) string
RepairStagedVerification(entry, target, reason string) (string, string)
Env(entry, target string) EnvDiff
}
Package is what a package IS, versions and hashes living in lock.json
type PackageDefinition ¶
type PackageDefinition struct {
Name string `json:"name"`
Module string `json:"module"`
Qualname string `json:"qualname"`
}
PackageDefinition is the identity of a non built in registration a fresh worker restores by name
func PackageDefinitions ¶
func PackageDefinitions(names []string) ([]PackageDefinition, error)
Identities of the registrations a fresh worker must restore, all of them or only a closure
type ParserSyntaxError ¶
ParserSyntaxError is a specifier syntax error pointing at the offending span of the source
func (*ParserSyntaxError) Error ¶
func (e *ParserSyntaxError) Error() string
type PauseEvent ¶
type PauseEvent struct {
// contains filtered or unexported fields
}
PauseEvent is a settable flag a download checks between chunks and while waiting
type Pin ¶
Pin is one URL the Termux pool serves, scoped as a library, the license package or a tool
func TermuxPins ¶
func TermuxPins(table *OrderedObject, lockfile *Lockfile) ([]Pin, error)
Every pinned URL the pool serves, the table's libraries and license plus the lockfile's bionic tools
type PinMismatchError ¶
type PinMismatchError struct{ Message string }
PinMismatchError means the pool serves bytes the package index does not describe
func (*PinMismatchError) Error ¶
func (e *PinMismatchError) Error() string
type PluginEntry ¶
PluginEntry is one selected plugin, the home plugins dir naming it, its selection key and its tree
type PluginEviction ¶
type PluginEviction struct {
// contains filtered or unexported fields
}
PluginEviction is one update's config edits, the plugins it disables and the ones it turns back on
type PluginInput ¶
type PluginInput interface {
// contains filtered or unexported methods
}
PluginInput is the one source of plugin members a sync or currency probe takes
func DecodePluginInput ¶
func DecodePluginInput(value map[string]any) (PluginInput, error)
Plugin input of its JSON form, nil for null and a ValueError for an unknown kind
type PluginManifestHost ¶
type PluginManifestHost struct {
SupportedManifestVersion int
RunningVersion func() string
RequiresError func(manifest map[string]any) string
ReadAgentManifest func(pluginDir string) (map[string]any, error)
}
PluginManifestHost is the plugin manifest surface pkg/plugins installs at init, a package pm cannot import
type PluginSelection ¶
type PluginSelection struct {
Members []MemberDir
// contains filtered or unexported fields
}
PluginSelection is a proposed plugin enablement for one home with the config bytes it will publish
type PoolPackage ¶
PoolPackage is the archive the pool currently serves for one package
type ProgressFunc ¶
ProgressFunc receives overall done and total bytes and every destination's coverage, an error failing the job
type ProvenanceVerifier ¶
ProvenanceVerifier checks a signed binary's pinned provenance files
type PyError ¶
PyError is a failure carrying the Python exception class callers and the worker wire tell apart
type Python ¶
type Python struct {
BionicURL string
// contains filtered or unexported fields
}
Python is the pinned interpreter for launchers and every PM managed uv command
func (*Python) DebPackageName ¶
func (t *Python) DebPackageName() string
Control field name the termux deb declares
func (*Python) LatestVersions ¶
Keeps the locked minor line and takes the advertised asset's patch and build, bionic staying a manual pin
type PythonDeclaration ¶
type PythonDeclaration struct {
Files []string
Pyproject string
Requirements []string
Manifest map[string]any
RequiresPython *string
PyprojectInstalls bool
}
PythonDeclaration is a plugin's effective Python surface for consent, membership, builds and currency
func ReadPythonDeclaration ¶
func ReadPythonDeclaration(pluginDir string) (*PythonDeclaration, error)
One effective declaration of a plugin, a packaging pyproject owning it and the manifest lists otherwise
func (*PythonDeclaration) External ¶
func (d *PythonDeclaration) External() bool
Whether the manifest declares an external python_runtime
func (*PythonDeclaration) InstallRequirements ¶
func (d *PythonDeclaration) InstallRequirements() ([]string, error)
Requirements the shared environment installs, none for an external runtime
func (*PythonDeclaration) InstallsPackages ¶
func (d *PythonDeclaration) InstallsPackages() (bool, error)
Whether admission would put packages into the shared environment, which makes the plugin a workspace member
func (*PythonDeclaration) PythonError ¶
func (d *PythonDeclaration) PythonError(version string) (string, error)
Why this member cannot join a workspace built for a Python version, empty when it fits
type PythonEnvironment ¶
type PythonEnvironment struct {
UV string
Python string
Destination string
Cache string
Env map[string]string
Offline bool
Output io.Writer
NoConfig bool
}
PythonEnvironment is one uv driven environment, its tools, destination, cache, child env and output policy
func ManagedEnvironment ¶
func ManagedEnvironment(ctx context.Context, destination string, opts ManagedEnvironmentOptions) (*PythonEnvironment, error)
Environment over PM's pinned toolchain, the pinned interpreter getting compiler defaults this host can run
func (*PythonEnvironment) Check ¶
func (e *PythonEnvironment) Check(ctx context.Context, lock string) error
Validates installed dependencies with uv pip check, the lock's deliberate override mismatches excused
func (*PythonEnvironment) CheckLock ¶
func (e *PythonEnvironment) CheckLock(ctx context.Context, source string) error
Refuses a missing or stale lock without rewriting it
func (*PythonEnvironment) Create ¶
func (e *PythonEnvironment) Create(ctx context.Context) error
Creates the venv at its final destination, which callers must never move
func (*PythonEnvironment) Executable ¶
func (e *PythonEnvironment) Executable() string
Interpreter inside the destination venv
func (*PythonEnvironment) Lock ¶
func (e *PythonEnvironment) Lock(ctx context.Context, source string, upgrade bool, timeout time.Duration) error
Resolves a project's lock, optionally upgrading every pin
func (*PythonEnvironment) PurgeCachedPackages ¶
func (e *PythonEnvironment) PurgeCachedPackages(ctx context.Context, names []string) error
Removes packages from the uv cache through uv, then deletes leftover archives that still fail validation
func (*PythonEnvironment) Sync ¶
func (e *PythonEnvironment) Sync(ctx context.Context, source string, opts SyncOptions) error
Installs the root and every workspace member, resolving only when asked
type RangeSet ¶
RangeSet is one destination's covered runs, the last set in a report naming the source that ticked
type ReceiptToken ¶
type ReceiptToken struct {
// contains filtered or unexported fields
}
ReceiptToken restores the receipt that was current before a nested begin
func BeginReceipt ¶
func BeginReceipt(ctx context.Context, kind string) *ReceiptToken
Starts recording a sync of kind stamped with the ambient update id, returning the restoring token
type RemoteDisconnectedError ¶
type RemoteDisconnectedError struct{ Message string }
RemoteDisconnectedError is a connection the server closed before sending a response
func (*RemoteDisconnectedError) Error ¶
func (e *RemoteDisconnectedError) Error() string
type ResolutionConflict ¶
type ResolutionConflict struct{ *InstallError }
ResolutionConflict is a uv resolver verdict that the requested set has no solution
func (*ResolutionConflict) Unwrap ¶
func (e *ResolutionConflict) Unwrap() error
type Resolved ¶
type Resolved struct {
Name string
Locked *string
Style string
Version *string
PerTarget []TargetVersion
Reason string
ArtifactUpdates map[string][]string
}
Resolved is what pm update decided for one package, nil Locked and Version standing for None
func ResolveBest ¶
func ResolveBest(name string, latestByTarget []TargetCandidates, locked *string, style string) *Resolved
Intersects per target candidate lists into one decision, a target without candidates skipped
type Retired ¶
type Retired struct {
Pin Pin
Replacement *PoolPackage
}
Retired is a pin whose archive the pool replaced, a nil replacement meaning the pool dropped it
func RetiredPins ¶
func RetiredPins(table *OrderedObject, lockfile *Lockfile, pool map[string]PoolPackage) ([]Retired, error)
Pins whose archive the pool replaced or dropped
type RetryOptions ¶
type RetryOptions struct {
Wait func(time.Duration) error
Progress func() int64
FallbackAvailable bool
}
RetryOptions shape a retried network operation
type Ripgrep ¶
type Ripgrep struct {
BinaryPackage
}
Ripgrep is BurntSushi's static build, ARM64 Windows carrying the VC runtime it links from python's entry
func (*Ripgrep) LatestVersions ¶
type Runner ¶
Runner is what ensure hands back, a composed environment and a command mirror
type RuntimeEnvironmentOptions ¶
Output a relay runtime provisioning reports its progress to
type RuntimeRequirement ¶
type RuntimeRequirement struct {
Name string `json:"name"`
Version string `json:"version"`
Marker string `json:"marker"`
Files []Wheel `json:"files"`
Targets []string `json:"targets,omitempty"`
}
One locked package of the runtime set with its marker and every artifact its lock admits
func RuntimeRequirements ¶
func RuntimeRequirements() ([]RuntimeRequirement, error)
Locked relay runtime set the binary embeds
func (RuntimeRequirement) ServesTarget ¶
func (r RuntimeRequirement) ServesTarget(target string) bool
Whether the package installs on target, a wheel only package listing the targets its wheels serve
type RuntimeSet ¶
type RuntimeSet struct {
// contains filtered or unexported fields
}
Hash pinned package set of one extra of the embedded lock an environment is provisioned with
func (*RuntimeSet) Requirements ¶
func (s *RuntimeSet) Requirements() ([]RuntimeRequirement, error)
Locked packages of the set, each with every wheel and source archive the lock admits
type RuntimeUnprovisioned ¶
Relay environment a caller needed that is not provisioned, with what left it so
func (*RuntimeUnprovisioned) Error ¶
func (e *RuntimeUnprovisioned) Error() string
func (*RuntimeUnprovisioned) Unwrap ¶
func (e *RuntimeUnprovisioned) Unwrap() error
type SelectionCommit ¶
type SelectionCommit struct {
Enabled []string
Stamp string
Inputs VenvApplyOptions
Current bool
Bare bool
Repair bool
Explicit bool
SkipInvalidSecondary bool
}
SelectionCommit is what a sync records, the extras, stamp and inputs it built, and how it was asked
type SignedBinary ¶
type SignedBinary struct {
BinaryPackage
}
SignedBinary acquires pinned provenance files in the same artifact transaction as its archive
func (*SignedBinary) Stage ¶
func (s *SignedBinary) Stage(store *Store, staged, version, target string) error
func (*SignedBinary) Unpack ¶
func (s *SignedBinary) Unpack(archive, staged, target string) error
type Source ¶
Source is one destination with its URL, optional pinned sha256 and pinned mirror fallbacks
func PinnedSource ¶
Download source of a pin, npm tarballs following the user's registry and pool archives falling back to the release copy
type StageOnlyOptions ¶
type StageOnlyOptions struct {
Progress InstallProgress
PauseEvent *PauseEvent
DownloadProgress ProgressFunc
}
StageOnlyOptions report the slow stages of a cross target stage and may pause it
type StagedPlugin ¶
type StagedPlugin struct {
Members []MemberDir
Active bool
// contains filtered or unexported fields
}
StagedPlugin is a staged plugin tree that replaces its installed copy, with the members it implies when enabled
type StagedUpdate ¶
StagedUpdate publishes a staged plugin tree over its install
type StaleLockRowError ¶
type StaleLockRowError struct{ Message string }
StaleLockRowError reports a row a concurrent editor changed before this writer published it
func (*StaleLockRowError) Error ¶
func (e *StaleLockRowError) Error() string
type StatePackage ¶
type StatePackage interface {
Package
ExpectedStamp(extras []string) (string, error)
Apply(extras []string, explicit bool) error
}
StatePackage is a state of this install verified by a stamp and made true by Apply
func NewVenv ¶
func NewVenv(root string) StatePackage
State package of the project venv rooted at root, the PM installation's root when empty
type Store ¶
Store is one directory of immutable published entries plus a scratch area
func (*Store) Fetch ¶
func (s *Store) Fetch(rawURL, sha, scratch string, progress func(done, total int64) error, pause *PauseEvent) (string, error)
Fetches one pinned archive into the hash keyed cache
func (*Store) FetchMany ¶
func (s *Store) FetchMany(artifacts []Artifact, scratch string, progress ProgressFunc, pause *PauseEvent) ([]string, error)
Fetches a pinned plan with one aggregate progress stream, completed archives entering the cache even on a later pause
func (*Store) InstallLock ¶
Serializes writers on the store's advisory lock, saying what it waits on after two seconds
func (*Store) Publish ¶
Renames a staged tree into place atomically, keeping a concurrent winner's entry
type SyncOptions ¶
type SyncOptions struct {
Extras []string
Groups []string
Timeout time.Duration
Resolve bool
AllExtras bool
NoInstallProject bool
Locked bool
NoDefaultGroups bool
}
SyncOptions select what a sync installs, Resolve locking first where Python passes frozen False
type SyncVenvOptions ¶
type SyncVenvOptions struct {
Extras []string
Explicit bool
Repair bool
Automatic []string
Carried []string
ProjectRoot string
EvictIncompatiblePlugins bool
Plugins PluginInput
Stdout io.Writer
}
SyncVenvOptions select the extras, plugin source, repair and eviction policy and the output of a venv sync
type SystemExit ¶
type SystemExit struct{ Code int }
Exit status a pm command ends the process with, the error form of a Python SystemExit
func (*SystemExit) Error ¶
func (e *SystemExit) Error() string
type TOMLDecodeError ¶
type TOMLDecodeError struct{ Message string }
TOMLDecodeError is a document tomllib refuses, a ValueError in Python
func (*TOMLDecodeError) Error ¶
func (e *TOMLDecodeError) Error() string
type TarFilterError ¶
Tar member the data containment policy refuses, with the refusal kind and the offending path
func (*TarFilterError) Error ¶
func (e *TarFilterError) Error() string
type TarReadError ¶
Python exception tarfile raises while reading or extracting, its class name and message
func (*TarReadError) Error ¶
func (e *TarReadError) Error() string
type TargetCandidates ¶
TargetCandidates is one target's newest first candidate versions
type TargetVersion ¶
type TargetVersion struct{ Target, Version string }
TargetVersion is one target's exact version in a decision
type UndefinedMarkerError ¶
UndefinedMarkerError is packaging's UndefinedComparison or UndefinedEnvironmentName raised while evaluating a marker
func (*UndefinedMarkerError) Error ¶
func (e *UndefinedMarkerError) Error() string
type UnknownPackageError ¶
type UnknownPackageError struct{ Name string }
UnknownPackageError reports a name no registered definition carries
func (*UnknownPackageError) Error ¶
func (e *UnknownPackageError) Error() string
type UpdateArgs ¶
type UpdateArgs struct {
Names []string
Check bool
Target string
SkipTarget []string
UV bool
NPM bool
Termux bool
}
UpdateArgs are pm update's arguments, Target empty for every target
type UpdateLockHooks ¶
type UpdateLockHooks struct {
BindChild func(*exec.Cmd) (string, bool)
ResumeSuspended func(*exec.Cmd) error
Held func() bool
CheckoutLockFDs func(root string) ([]int, error)
}
Checkout lock calls the self update slice installs, each nil when the lock module offers no such call
type UpdateReceiptHooks ¶
type UpdateReceiptHooks struct {
RecordStopReason func(string)
}
Receipt call the self update slice installs, nil when the receipt module offers no such call
type Uv ¶
type Uv struct {
// contains filtered or unexported fields
}
Uv is astral's prebuilt uv everywhere upstream builds it and the termux main repo deb on bionic
func (*Uv) DebPackageName ¶
func (t *Uv) DebPackageName() string
Control field name the termux deb declares
type Venv ¶
type Venv struct {
BasePackage
// contains filtered or unexported fields
}
Venv is the project venv made true by a frozen uv sync of pyproject, uv.lock and the enabled extras
func (*Venv) Prepare ¶
func (v *Venv) Prepare(ctx context.Context, extras []string, opts VenvApplyOptions) (*VenvGeneration, error)
Prepares one complete environment generation for the caller to commit, removing it on any failure
func (*Venv) ProjectRoot ¶
Project whose venv this state describes
type VenvApplyOptions ¶
type VenvApplyOptions struct {
PluginDirs []MemberDir
Repair bool
Explicit bool
SkipInvalidSecondary bool
}
VenvApplyOptions shape one environment preparation, nil PluginDirs meaning the enabled members
type VenvGeneration ¶
VenvGeneration is a prepared environment and the resolved lock it was synced from
type VenvIsCurrentOptions ¶
type VenvIsCurrentOptions struct {
ProjectRoot string
Extras []string
Plugins PluginInput
}
VenvIsCurrentOptions name the checkout, the extras to add to the recorded union and the plugin members to probe
type VenvState ¶
type VenvState interface {
StatePackage
ProjectRoot() string
Stamp(ctx context.Context, extras []string, pluginDirs []MemberDir) (string, error)
Prepare(ctx context.Context, extras []string, opts VenvApplyOptions) (*VenvGeneration, error)
}
VenvState is the dependency environment state package a venv sync drives, the catalogue Venv or a test double
type Wheel ¶
Hash pinned wheel of one target
func NemoRelayWheel ¶
Locked nemo-relay wheel of a target, false where the lock carries no wheel for it
type WhisperCppCpu ¶
type WhisperCppCpu struct {
BinaryPackage
}
WhisperCppCpu is native local speech to text for ARM64 Windows, where faster-whisper has no wheel
type WritableCopyOptions ¶
WritableCopyOptions shape a writable copy lookup, NoRealize keeping it read only
Source Files
¶
- access_unix.go
- binary_core.go
- binary_core_base.go
- binary_rel_export.go
- build_compilers.go
- build_compilers_base.go
- build_env_base.go
- build_operations.go
- carried_extras.go
- cli.go
- cli_base.go
- cli_unix.go
- client.go
- client_base.go
- configured_features.go
- defaults.go
- distribution_pins_export.go
- download_state.go
- downloader.go
- dunder_version.go
- early_recovery.go
- early_recovery_base.go
- early_recovery_locks.go
- early_recovery_locks_unix.go
- environment.go
- environment_base.go
- environments.go
- environments_base.go
- environments_unix.go
- extras.go
- extras_base.go
- extras_catalog.go
- extras_lock_gen.go
- extras_provision.go
- extras_provision_base.go
- features.go
- filesystem.go
- filesystem_unix.go
- gateway_cmdline.go
- git_fingerprint.go
- import_health.go
- index_config.go
- index_config_base.go
- install.go
- install_manager.go
- install_states.go
- install_venv.go
- install_venv_base.go
- launchers.go
- launchers_console.go
- launchers_runtime.go
- launchers_unix.go
- leases.go
- leases_unix.go
- libatomic.go
- libatomic_unix.go
- live_checkout_guard.go
- lock.go
- log.go
- macos_signing.go
- manager.go
- manager_bind.go
- module_files.go
- native_build.go
- native_manifest_tree.go
- nemo_relay.go
- network.go
- node_probe.go
- old_updater.go
- old_updater_incomplete.go
- old_updater_unix.go
- operations.go
- operations_base.go
- orderedjson.go
- owns_user_path_export.go
- package.go
- packages.go
- packages_copy.go
- packages_linux.go
- packages_llama.go
- packages_llama_manager.go
- packages_posix.go
- packages_runtimes.go
- packages_runtimes_manager.go
- packages_tools.go
- packages_tools_manager.go
- packages_venv.go
- paths.go
- pep508.go
- pep508_eval.go
- pid_alive_unix.go
- pinned_source.go
- pip_check.go
- pip_check_base.go
- plugin_declarations.go
- plugin_eviction.go
- plugin_inputs.go
- plugin_inputs_base.go
- plugin_python_deps.go
- plugin_python_deps_base.go
- plugins_state.go
- process_state.go
- progress.go
- progress_unix.go
- project_venv.go
- publication.go
- publication_base.go
- pyjson.go
- pylit.go
- python_spec_export.go
- receipt.go
- recovery.go
- registry.go
- runtime.go
- runtime_environment.go
- runtime_environment_base.go
- runtime_provision_gate.go
- security_packages.go
- shell.go
- site_dirs.go
- site_dirs_other.go
- store.go
- tarfile_reader.go
- tarfile_reader_unix.go
- termux_libs.go
- test_seams.go
- toml.go
- toml_write.go
- update.go
- update_base.go
- update_handoff.go
- user_facing.go
- uv_cache_health.go
- uv_cache_health_base.go
- uv_toolchain.go
- venv_interpreter.go
- venv_interpreter_unix.go
- worker.go
- worker_base.go
- worker_operations.go
- worker_operations_base.go
- worker_pipe_unix.go
- worker_unix.go
- workspace.go
- workspace_base.go