Documentation
¶
Overview ¶
Package ui exposes the runtime environment's [status.Narrator] capability to starlark.
The provider is a thin passthrough — it carries no state of its own. Method bodies forward to `p.RuntimeEnvironment().Status.<Method>(msg)`. Configuration (writer, program name, color, silent) lives on the [status.Narrator] instance the client installed at bootstrap; the same instance flows from the cli facade into the runtime environment, ensuring `--silent`, color settings, and program-name prefixing apply uniformly across cli emissions, provider emissions, and starlark `print()` output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
op.ProviderBase
}
Provider exposes the [status.Narrator] capability to starlark.
+devlore:access=immediate
func NewProvider ¶
func NewProvider(runtimeEnvironment *op.RuntimeEnvironment) *Provider
NewProvider constructs a *Provider for the registered ProviderConstructor.
The provider holds no state of its own; configuration lives on the [status.Narrator] instance the runtime environment carries. Method bodies retrieve the narrator via p.RuntimeEnvironment().Status.
func (*Provider) Error ¶
Error reports a non-fatal problem to the user.
Parameters:
- `msg`: the error message to display.
func (*Provider) Fail ¶
Fail reports a fatal error and aborts execution.
Parameters:
- `msg`: the fatal error message.
Returns:
- `error`: a non-nil error wrapping msg.
func (*Provider) Note ¶
Note informs the user of progress.
Parameters:
- `msg`: the informational message to display.
func (*Provider) Print ¶
Print emits raw text without categorized-message decoration.
Used by starlark `print()` output; reads as the script wrote it (no [program] [symbol] prefix).
Parameters:
- `msg`: the raw text to emit.