MingaEditor.Shell.Entry (Minga v0.1.0)

Copy Markdown View Source

Registered shell metadata.

Shell entries are source-owned contributions. The registry keeps this validated shape in persistent_term so render and input hot paths can resolve the active shell without sorting or calling extension code.

Summary

Functions

Builds a validated built-in shell entry or raises if the shell module is invalid.

Builds a validated shell entry.

Returns an entry with a registry-assigned generation.

Types

capability()

@type capability() :: :gui | :tui

source()

t()

@type t() :: %MingaEditor.Shell.Entry{
  capabilities: [capability()],
  default?: boolean(),
  description: String.t(),
  display_name: String.t(),
  generation: non_neg_integer(),
  id: atom(),
  module: module(),
  source: source()
}

Functions

builtin!(id, module, display_name, description, default?)

@spec builtin!(atom(), module(), String.t(), String.t(), boolean()) :: t()

Builds a validated built-in shell entry or raises if the shell module is invalid.

new(attrs)

@spec new(keyword() | map()) :: {:ok, t()} | {:error, term()}

Builds a validated shell entry.

with_generation(entry, generation)

@spec with_generation(t(), non_neg_integer()) :: t()

Returns an entry with a registry-assigned generation.