Documentation
¶
Overview ¶
Package kit hosts the canonical renderers for the af / rensei `kit` command tree, sourced from afclient.Kit / KitManifest / KitRegistrySource wire types.
Lifted from the previous rensei-tui resident copy under rensei-tui/internal/views/kit per ADR-2026-05-07-daemon-http-control-api.md §D3 (Wave 9 A2).
Two output paths:
- RenderList / RenderShow / RenderInstall / RenderToggle / RenderVerifySignature / RenderSources — ANSI rendering for TTY users.
- PlainList / PlainShow / PlainSources — deterministic plain-text rendering used by rensei-smokes integration tests and by `--plain` mode. No ANSI escapes, no emoji.
The KitDetectResult, AttestationChip, and ScopePill primitives from tui-components v0.2.0 are not yet shipped; trust state and detect rules render as plain text. Swap in when REN-1331 lands.
Index ¶
- func NoColorEnv() bool
- func PlainList(out io.Writer, kits []afclient.Kit) error
- func PlainShow(out io.Writer, m *afclient.KitManifest) error
- func PlainSources(out io.Writer, sources []afclient.KitRegistrySource) error
- func RenderInstall(out io.Writer, res *afclient.KitInstallResult, noColor bool) error
- func RenderList(out io.Writer, kits []afclient.Kit, noColor bool) error
- func RenderShow(out io.Writer, m *afclient.KitManifest, noColor bool) error
- func RenderSources(out io.Writer, sources []afclient.KitRegistrySource, noColor bool) error
- func RenderToggle(out io.Writer, k *afclient.Kit, enabled bool, noColor bool) error
- func RenderVerifySignature(out io.Writer, res *afclient.KitSignatureResult, noColor bool) error
- func TrustSymbol(trust afclient.KitTrustState, noColor bool) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NoColorEnv ¶
func NoColorEnv() bool
NoColorEnv returns true when NO_COLOR is set in the environment (per https://no-color.org). The caller may OR this with its own plainMode flag.
func PlainList ¶
PlainList is the smoke-pinning plain-text renderer for a kit list. Calls RenderList with noColor=true; rensei-smokes integration tests target this stable function name.
func PlainShow ¶
func PlainShow(out io.Writer, m *afclient.KitManifest) error
PlainShow is the smoke-pinning plain-text renderer for a kit manifest.
func PlainSources ¶
func PlainSources(out io.Writer, sources []afclient.KitRegistrySource) error
PlainSources is the smoke-pinning plain-text renderer for the registry-source list.
func RenderInstall ¶
RenderInstall writes the result of a kit installation.
func RenderList ¶
RenderList writes a human-readable table of installed kits. Each row shows: ID, VERSION, SCOPE, STATUS, SOURCE. When noColor is true (NO_COLOR=1 or plainMode), ANSI escapes are suppressed.
func RenderShow ¶
RenderShow writes the detail view for a single kit manifest.
func RenderSources ¶
RenderSources writes the list of configured kit registry sources.
func RenderToggle ¶
RenderToggle writes the result of a kit enable or disable operation.
func RenderVerifySignature ¶
RenderVerifySignature writes the result of a kit signature verification.
func TrustSymbol ¶
func TrustSymbol(trust afclient.KitTrustState, noColor bool) string
TrustSymbol returns the trust badge for a kit trust state. When noColor is true, plain ASCII fallbacks are used instead of emoji.
Types ¶
This section is empty.