kit

package
v0.7.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2026 License: MIT Imports: 7 Imported by: 0

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

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

func PlainList(out io.Writer, kits []afclient.Kit) error

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

func RenderInstall(out io.Writer, res *afclient.KitInstallResult, noColor bool) error

RenderInstall writes the result of a kit installation.

func RenderList

func RenderList(out io.Writer, kits []afclient.Kit, noColor bool) error

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

func RenderShow(out io.Writer, m *afclient.KitManifest, noColor bool) error

RenderShow writes the detail view for a single kit manifest.

func RenderSources

func RenderSources(out io.Writer, sources []afclient.KitRegistrySource, noColor bool) error

RenderSources writes the list of configured kit registry sources.

func RenderToggle

func RenderToggle(out io.Writer, k *afclient.Kit, enabled bool, noColor bool) error

RenderToggle writes the result of a kit enable or disable operation.

func RenderVerifySignature

func RenderVerifySignature(out io.Writer, res *afclient.KitSignatureResult, noColor bool) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL