clientfsterm

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Server)

Option configures a Server.

func WithEnvScrub

func WithEnvScrub(scrub func(parent []string) []string) Option

WithEnvScrub sets the filter applied to a launched terminal's parent environment (composed by resolvedSandboxEnv: a libsandbox scrub plus operator vars). A nil filter is ignored, leaving the ScrubDenySecrets default.

type Server

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

Server is the one client-side fs+terminal capability server: it answers a downstream agent's fs/* and terminal/* callbacks against a single workspace root. Reads and writes are contained by internal/services/vfs (the same seam local_fs uses); a launched terminal's environment is scrubbed, never the raw os.Environ(). Its method set satisfies agentinstance's FileSystemServer, TerminalServer and InstanceFileSystem without importing that package.

func New

func New(root string, opts ...Option) (*Server, error)

New returns a Server rooted at root, containment resolved through internal/services/vfs. An empty root is refused. Without WithEnvScrub the terminal environment defaults to libsandbox.ScrubDenySecrets, so a child process never inherits the raw parent environment.

func (*Server) CommandRunner

func (s *Server) CommandRunner() localtools.CommandRunner

CommandRunner adapts the contained server to the seam local_shell consumes. The command runs through the same terminal the ACP capability serves, so it inherits the env scrub rather than the raw environment.

func (*Server) FileIO

func (s *Server) FileIO() localtools.FileIO

FileIO adapts the contained server to the filesystem seam local_fs consumes, for a shape that owns its machine rather than proxying to a client: the run and mission paths, which have no ACP client to answer them. Containment and the control-plane refusal are the server's, so this cannot reach past the workspace root the caller opened.

func (*Server) FileSystemCapabilities

func (s *Server) FileSystemCapabilities() libacp.FileSystemCapabilities

func (*Server) KillTerminal

func (*Server) ReadTextFile

func (*Server) Root

func (s *Server) Root() string

Root returns the resolved workspace root this server serves.

Jump to

Keyboard shortcuts

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