Documentation
¶
Overview ¶
Package toolenv prepares retained, version-isolated CLI installations. It never installs tools from the timed operation path or changes the process environment.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Diagnostics ¶
type Diagnostics struct {
TaskOrdinal *int64 `json:"task_ordinal,omitempty"`
WallMS int64 `json:"wall_ms"`
Tools []ToolDiagnostic `json:"tools,omitempty"`
Error string `json:"error,omitempty"`
}
type Environment ¶
func (Environment) Ready ¶
func (e Environment) Ready() bool
Ready is strictly local and read-only. False means return to setup, never install or resolve a package inside the task's execution budget.
type Manager ¶
type Manager struct{ Root string }
Manager owns only a local cache. Providers can retain/mount Root at the same absolute path. Package managers and their runtimes must exist in the base.
func (*Manager) Prepare ¶
func (m *Manager) Prepare(ctx context.Context, scopes []Scope) (env Environment, diag Diagnostics, err error)
Prepare resolves each declaration on first use, sharing completed entries across scopes/invocations. No manager runs on a warm hit.
func (*Manager) PrepareNixPackage ¶
func (m *Manager) PrepareNixPackage(ctx context.Context, p NixPackage) (root string, reused bool, err error)
PrepareNixPackage realizes only the pinned output, with a retained GC root. It never re-evaluates the original selector or builds missing outputs.
type NixPackage ¶
type NixPackage struct {
StorePath string `json:"store_path"`
System string `json:"system"`
Manifest json.RawMessage `json:"manifest"`
}
NixPackage is evaluation metadata, not an installed package. StorePath pins realization to exactly the output described by Manifest, even if a ref moves.
func DescribeNixPackage ¶
func DescribeNixPackage(ctx context.Context, reference, baseDir string) (*NixPackage, error)
DescribeNixPackage evaluates passthru.c2j and the output identity together. Import-from-derivation is forbidden: metadata inspection cannot realize code.
func (NixPackage) Validate ¶
func (p NixPackage) Validate() error