codex

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package codex publishes the immutable Codex target descriptor consumed by installation. It adapts the canonical codegen target without creating a second component identity or activation-state authority.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateComponentLayout

func ValidateComponentLayout(component Component) error

ValidateComponentLayout proves one immutable component owns only its closed public global paths. Host activation calls it before filesystem access.

Types

type Component

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

Component is one canonical installer coordinate and its immutable target bundle. Default enablement is descriptive; hooks are always default-off.

func NewComponent

func NewComponent(extension artifact.Extension, packageID PackageID, bundle artifact.Bundle, defaultEnabled bool) (Component, error)

NewComponent constructs one canonical Codex component. Hooks cannot be default-enabled; that policy is statically enforced rather than left to a UI.

func (Component) Bundle

func (c Component) Bundle() artifact.Bundle

func (Component) DefaultEnabled

func (c Component) DefaultEnabled() bool

func (Component) Extension

func (c Component) Extension() artifact.Extension

func (Component) ID

func (Component) IsValid

func (c Component) IsValid() bool

func (Component) Layout

func (c Component) Layout() ComponentLayout

func (Component) PackageID

func (c Component) PackageID() PackageID

type ComponentLayout

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

ComponentLayout is the closed installation layout for one typed Codex extension. It is defined once and shared by descriptor construction, activation construction, and independent fixture verification.

func (ComponentLayout) Extension

func (l ComponentLayout) Extension() artifact.Extension

func (ComponentLayout) Prefix

func (l ComponentLayout) Prefix() string

func (ComponentLayout) PublicFiles

func (l ComponentLayout) PublicFiles() []string

type PackageID

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

PackageID is the closed Codex package identity paired with its installer extension. The zero value and cross-extension package names are invalid.

func NewPackageID

func NewPackageID(extension artifact.Extension, value codegen.CodexComponentID) (PackageID, error)

func (PackageID) Extension

func (p PackageID) Extension() artifact.Extension

func (PackageID) IsValid

func (p PackageID) IsValid() bool

func (PackageID) String

func (p PackageID) String() string

type TargetDescriptor

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

TargetDescriptor exposes exactly skills, agents, and hooks in canonical order. It contains no destination, mutable install state, or trust approval.

func Descriptor

func Descriptor() (TargetDescriptor, error)

Descriptor constructs the production descriptor solely from the embedded generated snapshot, making it safe from an unrelated empty working directory.

func NewTargetDescriptor

func NewTargetDescriptor(skills, agents, hooks Component) (TargetDescriptor, error)

NewTargetDescriptor assembles the closed three-component target using the pinned Codex runtime contract.

func (TargetDescriptor) Agents

func (d TargetDescriptor) Agents() Component

func (TargetDescriptor) Component

func (d TargetDescriptor) Component(extension artifact.Extension) (Component, error)

func (TargetDescriptor) Components

func (d TargetDescriptor) Components() []Component

func (TargetDescriptor) Harness

func (d TargetDescriptor) Harness() ir.HarnessID

func (TargetDescriptor) Hooks

func (d TargetDescriptor) Hooks() Component

func (TargetDescriptor) IsValid

func (d TargetDescriptor) IsValid() bool

func (TargetDescriptor) RuntimeContractID

func (d TargetDescriptor) RuntimeContractID() ir.RuntimeContractID

func (TargetDescriptor) Skills

func (d TargetDescriptor) Skills() Component

Directories

Path Synopsis
cmd
generate command

Jump to

Keyboard shortcuts

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