version

package
v2.0.9 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginUIProtocolVersion                 = "plugin-ui-v7"
	PluginHostProtocolVersion               = "plugin-host-v11"
	RustIPCVersion                          = "rust-ipc-v7"
	WASMABIVersion                          = "redevplugin-wasm-worker-v2"
	ManifestSchemaVersion                   = "manifest-v9"
	PackageSignatureSchemaVersion           = "package-signature-v1"
	ReleaseMetadataSchemaVersion            = "release-metadata-v8"
	ReleaseRootDelegationSchemaVersion      = "release-root-delegation-v1"
	ReleaseSourcePolicySchemaVersion        = "release-source-policy-v3"
	ReleaseSourcePolicyPointerSchemaVersion = "release-source-policy-pointer-v2"
	ReleaseRevocationSchemaVersion          = "release-revocation-v3"
	ReleaseRevocationPointerSchemaVersion   = "release-revocation-pointer-v2"
	TokenTicketSchemaVersion                = "token-ticket-v4"
	BridgeSchemaVersion                     = "bridge-v7"
	OpaqueSurfaceDocumentSchemaVersion      = "opaque-surface-document-v3"
	OpaqueSurfaceTransportSchemaVersion     = "opaque-surface-transport-v6"
	TargetClassifierVersion                 = "target-classifier-v2"
	NetworkGrantSchemaVersion               = "network-grant-v2"
	ResourceScopeSchemaVersion              = "resource-scope-v1"
	SessionScopeSchemaVersion               = "session-scope-v1"
	PluginPlatformOpenAPIVersion            = "plugin-platform-v17"
	PublicAPICatalogVersion                 = "public-api-v1"
	CompatibilityManifestVersion            = "redevplugin.compatibility.v20"
	CompatibilitySchemaVersion              = "compatibility-manifest-v20"
	WorkerInvocationSchemaVersion           = "worker-invocation-v3"
	HostCapabilityContractSchemaVersion     = "host-capability-contract-v1"
	HostCapabilityPinSchemaVersion          = "host-capability-pin-v1"
	ErrorCodesSchemaVersion                 = "error-codes-v8"
	PerformanceContractVersion              = "performance-contract-v4"
	PerformanceEvidenceSchemaVersion        = "performance-evidence-v4"
	ContractRegistryVersion                 = "contract-registry-v2"
	PlatformPackageSetSchemaVersion         = "platform-package-set-v3"
	PlatformPackagePublicationSchemaVersion = "platform-package-publication-v2"
	RuntimeAdmissionSchemaVersion           = "runtime-admission-v1"
	RuntimeDescriptorSchemaVersion          = "runtime-descriptor-v3"
	OwnerScopeInventoryRegistryVersion      = "owner-scope-inventory-registry-v1"
	OwnerScopeInventorySchemaVersion        = "owner-scope-inventory-v1"
	OwnerScopeMigrationSchemaVersion        = "owner-scope-migration-v1"
	OwnerScopeRootRecoverySchemaVersion     = "owner-scope-root-recovery-v1"
	ProcessContainmentSchemaVersion         = "process-containment-v1"
	RuntimeExecJournalSchemaVersion         = "runtime-exec-journal-v1"
	QuarantineCleanupSchemaVersion          = "quarantine-cleanup-v1"
)
View Source
const ContractSetSHA256 = "6b827020d10807e11de804167fd584eb49de5296a2c254f6a1d89a80539b0802"
View Source
const StrictSemVerPattern = `` /* 214-byte string literal not displayed */

Variables

View Source
var (
	GoModuleVersion  = devVersion
	UIPackageVersion = devVersion
	RuntimeVersion   = devVersion
)
View Source
var (
	ErrCompatibilitySchemaVersion = errors.New("compatibility manifest schema version mismatch")
	ErrCompatibilityMatrix        = errors.New("compatibility manifest version matrix mismatch")
	ErrCompatibilityContract      = errors.New("compatibility manifest contract mismatch")
	ErrCompatibilityPath          = errors.New("compatibility manifest contract path is invalid")
)
View Source
var (
	ErrInvalidSemVer = errors.New("invalid semantic version")
)

Functions

func CurrentCompatibilityVersion

