agentdriver

package
v0.0.78 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package agentdriver resolves the host process argv used to re-exec into agent-run CLI (ForceNew follow-up and TTY __serve_* children).

Implementation lives in github.com/xhd2015/tty-watch/pkgs/agentdriver so that agent-pro and standalone tty-watch share the same Driver type identity.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(d Driver, remainder ...string) (*exec.Cmd, error)

Command resolves d (if needed), builds argv with remainder, and returns *exec.Cmd.

func CommandContext

func CommandContext(ctx context.Context, d Driver, remainder ...string) (*exec.Cmd, error)

CommandContext is like Command with a context.

func MustArgv

func MustArgv(d Driver, remainder ...string) ([]string, error)

MustArgv is Argv after Resolve; for tests and call sites that already handle Resolve.

Types

type Driver

type Driver = tw.Driver

Driver is the host re-exec configuration for agent-run embedding. Type-aliased to tty-watch so values can be passed into ttywatch APIs.

func DefaultSelf

func DefaultSelf() (Driver, error)

DefaultSelf returns Driver{Binary: abs path of this process, Args: nil}.

func Resolve

func Resolve(d Driver) (Driver, error)

Resolve returns a Driver with absolute Binary. Empty Binary uses DefaultSelf.

Jump to

Keyboard shortcuts

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