cell

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package cell defines the canonical harness/extension coordinate space shared by the Pasture installer and activation contract.

A Cell is one (harness, extension) coordinate. Exactly nine cells exist: three harnesses (claude-code, opencode, codex) times three extension axes (skills, agents, hooks). Every installer document, activation contract, and confirmed inventory serializes its cells in one frozen canonical order so goldens and state files never drift on ordering.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFault

func NewFault(op, rule, reason, where, when, impact, fix string, cause error) error

NewFault builds a six-part installer fault. It is exported so sibling installer packages raise identically shaped diagnostics.

Types

type Cell

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

Cell is one validated (harness, extension) coordinate.

func CanonicalCells

func CanonicalCells() []Cell

CanonicalCells returns all nine cells in frozen canonical order.

func New

func New(harness Harness, extension Extension) (Cell, error)

New validates and constructs a Cell. It rejects unknown harnesses or axes so no document can address a coordinate outside the nine-cell space.

func ParseCell

func ParseCell(value string) (Cell, error)

ParseCell resolves a "harness.extension" string to its typed cell.

func (Cell) Extension

func (c Cell) Extension() Extension

Extension returns the cell's extension axis.

func (Cell) Harness

func (c Cell) Harness() Harness

Harness returns the cell's harness identity.

func (Cell) ID

func (c Cell) ID() artifact.ComponentID

func (Cell) Index

func (c Cell) Index() int

Index returns the cell's position in the canonical nine-cell order, or -1 if the cell is invalid.

func (Cell) IsValid

func (c Cell) IsValid() bool

IsValid reports whether the cell was validly constructed.

func (Cell) String

func (c Cell) String() string

String returns "harness.extension", e.g. "claude-code.skills".

type Extension

type Extension = artifact.Extension

Extension is a strongly-typed extension axis. Its zero value is invalid; use SkillsAxis, AgentsAxis, or HooksAxis. The three axes are global: the installer asks once which axes apply to every enabled harness.

func AgentsAxis

func AgentsAxis() Extension

AgentsAxis is the agents extension axis.

func CanonicalExtensions

func CanonicalExtensions() []Extension

CanonicalExtensions returns the three axes in frozen order.

func HooksAxis

func HooksAxis() Extension

HooksAxis is the security-sensitive hooks extension axis (default disabled).

func ParseExtension

func ParseExtension(value string) (Extension, error)

ParseExtension resolves a canonical axis name to its typed value. It rejects unknown axes actionably rather than returning a silent zero value.

func SkillsAxis

func SkillsAxis() Extension

SkillsAxis is the skills extension axis.

type Fault

type Fault struct {
	Op     string
	Rule   string
	Reason string
	Where  string
	When   string
	Impact string
	Fix    string
	Cause  error
}

Fault is the shared six-part actionable error for the Pasture installer domain. Every rejected value or boundary reports what went wrong (Rule + Reason), where it failed (Where), when it failed (When), what it means for the caller (Impact), and how to fix it (Fix), so callers never see an opaque "invalid input" message.

func (*Fault) Error

func (f *Fault) Error() string

Error renders the six-part diagnostic on a single line.

func (*Fault) Unwrap

func (f *Fault) Unwrap() error

Unwrap exposes the lower-level cause, if any.

type Harness

type Harness = artifact.Harness

func CanonicalHarnesses

func CanonicalHarnesses() []Harness

CanonicalHarnesses returns the three harnesses in frozen order.

Jump to

Keyboard shortcuts

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