Documentation
¶
Index ¶
- Constants
- func ContextMismatchError(format string, args ...any) error
- func FilterMessages(items []listItem, opts FilterOptions) []listItem
- func GetExitCode(err error) int
- func NotFoundError(format string, args ...any) error
- func Run(args []string, version string) error
- func TimeoutError(format string, args ...any) error
- func UsageError(format string, args ...any) error
- func WithExitCode(code int, err error) error
- type CommandHandler
- type CommandInfo
- type ExitCodeError
- type FilterOptions
- type SessionContextError
- type TreeRelation
Constants ¶
const ( // ExitSuccess indicates the command completed successfully. ExitSuccess = 0 // ExitError indicates a general error occurred. ExitError = 1 // ExitUsage indicates invalid arguments or flags were provided. ExitUsage = 2 // ExitNotFound indicates a requested resource was not found // (message, config, agent, etc.). ExitNotFound = 3 // ExitTimeout indicates a timeout occurred (watch, monitor commands). ExitTimeout = 4 // ExitContextMismatch indicates a valid command was blocked because its // resolved mailbox root conflicts with the pinned AMQ session context. ExitContextMismatch = 5 )
Exit codes for CLI commands. These provide semantic meaning for scripting and automation.
Variables ¶
This section is empty.
Functions ¶
func ContextMismatchError ¶ added in v0.42.1
ContextMismatchError creates an error with ExitContextMismatch code.
func FilterMessages ¶ added in v0.9.6
func FilterMessages(items []listItem, opts FilterOptions) []listItem
FilterMessages returns items that match all provided filter options.
func GetExitCode ¶ added in v0.9.6
GetExitCode extracts the exit code from an error. Returns ExitSuccess (0) if err is nil. Returns the wrapped code if err is an *ExitCodeError. Returns ExitError (1) for all other errors.
func NotFoundError ¶ added in v0.9.6
NotFoundError creates an error with ExitNotFound code.
func TimeoutError ¶ added in v0.9.6
TimeoutError creates an error with ExitTimeout code.
func UsageError ¶ added in v0.9.6
UsageError creates an error with ExitUsage code.
func WithExitCode ¶ added in v0.9.6
WithExitCode wraps an error with a specific exit code.
Types ¶
type CommandHandler ¶ added in v0.23.0
CommandHandler is the function signature for command handlers in the registry.
type CommandInfo ¶ added in v0.23.0
type CommandInfo struct {
Name string
Summary string
Description string
LongDescription []string
Examples []string
Handler CommandHandler
Children []CommandInfo
}
CommandInfo describes a top-level command or subcommand for help generation and future routing/completion work.
type ExitCodeError ¶ added in v0.9.6
ExitCodeError wraps an error with a specific exit code.
func (*ExitCodeError) Error ¶ added in v0.9.6
func (e *ExitCodeError) Error() string
func (*ExitCodeError) Unwrap ¶ added in v0.9.6
func (e *ExitCodeError) Unwrap() error
type FilterOptions ¶ added in v0.9.6
FilterOptions defines filter criteria for listing messages.
type SessionContextError ¶ added in v0.42.1
type SessionContextError struct {
Message string
}
SessionContextError identifies an unsafe or incoherent mailbox context. It is distinct from a usage error: the command syntax was valid.
func (*SessionContextError) Error ¶ added in v0.42.1
func (e *SessionContextError) Error() string
type TreeRelation ¶ added in v0.44.0
type TreeRelation uint8
TreeRelation is a physical-filesystem relationship. Unknown is deliberately distinct from Different: callers must choose whether unverifiable identity is advisory or authority-bearing instead of accidentally collapsing failures.
const ( TreeRelationUnknown TreeRelation = iota TreeRelationSame TreeRelationDifferent )
func (TreeRelation) String ¶ added in v0.44.0
func (r TreeRelation) String() string
Source Files
¶
- amqrc_security_unix.go
- cleanup.go
- cli.go
- common.go
- completion.go
- coop.go
- coop_exec_env.go
- coop_exec_unix.go
- coop_wake_reclaim_unix.go
- delivery_reads.go
- delivery_root.go
- delivery_status.go
- dlq.go
- doctor.go
- doctor_ops.go
- drain.go
- env.go
- exitcode.go
- extensions.go
- filter.go
- inbox_collect.go
- inbox_item.go
- init.go
- integration_kanban.go
- integration_symphony.go
- list.go
- monitor.go
- presence.go
- presence_source.go
- read.go
- receipts.go
- registry.go
- reply.go
- route.go
- send.go
- session_context.go
- shell_setup.go
- sibling_backlog.go
- swarm.go
- thread.go
- trace.go
- tree_identity.go
- tree_identity_unix.go
- update_check.go
- upgrade.go
- validate.go
- wake.go
- wake_attention.go
- wake_control_linux.go
- wake_control_other.go
- wake_file_identity_linux.go
- wake_injector_status.go
- wake_input_linux.go
- wake_lifecycle_guard_unix.go
- wake_lock.go
- wake_lock_at_unix.go
- wake_message_identity_unix.go
- wake_metadata.go
- wake_metadata_unix.go
- wake_owner_acquire_unix.go
- wake_owner_child_linux.go
- wake_owner_child_unix.go
- wake_owner_observation_linux.go
- wake_owner_observation_unix.go
- wake_owner_recover_unix.go
- wake_owner_stop_linux.go
- wake_owner_stop_unix.go
- wake_owner_storage_unix.go
- wake_owner_transition.go
- wake_owner_transition_unix.go
- wake_prepared_unix.go
- wake_process_linux.go
- wake_raw_orphan_unix.go
- wake_ready_unix.go
- wake_repair_at_unix.go
- wake_repair_dirs_linux.go
- wake_repair_dirs_unix.go
- wake_repair_floor_unix.go
- wake_repair_handoff_linux.go
- wake_repair_handoff_unix.go
- wake_repair_rename_linux.go
- wake_retire_unix.go
- wake_target.go
- wake_target_owner_unix.go
- wake_terminal_authority_unix.go
- wake_terminal_guard_unix.go
- wake_terminal_match_linux.go
- wake_terminate_legacy_test_linux.go
- wake_terminate_linux.go
- wake_tiocsti_unix.go
- wake_tty_path_linux.go
- wake_unix.go
- watch.go
- who.go
- worktree_divergence.go