host

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package host is the one concrete adapter between specd and the local coding host. It transforms destinations and invocation argv and declares what the host can actually do. It owns no workflow prose and no operation semantics: guidance comes from internal/generate, verbs come from the operation registry.

Index

Constants

View Source
const (
	AssuranceAdvisory     = core.AttemptAssurance
	AssuranceHostEnforced = "host_enforced"
)

Assurance labels. There is no middle rung and no configuration path to the upper one: only a host that hides human operations, restricts tool paths, and attests actor class can claim enforcement.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

Adapter is the local host binding for one project.

func Local

func Local(root string, capabilities Capabilities) (*Adapter, error)

Local binds the adapter to one validated project root. The capability record is supplied by whoever knows the host; the adapter never guesses it.

func (*Adapter) Assurance

func (adapter *Adapter) Assurance() string

func (*Adapter) Callable

func (adapter *Adapter) Callable() []string

Callable is the operation palette the adapter exposes. It is the registry's own agent projection filtered by executability; the adapter adds nothing and hides nothing else.

func (*Adapter) Capabilities

func (adapter *Adapter) Capabilities() Capabilities

func (*Adapter) Install

func (adapter *Adapter) Install(surfaces ...Surface) ([]string, error)

Install writes the supported managed surfaces. A requested surface the host declares it cannot deliver is a refusal with one recovery, never a quiet fallback to a different surface.

func (*Adapter) Invoke

func (adapter *Adapter) Invoke(operation string, arguments ...string) (exec.Request, error)

Invoke transforms one callable operation into bounded argv for this project. Every argument reaches the process literally: the adapter interprets no shell and reuses no display string as execution input.

func (*Adapter) Root

func (adapter *Adapter) Root() string

type Capabilities

type Capabilities struct {
	CanInstallSkill                bool `json:"canInstallSkill"`
	CanInstallCommandWrapper       bool `json:"canInstallCommandWrapper"`
	CanHideHumanOperations         bool `json:"canHideHumanOperations"`
	CanEnforceToolPathRestrictions bool `json:"canEnforceToolPathRestrictions"`
	CanAttestActorClass            bool `json:"canAttestActorClass"`
}

Capabilities are five independent declared facts about the host. They are never inferred from the adapter existing, and declaring one does not make it true — a host that cannot prove a capability must not declare it.

func LocalCapabilities

func LocalCapabilities() Capabilities

LocalCapabilities is the honest capability record of the current local host: a coding agent with shell access to the developer's machine. It can write a guidance file. It cannot keep a shell-capable agent away from a human verb, restrict the paths a tool touches, or attest who is at the keyboard, so it declares none of those.

func (Capabilities) Assurance

func (capabilities Capabilities) Assurance() string

Assurance is the label this capability set earns.

type Surface

type Surface string

Surface is one installable managed product.

const (
	SurfaceSkill          Surface = "skill"
	SurfaceCommandWrapper Surface = "command_wrapper"
)

Jump to

Keyboard shortcuts

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