func CurrentCompatibilityVersion() string

func SupportsPluginUIProtocol

func SupportsPluginUIProtocol(protocolVersion string) bool

func VerifyCompatibilityManifest

func VerifyCompatibilityManifest(manifest CompatibilityManifest, artifactRoot string) error

func VerifyCompatibilityManifestFile

func VerifyCompatibilityManifestFile(filename string, artifactRoot string) error

Types

type CompatibilityManifest

type CompatibilityManifest struct {
	SchemaVersion     string             `json:"schema_version"`
	PackageSet        PlatformPackageSet `json:"package_set"`
	Matrix            Matrix             `json:"matrix"`
	ContractSetSHA256 string             `json:"contract_set_sha256"`
	Contracts         []ContractArtifact `json:"contracts"`
}

func CurrentCompatibilityManifest

func CurrentCompatibilityManifest() CompatibilityManifest

func DecodeCompatibilityManifest

func DecodeCompatibilityManifest(raw []byte) (CompatibilityManifest, error)

type ContractArtifact

type ContractArtifact struct {
	ID      string `json:"id"`
	Path    string `json:"path"`
	Version string `json:"version"`
	SHA256  string `json:"sha256"`
}

type GoModuleCoordinate

type GoModuleCoordinate struct {
	Module  string `json:"module"`
	Version string `json:"version"`
}

type Matrix

type Matrix struct {
	PluginUIProtocolVersion            string                     `json:"plugin_ui_protocol_version"`
	SupportedPluginUIProtocolVersions  []string                   `json:"supported_plugin_ui_protocol_versions"`
	PluginUITransportMappings          []PluginUITransportMapping `json:"plugin_ui_transport_mappings"`
	PluginHostProtocolVersion          string                     `json:"plugin_host_protocol_version"`
	RustIPCVersion                     string                     `json:"rust_ipc_version"`
	WASMABIVersion                     string                     `json:"wasm_abi_version"`
	ManifestSchemaVersion              string                     `json:"manifest_schema_version"`
	PackageSignatureSchemaVersion      string                     `json:"package_signature_schema_version"`
	ReleaseMetadataSchemaVersion       string                     `json:"release_metadata_schema_version"`
	ReleaseRootDelegationVersion       string                     `json:"release_root_delegation_schema_version"`
	ReleaseSourcePolicyVersion         string                     `json:"release_source_policy_schema_version"`
	ReleaseSourcePolicyPointerVersion  string                     `json:"release_source_policy_pointer_schema_version"`
	ReleaseRevocationVersion           string                     `json:"release_revocation_schema_version"`
	ReleaseRevocationPointerVersion    string                     `json:"release_revocation_pointer_schema_version"`
	TokenTicketSchemaVersion           string                     `json:"token_ticket_schema_version"`
	BridgeSchemaVersion                string                     `json:"bridge_schema_version"`
	OpaqueSurfaceDocumentVersion       string                     `json:"opaque_surface_document_schema_version"`
	OpaqueSurfaceTransportVersion      string                     `json:"opaque_surface_transport_schema_version"`
	TargetClassifierVersion            string                     `json:"target_classifier_version"`
	NetworkGrantSchemaVersion          string                     `json:"network_grant_schema_version"`
	ResourceScopeSchemaVersion         string                     `json:"resource_scope_schema_version"`
	SessionScopeSchemaVersion          string                     `json:"session_scope_schema_version"`
	PluginPlatformOpenAPIVersion       string                     `json:"plugin_platform_openapi_version"`
	PublicAPICatalogVersion            string                     `json:"public_api_catalog_version"`
	CompatibilitySchemaVersion         string                     `json:"compatibility_schema_version"`
	WorkerInvocationSchemaVersion      string                     `json:"worker_invocation_schema_version"`
	HostCapabilityContractVersion      string                     `json:"host_capability_contract_schema_version"`
	HostCapabilityPinVersion           string                     `json:"host_capability_pin_schema_version"`
	ErrorCodesSchemaVersion            string                     `json:"error_codes_schema_version"`
	PerformanceContractVersion         string                     `json:"performance_contract_version"`
	PerformanceEvidenceVersion         string                     `json:"performance_evidence_schema_version"`
	ContractRegistryVersion            string                     `json:"contract_registry_version"`
	PlatformPackageSetVersion          string                     `json:"platform_package_set_schema_version"`
	PlatformPackagePublicationVersion  string                     `json:"platform_package_publication_schema_version"`
	RuntimeAdmissionVersion            string                     `json:"runtime_admission_schema_version"`
	RuntimeDescriptorVersion           string                     `json:"runtime_descriptor_schema_version"`
	OwnerScopeInventoryRegistryVersion string                     `json:"owner_scope_inventory_registry_version"`
	OwnerScopeInventoryVersion         string                     `json:"owner_scope_inventory_schema_version"`
	OwnerScopeMigrationVersion         string                     `json:"owner_scope_migration_schema_version"`
	OwnerScopeRootRecoveryVersion      string                     `json:"owner_scope_root_recovery_schema_version"`
	ProcessContainmentVersion          string                     `json:"process_containment_schema_version"`
	RuntimeExecJournalVersion          string                     `json:"runtime_exec_journal_schema_version"`
	QuarantineCleanupVersion           string                     `json:"quarantine_cleanup_schema_version"`
}

