Documentation
¶
Overview ¶
Code generated by codegen. DO NOT EDIT.
Package inventory is Pasture's authoring-side capability table: one typed, uniqueness-validated projection that unifies the three capability axes a harness exposes — commands, lifecycle events, and native functions.
Every Row is DERIVED at code-generation time from its already-pinned source and committed as a generated projection file:
- command rows — the command-skill authoring surface (internal/codegen commandSkillDirs), fanned out per enabled harness, emitted into commands.gen.go by the codegen generation root;
- lifecycle-event rows — the pinned hostcontract lifecycle contracts, emitted into lifecycle_events.gen.go by hostcontractgen in the SAME walk that renders the registration manifests (so the table and registration cannot drift from each other or from the contracts, by construction);
- native-function rows — the pinned runtime native-operation contracts, emitted into native_functions.gen.go by the codegen generation root.
The table is a meeting point, never a second authority. A Row may never override contract-derived truth: the agreement tests re-derive each axis from its pinned source and fail the build on any missing, extra, or contradicting entry.
Stage-2 scope is authoring-side ONLY. No runtime/production package imports this package; only the generators emit rows into it (through the generated *.gen.go files) and tests validate it against the pinned sources.
Code generated by hostcontractgen. DO NOT EDIT.
Code generated by codegen. DO NOT EDIT.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶
Key is the unique table coordinate: which harness exposes which capability, on which axis. The ID keeps its existing source spelling, unmodified.
type Kind ¶
type Kind string
Kind is the closed capability axis of a Row. It is a distinct string-typed enum (mirroring ir.HarnessID's own string-enum idiom in this codebase), so an axis value can never be confused with an arbitrary label. Disambiguation across axes is STRUCTURAL — carried by this typed field — never string- prefixed onto the Row ID.
const ( // KindCommand is a command-skill capability (e.g. "cmd-work-impl"). KindCommand Kind = "command" // KindLifecycleEvent is a lifecycle-event capability, identified by its // native event name (e.g. "PreToolUse", "tool.execute.before"). KindLifecycleEvent Kind = "lifecycle-event" // KindNativeFunction is a native-function/tool capability derived from the // pinned runtime contract (e.g. "request-input"). KindNativeFunction Kind = "native-function" )
type Row ¶
type Row struct {
Key Key
}
Row is one capability fact. Attribute payloads deliberately do NOT live here this stage (trimmed at UAT): consumers keep their authored attribute maps keyed by table IDs and validated exhaustive against the table. A Row gains fields only when a real consumer cutover needs them.
func Table ¶
Table returns the merged, deterministically-sorted, uniqueness-validated inventory assembled from every generated projection.
Ordering is (Harness, Kind, ID). A duplicate Key is an authoring/derivation defect — two generated sources contributed the same coordinate — and fails with an actionable error naming the collided coordinate so the offending generator source can be de-duplicated. An out-of-range Kind fails the same way (a generated file drifted from the closed axis set).