Documentation
¶
Overview ¶
Package agent defines and validates the process specifications used by Relayer. It intentionally contains no process-launching logic.
Index ¶
Constants ¶
const ( // BackendPTY selects Relayer's built-in pseudo-terminal implementation. BackendPTY = "pty" // BackendTmux selects detached tmux sessions with an interactive attach path. BackendTmux = "tmux" // BackendAuto prefers tmux when it is available and falls back to PTY. BackendAuto = "auto" // AdapterGeneric selects the built-in prompt adapter that works with any // command-line program. AdapterGeneric = "generic" )
Variables ¶
This section is empty.
Functions ¶
func IsSensitiveEnvName ¶
IsSensitiveEnvName reports whether an environment variable name commonly carries credentials. It is deliberately conservative because callers use this classification to prevent accidental display of values.
func IsSupportedBackend ¶
IsSupportedBackend reports whether name is a backend selector understood by Relayer. BackendAuto is a selector rather than a concrete runtime backend.
Types ¶
type Spec ¶
type Spec struct {
ID string
Name string
Command []string
Shell string
Cwd string
Env map[string]string
Adapter string
Backend string
}
Spec describes one agent process. Command contains an executable followed by its arguments, while Shell contains a script interpreted by the platform shell. Exactly one of Command and Shell must be configured.
func ValidateAll ¶
ValidateAll validates every specification and rejects identifiers that only differ by case. The returned slice and every mutable field are independent from the input.