optutil

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package optutil provides shared option resolution helpers for CLI backends.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendAddDirs

func AppendAddDirs(args []string, opts map[string]string, flagName string) []string

AppendAddDirs appends --add-dir (or the given flagName) for each valid entry in OptionAddDirs. Entries must be absolute paths without leading dashes. Invalid entries are silently skipped.

func RootOptionsSet

func RootOptionsSet(opts map[string]string) bool

RootOptionsSet reports whether either OptionMode or OptionHITL is present in opts. When true, root options take precedence over backend-specific permission/sandbox options.

func ValidateEffort

func ValidateEffort(prefix string, opts map[string]string) error

ValidateEffort checks that OptionEffort, if present, is a recognized value. The prefix is used in error messages (e.g., "claude", "codex").

func ValidateModeHITL

func ValidateModeHITL(prefix string, opts map[string]string) error

ValidateModeHITL checks OptionMode and OptionHITL for valid values. The prefix is used in error messages (e.g., "claude", "codex").

Types

This section is empty.

Jump to

Keyboard shortcuts

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