func CurrentMatrix

func CurrentMatrix() Matrix

type NPMPackageCoordinate

type NPMPackageCoordinate struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

type PlatformPackageSet

type PlatformPackageSet struct {
	SchemaVersion           string                 `json:"schema_version"`
	PlatformVersion         string                 `json:"platform_version"`
	GoModule                GoModuleCoordinate     `json:"go_module"`
	NPMPackages             []NPMPackageCoordinate `json:"npm_packages"`
	RustCrates              []RustCrateCoordinate  `json:"rust_crates"`
	ContractRegistryVersion string                 `json:"contract_registry_version"`
	ContractSetSHA256       string                 `json:"contract_set_sha256"`
}

type PluginUITransportMapping

type PluginUITransportMapping struct {
	PluginUIProtocolVersion             string `json:"plugin_ui_protocol_version"`
	OpaqueSurfaceTransportSchemaVersion string `json:"opaque_surface_transport_schema_version"`
	BridgeSchemaVersion                 string `json:"bridge_schema_version"`
}

type PublicAPICatalog

type PublicAPICatalog struct {
	SchemaVersion    string                 `json:"schema_version"`
	SurfaceAPIMajors []uint16               `json:"surface_api_majors"`
	WorkerAPIMajors  []uint16               `json:"worker_api_majors"`
	Features         []string               `json:"features"`
	Permissions      []string               `json:"permissions"`
	StableErrorCodes []string               `json:"stable_error_codes"`
	MinimumResources PublicMinimumResources `json:"minimum_resources"`
}

PublicAPICatalog describes only plugin-observable compatibility. Internal IPC, OpenAPI, database, and contract-set versions intentionally do not appear here.

func CurrentPublicAPICatalog

func CurrentPublicAPICatalog() PublicAPICatalog

type PublicMinimumResources

type PublicMinimumResources struct {
	ControlResponseBytes int64 `json:"control_response_bytes"`
	IOChunkBytes         int64 `json:"io_chunk_bytes"`
	OpenFiles            int64 `json:"open_files"`
	OpenConnections      int64 `json:"open_connections"`
	OpenWatches          int64 `json:"open_watches"`
}

type RustCrateCoordinate

type RustCrateCoordinate struct {
	Name    string `json:"name"`
	Version string `json:"version"`
	Role    string `json:"role"`
}

type SemVer

type SemVer struct {
	// contains filtered or unexported fields
}

SemVer is an immutable semantic version in the public, prefix-free form. Its zero value is invalid and cannot be encoded.

func ParseSemVer

func ParseSemVer(value string) (SemVer, error)

func (SemVer) Compare

func (v SemVer) Compare(other SemVer) int

func (SemVer) MarshalJSON

func (v SemVer) MarshalJSON() ([]byte, error)

func (SemVer) MarshalText

func (v SemVer) MarshalText() ([]byte, error)

func (SemVer) String

func (v SemVer) String() string

func (*SemVer) UnmarshalJSON

func (v *SemVer) UnmarshalJSON(raw []byte) error

func (*SemVer) UnmarshalText

func (v *SemVer) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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