commands

package
v0.0.0-...-cb63059 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 32 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 commands composes only the implemented standard authoring slice.

Index

Constants

View Source
const ReleaseMode = "release-cli-contract-v1"

Variables

View Source
var Enabled string

Enabled is deliberately build-time only. Release builds retain the v1 surface. Internal checkpoint builds set -X <this-package>.Enabled=vertical-slice-v1.

View Source
var Revision = "unversioned"

Functions

func CompletionInvocation

func CompletionInvocation(root *cobra.Command, args []string) bool

func IsAuthorInvocation

func IsAuthorInvocation(args []string, root *cobra.Command) bool

IsAuthorInvocation uses Cobra selection on an invocation-owned, unconfigured root. Find observes flag definitions without parsing or executing any command. Callers must supply a fresh root, just as they do for Execute.

func IsEnabled

func IsEnabled() bool

func IsRelease

func IsRelease() bool

func NewVersionCommand

func NewVersionCommand() (*cobra.Command, error)

func OutputFormat

func OutputFormat(root *cobra.Command, args []string) string

OutputFormat observes only the real tree's flag arities, including error paths.

Types

type App

type App struct {
	Projects project.Service
	Revision string
	// ClientRegistry is the set of client adapters this binary reports
	// compatibility against. The main that builds the App decides it; without
	// one the compat report has nothing to ask about the clients it names.
	ClientRegistry *clients.Registry
	// PublicContract opts into the private Phase 6 contract; mains retain their existing mode.
	PublicContract  bool
	Release         *ReleaseOptions
	MCPRuntime      bool
	Bootstrap       bool
	BootstrapRunner authorbootstrap.Runner
	JSONMaintenance bool
}

func (App) Execute

func (a App) Execute(ctx context.Context, args []string, streams authoringcli.Streams, build RootBuilder) error

Execute renders once, after Factory.Execute handles every Cobra lifecycle exit. All state, including the enclosing root/options, is invocation-owned. Raw Cobra errors and buffered help/parser output never enter machine-readable reports.

func (App) ReleaseSelection

func (a App) ReleaseSelection(args []string, build RootBuilder) (root *cobra.Command, author, noEffect bool, err error)

ReleaseSelection builds the same complete tree used by Execute, with inert captures. Installer construction is dependency-free until a genuine job wins.

type Invocation

type Invocation struct {
	Command *cobra.Command
	Values  map[string][]string
}

func (Invocation) Bool

func (in Invocation) Bool(name string) bool

Bool observes pflag's final boolean value. Invalid input never implies intent; compatibility still rejects the invocation based on explicit flag presence.

type ReleaseOptions

type ReleaseOptions struct {
	Product, Version string
	Reject           func(Invocation) error
}

ReleaseOptions is explicit private composition, never environment discovery. Reject receives observations from the shared parser and may only reject.

type RootBuilder

type RootBuilder func(...authoringcli.Factory) (*cobra.Command, error)

Jump to

Keyboard shortcuts

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