localworkspace

package
v0.0.12-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 24 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const CapabilityDirectory = agentcapabilities.Directory
View Source
const WriteMaxBytes = proto.WorkspaceWriteMaxBytes

This private transfer bound is distinct from the public inline-file limit.

Variables

View Source
var ErrInitializationUnconfirmed = errors.New("Runtime initialization unconfirmed")

Functions

func InitializationDirectory

func InitializationDirectory() (string, error)

InitializationDirectory resolves the operator's local resource layout. The protocol and preparation operations do not distinguish Environment sources.

func MCPStdioCommand

func MCPStdioCommand(server proto.EnvironmentMCP) (string, []string)

MCPStdioCommand resolves the common installed manifest in the daemon.

func PackageDirectory

func PackageDirectory() (string, error)

func ReadOptionalToolEnvironment

func ReadOptionalToolEnvironment() (map[string]string, error)

ReadOptionalToolEnvironment permits a Runtime without explicit user variables.

func ReadToolEnvironment

func ReadToolEnvironment() (map[string]string, error)

ReadToolEnvironment reads bounded explicit configuration, never ambient secrets.

func ResolvePackageManagerCommand

func ResolvePackageManagerCommand(command string, args []string) (string, []string, error)

ResolvePackageManagerCommand runs Windows npm/npx shims through their installed JavaScript entrypoints. It does not pass arguments through an extra shell.

func RuntimeNetworkPolicy

func RuntimeNetworkPolicy() (agentnetwork.Policy, error)

RuntimeNetworkPolicy reads deployment configuration, never caller options.

func SkillPath

func SkillPath(skill agentcapabilities.InstalledSkill) string

func ToolEnvironmentFile

func ToolEnvironmentFile() (string, error)

ToolEnvironmentFile returns the validated Runtime-owned source without copying its values into a Harness profile. An unconfigured environment has no file.

Types

type Binding

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

Binding freezes operator-owned identity and paths for one Runtime lifetime.

func Load

func Load() (*Binding, error)

func NewWithCapabilityDirectory

func NewWithCapabilityDirectory(environment, session, workspace, directory string) (*Binding, error)

NewWithCapabilityDirectory freezes paths selected by the Runtime operator.

func (*Binding) AcceptsFileWrite

func (b *Binding) AcceptsFileWrite(environment, session string) bool

func (*Binding) ApplyRuntimePreparation

func (b *Binding) ApplyRuntimePreparation(ctx context.Context, input proto.RuntimePreparePayload, data []byte) error

ApplyRuntimePreparation settles every filesystem operation before returning. A cancelled caller never leaves an unowned installation goroutine behind.

func (*Binding) CanExport

func (b *Binding) CanExport() bool

func (*Binding) Configure

Configure validates the reference before supplying the immutable local cwd.

func (*Binding) ExportOutputs

func (b *Binding) ExportOutputs(ctx context.Context, output io.Writer) error

func (*Binding) ListWorkspaceDirectory

func (b *Binding) ListWorkspaceDirectory(ctx context.Context, path string, limit int) (agent.WorkspaceDirectoryResult, error)

func (*Binding) Matches

func (b *Binding) Matches(environment, session string) bool

func (*Binding) NetworkPolicy

func (b *Binding) NetworkPolicy() agentnetwork.Policy

NetworkPolicy returns a copy of the frozen execution authority.

func (*Binding) Prepare

Prepare runs under the admitted executor's lifetime, before native startup. Reconnection validates installed contents without reopening mutable sources.

func (*Binding) ReadToolEnvironment

func (b *Binding) ReadToolEnvironment() (map[string]string, error)

ReadToolEnvironment reads explicit initialization values for this installation.

func (*Binding) ReadWorkspaceFile

func (b *Binding) ReadWorkspaceFile(ctx context.Context, path string, limit int) (agent.WorkspaceReadResult, error)

ReadWorkspaceFile returns the existing protocol's bounded prefix; the wire has no offset field. Non-regular entries cannot become unbounded streams.

func (*Binding) WriteWorkspaceFile

func (b *Binding) WriteWorkspaceFile(ctx context.Context, path string, data []byte) (result agent.WorkspaceWriteResult, err error)

WriteWorkspaceFile starts only after the caller supplies the complete bounded body. Core must persist mutation ownership before invoking this operation.

type InitializationFailure

type InitializationFailure struct{ ExitCode *int }

InitializationFailure contains only a confirmed step's safe exit status.

func (*InitializationFailure) Error

func (*InitializationFailure) Error() string

Jump to

Keyboard shortcuts

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