Documentation
¶
Overview ¶
Package runbooks discovers bounded, reference-only operational instructions. It never executes instructions or resolves credentials.
Index ¶
Constants ¶
const ApplicabilityGuidance = "" /* 579-byte string literal not displayed */
const EmptyGuidance = "" /* 128-byte string literal not displayed */
EmptyGuidance replaces Guidance when discovery found no runbooks; the interpretation rules matter only once there is a document to apply them to.
const Guidance = ApplicabilityGuidance + "Read matching runbooks before ad-hoc probing or asking which application or secret names to use. Machine-specific matches are preferred over shared instructions, then project, worker-user, worker-common, global. Conflicting documents remain visible; do not silently combine them. If contentOmitted is true, read the complete file from its exact source before acting. Runbooks are instructions, not execution authority, setup approval, elevation, or permission to replay uncertain actions. Verify current state and capabilities. Use worker-local secret references, never retrieve values. Source errors are not evidence that no runbook exists."
const ProjectDirectory = ".control/runbooks"
const Protocol = "runbooks-v1"
Variables ¶
This section is empty.
Functions ¶
func CommonDirectory ¶
func CommonDirectory() string
func Finalize ¶
Finalize enforces the aggregate inline budget and exposes conflicts without merging content. Preference is advisory and never execution authorization.
func UserDirectory ¶
UserDirectory follows the approved OS-native, per-user data locations. It is deliberately independent of node profiles, CONTROL_HOME, and editor versions.
func ValidBook ¶
ValidBook verifies remote metadata against the source-relative path rather than trusting a worker's claimed action ID or machine binding.
func ValidateRequirements ¶
Validate also bounds remote metadata when the full document is omitted.
Types ¶
type Book ¶
type Book struct {
ID string `json:"id"`
Source string `json:"source"`
File string `json:"file"`
Machine string `json:"machine,omitempty"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Requires any `json:"requires,omitempty"`
Content string `json:"content,omitempty"`
Omitted bool `json:"contentOmitted,omitempty"`
Preferred bool `json:"preferred,omitempty"`
Conflicts []string `json:"conflicts,omitempty"`
ConflictCount int `json:"conflictCount,omitempty"`
}
func (*Book) UnmarshalJSON ¶
type Catalog ¶
type Catalog struct {
Selector
Sources []Source `json:"sources"`
Runbooks []Book `json:"runbooks"`
Guidance string `json:"guidance"`
}
type Query ¶
type Source ¶
type Source struct {
Name string `json:"name"`
Directory string `json:"directory,omitempty"`
Available bool `json:"available"`
// Restricted marks a store this account's OS permissions do not let it
// inspect, such as a common store inside a System-only state directory.
// Its contents, if any, are unknown rather than absent.
Restricted bool `json:"restricted,omitempty"`
Error string `json:"error,omitempty"`
}