Documentation
¶
Overview ¶
Package compiler owns source loading, validation, and immutable graph results.
Index ¶
- Constants
- Variables
- func BuiltinProviderLock(source string) (integrity string, ok bool)
- func CloneSemanticValue(value any) any
- func ComputeDeploymentRevisions(manifest *Manifest, implementationRevisions map[string]string, ...) map[string]string
- func CoreSchema(kind string) (map[string]any, bool)
- func DecodeHTTPCookie(value, typeExpression string) (any, error)
- func DecodeHTTPHeader(values []string, typeExpression string) (any, error)
- func DecodeHTTPJSON(input []byte) (any, error)
- func DecodeHTTPMultipart(body []byte, contentType string, specs []HTTPMultipartPart, maxParts int) (map[string][]HTTPMultipartValue, error)
- func DecodeHTTPPathSegment(encoded string) (string, error)
- func DecodeHTTPQuery(values []string, typeExpression string) (any, error)
- func DecodeHTTPScalar(kind, value string) (any, error)
- func DecodeRawHTTPQuery(rawQuery, wireName, typeExpression, encoding string) (any, error)
- func InputKeyFieldName(value any) (string, bool)
- func MarshalCanonical(value any) ([]byte, error)
- func NegotiateHTTPMedia(accept string, produced []string) (string, error)
- func ReadHTTPBody(reader io.Reader, contentEncoding string, ...) ([]byte, error)
- func RefreshWorkspaceRevision(result *Result) error
- func ResolveDeployment(manifest *Manifest, name string) (DeploymentProjection, []Diagnostic)
- func ResourceCreateKindSupported(kind string) bool
- func ResourcePointerValue(resource Resource, pointer string) (any, bool)
- func ValidAuthoredLabel(schema *AuthoredBlockSchema, label string) bool
- type ApplicationIdentity
- type AuthoredAttributeSchema
- type AuthoredBlockSchema
- type AuthoredChildSchema
- type Block
- type ConcreteComment
- type ConcreteSyntaxTree
- type ConcreteToken
- type ContextBundle
- type ContextOptions
- type DeploymentProjection
- type DeploymentResourceProjection
- type Diagnostic
- type DiagnosticDefinition
- type ExpansionStep
- type Expression
- type FieldProvenance
- type FixtureSeedPlan
- type FormatResult
- type GoBuildTarget
- type GraphEdge
- type GraphOptions
- type HTTPMultipartPart
- type HTTPMultipartValue
- type LockEntry
- type Lockfile
- type Manifest
- type Origin
- type PartialGraph
- type Position
- type ProviderDescriptor
- type ProviderInstanceDescriptor
- type Range
- type Related
- type Resource
- type ResourceGraph
- type Result
- type Source
- type SourceRecord
Constants ¶
const ManifestKind = graph.ManifestKind
Variables ¶
var ( Graph = graphmodel.Graph Context = graphmodel.Context ContextSnapshot = graphmodel.ContextSnapshot ContextSnapshotWithDiagnostics = graphmodel.ContextSnapshotWithDiagnostics )
var ( Format = scn.Format FormatPaths = scn.FormatPaths )
var ( ManifestSchemaRevision = graph.ManifestSchemaRevision DiagnosticCatalog = graph.DiagnosticCatalog )
Functions ¶
func BuiltinProviderLock ¶
func CloneSemanticValue ¶
func DecodeHTTPCookie ¶
func DecodeHTTPJSON ¶
func DecodeHTTPMultipart ¶
func DecodeHTTPMultipart(body []byte, contentType string, specs []HTTPMultipartPart, maxParts int) (map[string][]HTTPMultipartValue, error)
func DecodeHTTPPathSegment ¶
func DecodeHTTPScalar ¶
func DecodeRawHTTPQuery ¶
func InputKeyFieldName ¶
func MarshalCanonical ¶
func ReadHTTPBody ¶
func RefreshWorkspaceRevision ¶
RefreshWorkspaceRevision re-hashes an unchanged compiler result after its already-verified generated artifacts have been materialized.
func ResolveDeployment ¶
func ResolveDeployment(manifest *Manifest, name string) (DeploymentProjection, []Diagnostic)
func ResourcePointerValue ¶
func ValidAuthoredLabel ¶
func ValidAuthoredLabel(schema *AuthoredBlockSchema, label string) bool
Types ¶
type ApplicationIdentity ¶
type ApplicationIdentity = graph.ApplicationIdentity
type AuthoredAttributeSchema ¶
type AuthoredAttributeSchema = spec.SourceAttributeSchema
type AuthoredBlockSchema ¶
type AuthoredBlockSchema = spec.SourceBlockSchema
func AuthoredResourceSourceSchema ¶
func AuthoredResourceSourceSchema(blockType string) (*AuthoredBlockSchema, bool)
AuthoredResourceSourceSchema returns the canonical authored-source shape for one resource block. Evolution uses it to render source mutations without duplicating compiler schema policy. The result is shared read-only compiler metadata; callers must not mutate it.
type AuthoredChildSchema ¶
type AuthoredChildSchema = spec.SourceChildSchema
type ConcreteComment ¶
type ConcreteComment = scn.ConcreteComment
type ConcreteSyntaxTree ¶
type ConcreteSyntaxTree = scn.ConcreteSyntaxTree
type ConcreteToken ¶
type ConcreteToken = scn.ConcreteToken
type ContextBundle ¶
type ContextBundle = graphmodel.ContextBundle
type ContextOptions ¶
type ContextOptions = graphmodel.ContextOptions
type DeploymentProjection ¶
type DeploymentProjection struct {
machine.ArtifactIdentity
Deployment string `json:"deployment"`
Environment string `json:"environment"`
ContractRevision string `json:"contract_revision"`
Resources map[string]DeploymentResourceProjection `json:"resources"`
}
type Diagnostic ¶
type Diagnostic = graph.Diagnostic
func TransportDiagnostic ¶
func TransportDiagnostic(kind, message string) Diagnostic
type DiagnosticDefinition ¶
type DiagnosticDefinition = spec.DiagnosticDefinition
func DiagnosticDefinitionFor ¶
func DiagnosticDefinitionFor(code string) (DiagnosticDefinition, bool)
func DiagnosticDefinitions ¶
func DiagnosticDefinitions() []DiagnosticDefinition
type ExpansionStep ¶
type ExpansionStep = graph.ExpansionStep
type Expression ¶
type Expression = scn.Expression
type FieldProvenance ¶
type FieldProvenance = graph.FieldProvenance
type FixtureSeedPlan ¶
type FixtureSeedPlan struct {
Address string `json:"address"`
DataSource string `json:"data_source"`
Database string `json:"database"`
Environment string `json:"environment"`
Path string `json:"path"`
SQL string `json:"sql"`
SHA256 string `json:"sha256"`
}
FixtureSeedPlan is the deterministic SQL projection of one fixture for one selected environment. Deployment providers and the local db seed command use the same projection.
func BuildFixtureSeedPlans ¶
func BuildFixtureSeedPlans(result *Result, environment string) ([]FixtureSeedPlan, error)
BuildFixtureSeedPlans projects validated fixtures into bounded PostgreSQL statements. It never connects to a provider or mutates state.
type FormatResult ¶
type FormatResult = scn.FormatResult
type GoBuildTarget ¶
type GoBuildTarget struct {
Name string
Address string
Role string
Effective map[string]any
Resolved map[string]any
Context parse.GoTargetContext
}
func ResolveGoBuildTarget ¶
func ResolveGoBuildTarget(result *Result, name, defaultRole string) (GoBuildTarget, error)
func VerificationGoTargets ¶
func VerificationGoTargets(result *Result) ([]GoBuildTarget, error)
VerificationGoTargets resolves the concrete Go targets selected for default implementation verification, including their exact build contexts.
type GraphEdge ¶
type GraphEdge = graphmodel.GraphEdge
type GraphOptions ¶
type GraphOptions = graphmodel.GraphOptions
type HTTPMultipartPart ¶
type HTTPMultipartValue ¶
type LockEntry ¶
type LockEntry struct {
Kind string `json:"kind"`
Name string `json:"name"`
Source string `json:"source"`
Integrity string `json:"integrity"`
CompileDescriptorDigest string `json:"compile_descriptor_digest,omitempty"`
RuntimeABI string `json:"runtime_abi,omitempty"`
DeploymentABI string `json:"deployment_abi,omitempty"`
MigrationABI string `json:"migration_abi,omitempty"`
PackageContractABIRevision string `json:"package_contract_abi_revision,omitempty"`
Dependencies []string `json:"dependencies,omitempty"`
}
type PartialGraph ¶
type PartialGraph = graph.PartialGraph
type ProviderDescriptor ¶
type ProviderDescriptor struct {
machine.ArtifactIdentity
Source string `json:"source"`
Capabilities []string `json:"capabilities"`
ConfigSchema map[string]any `json:"config_schema"`
InstanceKinds map[string]ProviderInstanceDescriptor `json:"instance_kinds"`
RuntimeABI string `json:"runtime_abi"`
DeploymentABI string `json:"deployment_abi"`
MigrationABI string `json:"migration_abi,omitempty"`
}
type ResourceGraph ¶
type ResourceGraph = graphmodel.ResourceGraph
type Result ¶
type Result struct {
Root string `json:"-"`
Manifest *graph.Manifest `json:"manifest,omitempty"`
FrameworkResources []graph.Resource `json:"-"`
ViewManifests map[string]*graph.Manifest `json:"-"`
PartialGraph *graph.PartialGraph `json:"partial_graph,omitempty"`
ContractStatus string `json:"contract_status"`
ImplementationStatus string `json:"implementation_status"`
WorkspaceRevision string `json:"workspace_revision"`
ImplementationRevisions map[string]string `json:"implementation_revision,omitempty"`
DeploymentRevisions map[string]string `json:"deployment_revision,omitempty"`
HTTPSurfaceRevisions map[string]string `json:"http_surface_revision,omitempty"`
OpenAPIRevisions map[string]string `json:"openapi_revision,omitempty"`
Diagnostics []graph.Diagnostic `json:"diagnostics"`
Sources []*scn.Source `json:"-"`
}
func CompileContractGraph ¶
CompileContractGraph resolves and validates the canonical contract graph. Build, generation, and deployment phases consume this immutable result.
func CompileDuringChangeTransaction ¶
CompileDuringChangeTransaction compiles the graph while evolution owns an active source transaction in this process.
func (*Result) ManifestForView ¶
ManifestForView returns one immutable compiler snapshot.
type Source ¶
Syntax types live in internal/scn. These aliases keep the compiler graph model source-compatible while its callers migrate to the syntax boundary.
type SourceRecord ¶
type SourceRecord = graph.SourceRecord
Source Files
¶
- artifact.go
- catalog_bridge.go
- cli_validate.go
- compiler.go
- compiler_workspace_revision.go
- constraints.go
- content_page.go
- contextual_scalars.go
- data_expand.go
- data_validate.go
- deployment.go
- detail_page.go
- diagnostics.go
- events_validate.go
- fixture_seed.go
- fixture_values.go
- form_dialog.go
- go_clients.go
- go_config.go
- go_contract_validate.go
- go_dependencies.go
- go_names_validate.go
- go_target_context.go
- go_targets.go
- graph_support.go
- helpers.go
- http.go
- http_codec.go
- http_effective.go
- http_mapping.go
- http_path_tail.go
- http_response_disjoint.go
- http_revisions.go
- lock.go
- mcp_validate.go
- module_compile.go
- module_inputs.go
- page_route.go
- patch.go
- provenance.go
- resource_validate.go
- result.go
- revisions.go
- schema_bridge.go
- schema_validate.go
- scn_support.go
- security_validate.go
- semver.go
- source_filenames.go
- split_page.go
- standard_auth_projection.go
- status_map.go
- table_page.go
- type_descriptors.go
- typecheck.go
- types.go
- typescript_validate.go
- ui_validate.go
- validation_compile.go
- verify_generated.go
- workspace_page.go