rage

package
v0.93.0-rc.6 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: AGPL-3.0 Imports: 21 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package rage collects what a lich bug report needs into one archive: the facts that decide whether a report is actionable (version, platform, window, provider and plugin state), the environment lich was launched with, and the log generations — with the loopback token masked wherever it appeared.

It exists for the failure lich cannot report on itself: no window means no Settings › Help, so this runs from the command line and needs no running instance. Nothing is uploaded and nothing is filed — the archive stays on disk until the user attaches it to an issue they wrote themselves.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultBase

func DefaultBase(now time.Time) string

DefaultBase is the bundle's name without an extension: the archive file is this plus ".tar.gz", and the directory inside it is this exactly.

Types

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

Collector gathers a Report. The six probes are fields because each one reaches the machine (PATH, the provider CLIs, a confined spawn, the network, the running instance), and a test must answer for all of them.

func New

func New(configDir, version string, environ []string) *Collector

New returns a Collector reading the real machine. configDir is the OS config dir (os.UserConfigDir), the parent of lich's own directory, because that is what the runtime file and the log path are both resolved from.

func (*Collector) Bundle

func (c *Collector) Bundle(w io.Writer, root string) (Report, error)

Bundle writes the gzipped tar to w and returns the report it carries. root is the directory every entry sits under, so extracting two bundles side by side does not merge them.

type Entry

type Entry struct {
	Name string
	Size int64
	Dir  bool
}

Entry is one item in the lich config directory, reported by name and size so a missing database or an empty theme folder is visible without shipping any of their contents.

type Report

type Report struct {
	Version   string
	GoVersion string
	// Revision is the VCS stamp Go embeds when a build comes from a checkout,
	// suffixed "-dirty" for a modified tree. It is what identifies a build the
	// reporter compiled themselves, where Version says only "dev".
	Revision  string
	Platform  string
	Instance  string
	ConfigDir string
	LogPath   string
	Window    string
	// Sandbox is what a confined session would actually get on this machine,
	// proved rather than looked up: a backend installed and refused by the
	// kernel is a whole class of report where the session never opened and the
	// log holds only the launcher's error.
	Sandbox   string
	Providers []providers.Detected
	Plugin    []agentplugin.Status
	Entries   []Entry
}

Report is what report.md renders: every fact gathered about this machine, and none that identify the loopback session. The token is deliberately absent — the file outlives the instance it would name.

Jump to

Keyboard shortcuts

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