deprecation

package
v1.0.55 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package deprecation carries a process-level notice that the command currently being executed is a backward-compatibility alias, kept alive for users whose skill predates a refactor. The notice is surfaced in JSON output envelopes via output.PendingNotice (wired in cmd/root.go), mirroring internal/skillscheck.

A CLI process runs exactly one shortcut, so a single process-level slot is sufficient: the command's Execute records the notice before producing output, and the output layer reads it back when building the envelope.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetPending

func SetPending(n *Notice)

SetPending stores the notice for consumption by output decorators. Pass nil to clear.

Types

type Notice

type Notice struct {
	Command     string `json:"command"`
	Replacement string `json:"replacement,omitempty"`
	Skill       string `json:"skill,omitempty"`
}

Notice describes a deprecated command alias and the current command that replaces it. Replacement and Skill are optional.

func GetPending

func GetPending() *Notice

GetPending returns the pending deprecation notice, or nil.

func (*Notice) Message

func (n *Notice) Message() string

Message returns a single-line, AI-agent-parseable description of the alias plus the canonical fix (update the skill). Mirrors the style of internal/skillscheck.StaleNotice.Message ("..., run: lark-cli update").

Jump to

Keyboard shortcuts

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