Documentation
¶
Overview ¶
Package docviews compiles proof-bound audience projections from an existing admitted Human Documentation Compiler plan. It does not generate prose, grant access, inspect a repository, or mutate its inputs.
Index ¶
- Constants
- func CanonicalBundle(source SourcePlan, bundle Bundle) ([]byte, string, error)
- type Audience
- type AudienceView
- type Bundle
- type ClaimOverlay
- type CompileOptions
- type Currency
- type Detail
- type Divergence
- type Error
- type ProjectionRecipe
- type ReviewState
- type SourcePlan
- type TruthClaim
- type TruthCorpus
- type TruthEvidence
- type VerificationReport
Constants ¶
const ( TruthProfile = "corvint-cross-audience-truth/0" ViewProfile = "corvint-cross-audience-view/0" BundleProfile = "corvint-cross-audience-bundle/0" VerificationProfile = "corvint-cross-audience-verification/0" )
Variables ¶
This section is empty.
Functions ¶
func CanonicalBundle ¶
func CanonicalBundle(source SourcePlan, bundle Bundle) ([]byte, string, error)
Types ¶
type AudienceView ¶
type AudienceView struct {
Audience Audience `json:"audience"`
ClaimIDs []string `json:"claim_ids"`
Detail Detail `json:"detail"`
DisclosurePolicySHA256 string `json:"disclosure_policy_sha256"`
DisclosureScope string `json:"disclosure_scope"`
Profile string `json:"profile"`
TruthSHA256 string `json:"truth_sha256"`
}
AudienceView contains presentation choices only. A consumer must resolve ClaimIDs against the bound TruthCorpus.
type Bundle ¶
type Bundle struct {
Profile string `json:"profile"`
Truth TruthCorpus `json:"truth"`
TruthSHA256 string `json:"truth_sha256"`
Views []AudienceView `json:"views"`
}
func Compile ¶
func Compile(source SourcePlan, options CompileOptions) (Bundle, error)
type ClaimOverlay ¶
type ClaimOverlay struct {
ClaimID string `json:"claim_id"`
Currency Currency `json:"currency"`
CurrencyReason string `json:"currency_reason,omitempty"`
Limitations []string `json:"limitations"`
ReviewState ReviewState `json:"review_state"`
}
type CompileOptions ¶
type CompileOptions struct {
DisclosurePolicySHA256 string
DisclosureScope string
Overlays []ClaimOverlay
Recipes []ProjectionRecipe
}
type Divergence ¶
type ProjectionRecipe ¶
type ReviewState ¶
type ReviewState string
const ( ReviewGenerated ReviewState = "GENERATED" ReviewVerified ReviewState = "VERIFIED" ReviewReviewed ReviewState = "REVIEWED" )
type SourcePlan ¶
type SourcePlan struct {
Index *contextindex.Index
Plan []byte
Patch []byte
}
SourcePlan is the exact corvint-human-documentation-plan/0 bytes, the proposal patch they bind, and the in-memory index doccompiler.VerifyAdmittedPlan reproduces them against (CATN-V0-001). The index is only read.
type TruthClaim ¶
type TruthClaim struct {
Currency Currency `json:"currency"`
CurrencyReason string `json:"currency_reason,omitempty"`
Evidence []TruthEvidence `json:"evidence"`
Frontier string `json:"frontier,omitempty"`
ID string `json:"id"`
Kind string `json:"kind"`
Limitations []string `json:"limitations"`
ReviewState ReviewState `json:"review_state"`
Scope string `json:"scope"`
State string `json:"state"`
Text string `json:"text"`
}
TruthClaim contains every factual or epistemic field exactly once. Audience views may reference its ID but cannot carry replacements for these fields.
type TruthCorpus ¶
type TruthEvidence ¶
type TruthEvidence = doccompiler.Anchor
TruthEvidence is one admitted HDC evidence anchor, copied with every member into the truth corpus. Its revision is the plan's source revision.
type VerificationReport ¶
type VerificationReport struct {
Divergences []Divergence `json:"divergences"`
PlanSHA256 string `json:"plan_sha256"`
Profile string `json:"profile"`
Status string `json:"status"`
TruthSHA256 string `json:"truth_sha256"`
}
func Verify ¶
func Verify(source SourcePlan, bundle Bundle) VerificationReport