agentdriver

package
v0.0.228 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 6 Imported by: 1 module, 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

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

View Source
const CodexAdhocGuardFlag = "--require-codex-connection-v1"

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.

func VerifyCodexAdhoc added in v0.0.211

func VerifyCodexAdhoc(ctx context.Context, d Driver) error

VerifyCodexAdhoc checks the actual re-exec binary, not the calling daemon's linked SDK version. The command is read-only and bounded; no provider starts.

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