analyzerstructured

package
v1.0.0-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 11 Imported by: 0

Documentation

Overview

Package analyzerstructured is an unregistered, admission-candidate-only structured-data extractor. It consumes caller-owned immutable bytes only.

Index

Constants

View Source
const (
	Profile = "corvint-structured-data/experimental-v1"
	Family  = "structured-data"
)

Variables

This section is empty.

Functions

func Analyze

func Analyze(frame []byte) []byte

Analyze accepts precisely one canonical LF-framed request and emits one canonical LF-framed candidate or rejection. It never reads ambient state.

func CandidateDescriptor

func CandidateDescriptor() ([]byte, error)

CandidateDescriptor returns the stable byte-bound selection descriptor. It is informative only: it does not register, select, or authorize this candidate.

Types

type Descriptor

type Descriptor struct {
	IdentitySHA256 string `json:"identity_sha256"`
	// contains filtered or unexported fields
}

type Echo

type Echo struct {
	Handle string `json:"handle"`
	SHA256 string `json:"sha256"`
}

type Fact

type Fact struct {
	Kind          string        `json:"kind"`
	InputHandle   string        `json:"input_handle"`
	Format        FormatProfile `json:"format"`
	Profile       string        `json:"profile"`
	Path          string        `json:"path"`
	ByteStart     int           `json:"byte_start"`
	ByteEnd       int           `json:"byte_end"`
	Line          int           `json:"line"`
	Column        int           `json:"column"`
	WitnessSHA256 string        `json:"witness_sha256"`
}

Fact is a structural coordinate, not a semantic-validity assertion.

type FormatProfile

type FormatProfile string

FormatProfile is an exact, independently selectable closed parser profile.

const (
	JSONProfile        FormatProfile = "structured.json/rfc8259-v1"
	JSONLProfile       FormatProfile = "structured.jsonl/rfc8259-v1"
	YAMLProfile        FormatProfile = "structured.yaml/1.2-core-v1"
	TOMLProfile        FormatProfile = "structured.toml/1.0.0-v1"
	XMLProfile         FormatProfile = "structured.xml/1.0-v1"
	PlistProfile       FormatProfile = "structured.plist/xml-v1"
	PropertiesProfile  FormatProfile = "structured.properties/java-17-v1"
	HCLProfile         FormatProfile = "structured.hcl/2.0-static-v1"
	WebManifestProfile FormatProfile = "structured.webmanifest/whatwg-v1"
	SVGProfile         FormatProfile = "structured.svg/1.1-static-v1"
)

type Input

type Input struct {
	Handle        string        `json:"handle"`
	Family        FormatProfile `json:"family"`
	Path          string        `json:"path"`
	SHA256        string        `json:"sha256"`
	ContentBase64 string        `json:"content_base64"`
}

type Request

type Request struct {
	Profile           string  `json:"profile"`
	Family            string  `json:"family"`
	RequestID         string  `json:"request_id"`
	ScopeID           string  `json:"scope_id"`
	CompilationUnitID string  `json:"compilation_unit_id"`
	Target            Target  `json:"target"`
	Inputs            []Input `json:"inputs"`
}

type Target

type Target struct {
	OS           string   `json:"os"`
	Architecture string   `json:"architecture"`
	ABI          string   `json:"abi"`
	Features     []string `json:"features"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL