Documentation
¶
Overview ¶
Package frontend is the single generic lifecycle frontend skeleton. Each harness (claude, opencode, codex) supplies its pinned data as a Host[E] and delegates to Bind; the per-host packages carry no control flow of their own.
Bind implements the strictest-common admission policy: it hoists Claude's duplicate-name guard and its separated undeclared-field vs kind-mismatch errors (with a binding index) to every host. The admission decision is identical to the pre-refactor per-host frontends — only the error site and text change (the waist L2 transform already rejected duplicate {kind, nativeName} identities, so no accepted input becomes rejected and no rejected input becomes accepted).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bind ¶
func Bind[E comparable]( host Host[E], modelKind model.ContractEventKind, bindings []model.NativeBinding, ) (waist.L1, []waist.Identity, error)
Bind is the one shared frontend boundary. It resolves the model ordinal to the host's typed event, binds it against the pinned contract, and converts each supplied native binding into a waist identity in Claude's exact check order: undeclared-field → duplicate-name → kind-agreement → value construction. It never persists and never constructs an L2 value.
Types ¶
type Host ¶
type Host[E comparable] struct { // Label attributes errors to the harness (e.g. "Claude", "OpenCode", // "Codex"). It is the only per-host token that varies the error template. Label string // Contract returns the pinned, reviewed runtime lifecycle profile for the // harness. It is a constructor so Bind consumes a fresh immutable value. Contract func() runtime.LifecycleContract[E] // Events is the closed ordinal→typed-enum map. Only ordinals present here // have an authentic frontend binding; every other ordinal is rejected. Events map[model.ContractEventKind]E }
Host is the per-harness data the generic Bind consumes. E is the harness's closed comparable event enum (runtime.ClaudeLifecycleEvent, etc.). Host is plain data with no behaviour: the ordinal→enum map, the pinned contract constructor, and the attribution label are all host-pinned facts.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package claude supplies the pinned Claude capture vocabulary as host data for the generic lifecycle frontend.
|
Package claude supplies the pinned Claude capture vocabulary as host data for the generic lifecycle frontend. |
|
Package codex supplies the pinned Codex 0.146.0 command-hook vocabulary as host data for the generic lifecycle frontend.
|
Package codex supplies the pinned Codex 0.146.0 command-hook vocabulary as host data for the generic lifecycle frontend. |
|
Package opencode supplies the pinned OpenCode callback vocabulary as host data for the generic lifecycle frontend.
|
Package opencode supplies the pinned OpenCode callback vocabulary as host data for the generic lifecycle frontend. |