acptools

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package acptools contains tools that are built in to ACP like file IO and terminals

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilesystemTools

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

FilesystemTools implements the ACP ReadTextFile and WriteTextFile endpoints. It is separate from TerminalTools to allow toggling local/remote execution separately.

func NewFilesystemTools

func NewFilesystemTools(logger zerolog.Logger) *FilesystemTools

func (*FilesystemTools) ReadTextFile

func (*FilesystemTools) WriteTextFile

type TerminalTools

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

TerminalTools implements the terminal-related methods of acp.Client. It runs commands as real OS processes and tracks their output and exit status, keyed by a generated terminal ID.

func NewTerminalTools

func NewTerminalTools(logger zerolog.Logger) *TerminalTools

NewTerminalTools constructs a TerminalTools with the given logger.

func (*TerminalTools) CreateTerminal

CreateTerminal starts a new command process and returns a terminal ID that can be used to inspect its output and status.

func (*TerminalTools) KillTerminal

KillTerminal terminates the terminal's process without releasing the terminal; its output and exit status remain available afterwards.

func (*TerminalTools) ReleaseTerminal

ReleaseTerminal frees the resources associated with a terminal, killing the underlying process if it is still running.

func (*TerminalTools) TerminalOutput

TerminalOutput returns the output captured so far for a terminal along with its exit status, if the command has completed.

func (*TerminalTools) WaitForTerminalExit

WaitForTerminalExit blocks until the terminal's command exits (or the context is cancelled) and returns its exit status.

Jump to

Keyboard shortcuts

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