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
- type Adapter
- func (adapter *Adapter) Assurance() string
- func (adapter *Adapter) Callable() []string
- func (adapter *Adapter) Capabilities() Capabilities
- func (adapter *Adapter) Install(surfaces ...Surface) ([]string, error)
- func (adapter *Adapter) Invoke(operation string, arguments ...string) (exec.Request, error)
- func (adapter *Adapter) Root() string
- type Capabilities
- type Surface
Constants ¶
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) Callable ¶
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 ¶
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.
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.