Skip to main content

Crate wyvern

Crate wyvern 

Source
Expand description

Wyvern CLI library — load → validate → run → emit pipeline.

main.rs is a thin binary wrapper around pipeline::run_from_loaded.

Modules§

examples
Bundled example discovery from README frontmatter. Bundled example discovery from {wyvern_share}/examples/**/README.md frontmatter.
extensions
CLI extension registry, match, preexec, and expand (ADR-0022). CLI extension registry: load, merge, match, expand, and dispatch.
workflow
Wizard workflow hooks and next_wizard chain (REQ-0124–0126). Wizard workflow hooks and next_wizard chain loop (REQ-0124–0126).

Structs§

Allowlist
Allowlisted roots for workflow script and next_wizard paths.
CliArgs
Parsed CLI invocation: host options + remaining positional/stdin args.
ExtensionRegistry
Merged, extends-resolved extension registry.
NextInvocation
Next hop loaded from next_wizard.path (CLI resolves; host does not).
WorkflowRunner
Runs workflow.pre / workflow.post through Phase F preexec helpers.

Enums§

BrowsersError
CLI browsers subcommand failure.
BuiltinDomain
Built-in CLI family that owns subcommands (browsers, extensions, examples, wizard).
EmitError
Failure serializing stdout or structured stderr JSON at the CLI emit boundary.
ExamplesCmdError
CLI examples subcommand failure.
ExtensionError
Structured extension-engine failure.
ExtensionMatch
Successful argv match against one extension.
LoadError
Failure while loading command input from argv or stdin.
NearMissKind
Why remainder argv did not match an extension (REQ-0136).
PipelineError
Pipeline failure after load: stage stderr + exit, or emit-boundary serialize failure.
PreexecFailureKind
Why a preexec subprocess failed.
UsageErrorKind
Host-flag / env usage failure kind for structured stderr recovery (RBP-F009).
ViewerSpawnError
Failure locating or launching wyvern-viewer.
WizardCmdError
Failure from wyvern wizard ….
WizardCmdResult
Result of a successful wizard lint invocation.
WizardLintStageError
Structured wizard lint stage failure (RBP-001 / RBP-F001).
WorkflowError
Workflow / chain failure (stderr via wyvern_schema::ErrorCode::WorkflowError).

Constants§

NEXT_WIZARD_MAX_DEPTH
Maximum wizard sessions in one next_wizard chain (REQ-0126).
WORKFLOW_SCRIPT_TIMEOUT
Timeout for every workflow pre/post script (REQ-0124 / REQ-0125).

Functions§

apply_host_overrides
Apply extension host.ui_root over CLI --ui-root when set (contract §7).
browsers_usage_message
Usage text for wyvern browsers --help / -h.
check_chain_depth
Fail when hop exceeds NEXT_WIZARD_MAX_DEPTH.
emit_extension_error
Serialize an extension-engine error as stderr JSON.
emit_fatal_internal
Emit static internal stderr JSON and exit with code 8 (REQ-0078).
emit_host_error
Serialize a wyvern_host::HostError as stderr JSON (REQ-0073).
emit_io_error
Serialize an I/O load error as stderr JSON.
emit_near_miss
Serialize a near-miss as the existing StderrError envelope.
emit_parse_error
Serialize a parse load error as stderr JSON.
emit_stdout
Serialize a successful wyvern_schema::CommandResult for stdout.
emit_usage_error
Serialize LoadError::Usage as stderr JSON with flag-specific recovery.
emit_usage_message
Serialize a usage / unknown-subcommand error as stderr JSON (exit 2).
emit_validation_error
Serialize a validation/state error as stderr JSON.
emit_wizard_lint_stage_error
Serialize a wizard lint stage failure as stderr JSON.
emit_workflow_error
Serialize a workflow / chain failure as stderr JSON (WORKFLOW_ERROR, exit 9).
examples_usage_message
Usage text for wyvern examples --help / -h.
load_command_input
Load a command Value from positional args or stdin.
merge_wizard_config
Deep-merge base ← input ← config_patch.
parse_cli_args
Split argv into host flags and positionals.
resolve_next_wizard
Resolve an optional next_wizard object on finish JSON.
resolve_viewer_bin
Resolve wyvern-viewer via sibling → CARGO_BIN_EXEWYVERN_VIEWER_BINPATH.
run_browsers_command
Run a browsers subcommand; returns stdout text on success.
run_examples_command
Run wyvern examples …; returns stdout text on success.
run_from_loaded
Validate value, run the host, and return stdout JSON on success.
run_wizard_command
Run wyvern wizard …; returns a WizardCmdResult on success.
run_wizard_workflow_loop
Every Command::Wizard one-shot enters this loop (REQ-0124–0126).
set_pipeline_correlation_id
Bind the session correlation id for pipeline tracing events (binary calls after init).
spawn_embedded_viewer
Spawn wyvern-viewer for dialog_url with optional size hints.
usage_message
Canonical usage text for --help / -h / help and invalid argv.
wizard_usage_message
Usage text for wyvern wizard --help / wyvern wizard lint --help.