flayer.extensions¶
flayer.extensions ¶
Additive typed extension contracts, static metadata discovery, and explicit loading.
CompiledProfile ¶
Bases: Protocol
Validated profile adapter that preserves existing artifact and lifecycle boundaries.
Identity
property
¶
Identity: StackIdentity
Return the exact identity validated during profile compilation.
BuildServerBundle ¶
BuildServerBundle() -> ArtifactBundle
Generate owned server initialization bytes without writing or deploying them.
Source code in installed/flayer/extensions/contracts.py
170 171 172 173 | |
RenderPlan ¶
RenderPlan(*, user_data_file: str | Path) -> str
Render lifecycle TOML after verifying the exact owned server artifact.
Source code in installed/flayer/extensions/contracts.py
175 176 177 178 | |
ExtensionDescriptor
dataclass
¶
ExtensionDescriptor(kind: ExtensionKind, plugin_id: str, distribution: str, version: str, group: str, target: str, metadata_directory: Path | None = None, metadata_sha256: str | None = None)
A static identity; external metadata snapshots are not package authenticity proof.
ExtensionError ¶
Bases: ContractError
An extension violates discovery, identity, compatibility, or loading policy.
ExtensionKind ¶
LifecycleProviderExtension ¶
Bases: ProviderExtension, Protocol
Optional separate factory for the existing owned resource lifecycle contract.
CreateLifecycleProvider ¶
CreateLifecycleProvider(context: ProviderContext) -> LifecycleProvider
Construct a mutation-capable adapter without performing provider operations.
Source code in installed/flayer/extensions/contracts.py
154 155 156 157 | |
ProfileContext
dataclass
¶
ProfileContext(identity: StackIdentity)
Exact stack ownership context; profile configuration and artifacts stay separate.
ProfileExtension ¶
Bases: Protocol
Compile explicit profile configuration using its own strict versioned schema.
Descriptor
property
¶
Descriptor: ExtensionDescriptor
Return the exact static identity registered before factory loading.
CompileProfile ¶
CompileProfile(configuration: Mapping[str, object], context: ProfileContext) -> CompiledProfile
Validate configuration and exact ownership without accessing infrastructure.
Source code in installed/flayer/extensions/contracts.py
191 192 193 194 195 196 | |
ProviderContext
dataclass
¶
ProviderContext(scope_id: str, authentication_reference: str, command_timeout: float = 45.0, inventory_limit: int = 10000)
Explicit scope, external CLI authentication reference, and bounded execution limits.
ProviderExtension ¶
Bases: Protocol
Factory for the existing read-only provider contract, without mandatory mutation.
Descriptor
property
¶
Descriptor: ExtensionDescriptor
Return the exact static identity registered before factory loading.
CreateProvider ¶
CreateProvider(context: ProviderContext) -> CloudProvider
Construct a scoped read-only adapter without probing or mutating infrastructure.
Source code in installed/flayer/extensions/contracts.py
144 145 146 147 | |
ExtensionRegistry ¶
ExtensionRegistry(descriptors: Sequence[ExtensionDescriptor] = (), *, include_builtins: bool = True)
A bounded explicit catalog; neither construction nor lookup imports external code.
Validate complete registration before publishing any catalog entries.
Source code in installed/flayer/extensions/registry.py
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 | |
Descriptors ¶
Descriptors() -> tuple[ExtensionDescriptor, ...]
Return immutable descriptors in deterministic kind and identifier order.
Source code in installed/flayer/extensions/registry.py
303 304 305 306 | |
Get ¶
Get(kind: ExtensionKind, plugin_id: str) -> ExtensionDescriptor
Select one registered identity without imports or capability probes.
Source code in installed/flayer/extensions/registry.py
308 309 310 311 312 313 314 315 316 317 318 319 | |
Load ¶
Load(descriptor: ExtensionDescriptor, *, allowed: Sequence[ExtensionDescriptor] = ()) -> ProviderExtension | ProfileExtension
Load an exact registered factory; external code requires an exact descriptor pin.
Source code in installed/flayer/extensions/registry.py
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 | |
BuiltinDescriptors ¶
BuiltinDescriptors() -> tuple[ExtensionDescriptor, ...]
Return static descriptors without importing provider or profile implementations.
Source code in installed/flayer/extensions/builtins.py
46 47 48 49 | |
DiscoverExtensions ¶
DiscoverExtensions(metadata_directories: Sequence[Path]) -> tuple[ExtensionDescriptor, ...]
Parse selected metadata without importing code, calling finders, or searching paths.
Source code in installed/flayer/extensions/discovery.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | |