cli

package
v0.1.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package cli implements the `ozy` command surface (SPEC.md §15). Every broker-backed command routes through the same shared broker the MCP adapter uses, so the two adapters cannot diverge. Output honors a global --format flag (human, json, concise); operations whose behavior is deferred return a structured NOT_IMPLEMENTED result and a non-zero exit code.

Index

Constants

View Source
const Version = "0.1.0-dev"

Version is the build version reported by `ozy --version` and the MCP adapter.

Variables

This section is empty.

Functions

func Execute

func Execute(args []string, stdout, stderr io.Writer) int

Execute runs the CLI with the given args and writers, returning the process exit code. Cobra usage errors yield exit code 1; structured failures rendered by commands set the code via the app.

func OverrideSidecarInspector

func OverrideSidecarInspector(f SidecarInspector)

OverrideSidecarInspector replaces the default inspector. Tests use this to inject fakes. Production code should never call this.

Types

type SidecarInspector

type SidecarInspector func(ctx context.Context) SidecarStatus

SidecarInspector returns the current embedding-subsystem status. The default (unset) inspector always reports Unavailable so `ozy doctor` renders the lexical-only notice without depending on the sidecar package. The sidecar package overrides this in an init() to wire the real probe.

type SidecarStatus

type SidecarStatus struct {
	Available   bool
	Model       string
	Dim         int
	Backend     string
	ToolCount   int
	VectorCount int
	Reason      string
}

SidecarStatus is the embedding-subsystem health snapshot rendered by `ozy doctor`. Available=true means the Python sidecar is up and answered health/stats. Available=false means lexical-only mode is in effect (the Reason field carries the cause).

Jump to

Keyboard shortcuts

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