hostsetup

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package hostsetup installs and inspects the owned, repository-local Codex skill. Artifact presence does not prove a host session loaded the skill.

Index

Constants

View Source
const ManifestFile = ".pitcrew-manifest.json"
View Source
const (
	MemorySkillPath = ".agents/skills/pitcrew-memory"
)
View Source
const SkillPath = ".agents/skills/pitcrew-coordination"

Variables

This section is empty.

Functions

This section is empty.

Types

type Changes

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

func MemoryPlan added in v0.32.0

func MemoryPlan(root string, codexHomes ...string) (*Changes, error)

MemoryPlan preflights and reconciles the PitCrew-owned memory skill, MCP registration, hooks, and ownership manifest under one selected scope root.

func MemoryPlanWithDatabase added in v0.34.2

func MemoryPlanWithDatabase(root, database string, codexHomes ...string) (*Changes, error)

MemoryPlanWithDatabase reconciles owned memory artifacts with an explicit control-plane binding, leaving MemoryPlan's legacy unbound behavior intact.

func Plan

func Plan(root string) (*Changes, error)

Plan preflights every owned artifact before bootstrap activation or writes. Valid intact older manifests authorize updates; edits and unowned paths do not.

func (*Changes) Apply

func (p *Changes) Apply() error

Apply checks snapshots and ancestors again before each atomic file update. The caller uses the repository activation lock to serialize managed writes.

type Diagnostic

type Diagnostic struct {
	State           string `json:"state"`
	Path            string `json:"path,omitempty"`
	Version         string `json:"version,omitempty"`
	ExpectedVersion string `json:"expectedVersion,omitempty"`
	Cause           string `json:"cause,omitempty"`
	Recovery        string `json:"recovery,omitempty"`
}

type Report

type Report struct {
	Host           string      `json:"host"`
	Scope          string      `json:"scope,omitempty"`
	State          string      `json:"state"`
	Skill          Diagnostic  `json:"skill"`
	MemorySkill    *Diagnostic `json:"memorySkill,omitempty"`
	MemoryMCP      *Diagnostic `json:"memoryMcp,omitempty"`
	MemoryHooks    *Diagnostic `json:"memoryHooks,omitempty"`
	RuntimeLoading string      `json:"runtimeLoading"`
}

func Inspect

func Inspect(root, host string) Report

Inspect is read-only and does not initialize storage or directories.

func InspectScope added in v0.32.0

func InspectScope(root, host, scope, memoryRoot string, codexHomes ...string) Report

InspectScope includes first-party memory setup diagnostics. memoryRoot is the user's home directory for user scope or the checkout root for checkout scope.

func InspectScopeWithDatabase added in v0.34.2

func InspectScopeWithDatabase(root, host, scope, memoryRoot, database string, codexHomes ...string) Report

InspectScopeWithDatabase checks memory artifacts against the selected control plane without changing installed files. InspectScope retains legacy unbound expectations for callers that do not select a database.

type UserOptions added in v0.34.0

type UserOptions struct {
	Home     string
	HostHome string
	// HostHomeExplicit retains an environment override even when it equals the default.
	HostHomeExplicit bool
	Database         string
}

UserOptions identifies user-owned host artifacts and their selected control plane. Callers resolve environment defaults; inspection never creates directories.

type UserReport added in v0.34.0

type UserReport struct {
	Host           string     `json:"host"`
	Scope          string     `json:"scope"`
	State          string     `json:"state"`
	Outcome        string     `json:"outcome,omitempty"`
	Database       string     `json:"database"`
	Skill          Diagnostic `json:"skill"`
	Usage          Diagnostic `json:"usage"`
	MemorySkill    Diagnostic `json:"memorySkill"`
	MemoryMCP      Diagnostic `json:"memoryMcp"`
	MemoryHooks    Diagnostic `json:"memoryHooks"`
	RuntimeLoading string     `json:"runtimeLoading"`
	Guidance       string     `json:"guidance"`
}

func InspectUser added in v0.34.0

func InspectUser(host string, o UserOptions) UserReport

InspectUser checks user-level prerequisites without resolving a repository.

func SetupUser added in v0.34.0

func SetupUser(host string, o UserOptions) (UserReport, error)

SetupUser reconciles owned user-level artifacts to this executable's packages.

Jump to

Keyboard shortcuts

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