Zeayii.Vexo.Assembly.Abstractions
0.0.37
dotnet add package Zeayii.Vexo.Assembly.Abstractions --version 0.0.37
NuGet\Install-Package Zeayii.Vexo.Assembly.Abstractions -Version 0.0.37
<PackageReference Include="Zeayii.Vexo.Assembly.Abstractions" Version="0.0.37" />
<PackageVersion Include="Zeayii.Vexo.Assembly.Abstractions" Version="0.0.37" />
<PackageReference Include="Zeayii.Vexo.Assembly.Abstractions" />
paket add Zeayii.Vexo.Assembly.Abstractions --version 0.0.37
#r "nuget: Zeayii.Vexo.Assembly.Abstractions, 0.0.37"
#:package Zeayii.Vexo.Assembly.Abstractions@0.0.37
#addin nuget:?package=Zeayii.Vexo.Assembly.Abstractions&version=0.0.37
#tool nuget:?package=Zeayii.Vexo.Assembly.Abstractions&version=0.0.37
Zeayii.Vexo.Assembly.Abstractions
English | 简体中文
Organization: zeayii
Project: vexo
1. Introduction
Zeayii.Vexo.Assembly.Abstractions is the contract layer of the Vexo Task Assembly system.
It defines the formal boundary between task description and task execution.
This module answers only three questions:
- What inputs must a task assembly accept?
- What metadata must a successful assembly produce?
- How must assembly failures be expressed?
Everything else — media parsing, manifest parsing, DRM, networking, execution, concurrency — is explicitly out of scope.
Design axiom
Abstractions describe obligations and guarantees, never capabilities or implementations.
2. Architectural Role
┌──────────────────────────────────────────────┐
│ Implementation Layer │
│ (Offline / Vendor / Private Assemblers) │
└──────────────────────────────────────────────┘
│
▼
┌──────────────────────────────────────────────┐
│ Contract Layer │
│ Zeayii.Vexo.Assembly.Abstractions │
└──────────────────────────────────────────────┘
│
▼
┌──────────────────────────────────────────────┐
│ Execution Layer │
│ (Pipeline / Workers / Download / Merge) │
└──────────────────────────────────────────────┘
This module is the only legal bridge between user intent and execution-ready data.
3. Core Design Principles
3.1 Minimalism Over Convenience
Only unavoidable abstractions are exposed.
Rejected on purpose:
- Helper utilities
- Default implementations
- Protocol hints (DASH / HLS)
- Provider or DRM identifiers
This prevents abstraction drift and long-term API bloat.
3.2 Determinism
Assembly must be deterministic:
- Same input → same metadata
- No runtime inference in execution
- No partial success states
If metadata cannot be fully constructed, the assembly must fail.
3.3 Execution Independence
Execution consumes metadata as-is.
Execution MUST NOT:
- Parse manifests
- Parse init or index segments
- Guess encryption schemes
- Mutate metadata
All ambiguity is resolved during assembly.
3.4 AOT / Trim Safety
The abstraction layer is designed for:
- NativeAOT
- IL trimming
- Minimal object graphs
Rules enforced by design:
- No reflection
- No dynamic dispatch requirements
- No plugin discovery mechanisms
4. TaskDescriptor
TaskDescriptor represents the complete and immutable description of a task to be assembled.
Responsibilities
- Declare output intent (directories, naming)
- Carry the task input (
ITaskInput) - Guarantee self-consistency
Non-Responsibilities
- Protocol identification
- Provider selection
- DRM routing
- Execution strategy
A
TaskDescriptordescribes what the user wants, not how the system should do it.
5. Task Inputs (TaskInput)
Task inputs are modeled as TaskInput subtypes (runtime-distinguished), not enums or flags.
Rationale
- Avoid forcing users to understand protocol taxonomy
- Allow heterogeneous input models
- Keep the contract open for private extensions
Example
OfflineTaskInput: local or pre-resolved resources- Future inputs may include authenticated or vendor-specific sources
Assembly logic selects behavior via runtime type checks:
if (descriptor.Input is OfflineTaskInput input)
{
// offline assembly
}
6. Metadata Model
Assembly produces execution-grade metadata:
ExecutionTaskExecutionStreamExecutionSegment
Properties
- Immutable after creation
- Free of runtime state
- Complete enough for execution
This metadata forms a hard execution boundary.
6.1 Timeline Contracts (New)
SegmentTimingnow usesTimeSpanforStart,End, andTimestampOffsetto avoid repeated unit conversions across modules.SegmentTimingStatePolicyexplicitly models timeline availability:ResolvedorUnavailable.ExecutionStreamGroupnow carriesStartOffsetandDuration(TimeSpan):StartOffset: group start on the global task timeline.Duration: primary media duration for the group (video first, audio fallback).
- Unresolvable timing is modeled with explicit state instead of nullable timing objects, so execution can branch deterministically.
7. Exception Model
Assembly failures are intentional control boundaries, not incidental errors.
Exception Types
TaskAssemblyExceptionTaskDescriptorInvalidExceptionTaskAssemblyNotSupportedException
Design Rules
- No field-level exception granularity
- No error codes
- No partial results
Failure always aborts the current task.
8. What This Module Explicitly Does NOT Contain
- Media parsing (MP4 / WebM / EBML)
- Manifest parsing (MPD / M3U8)
- Networking or cookies
- DRM / CDM logic
- Worker or pipeline code
These belong to capability or implementation layers.
9. Implementing an Assembler
To implement a task assembler:
- Reference this package
- Validate
TaskDescriptor - Check supported
TaskInputtypes - Produce full metadata or throw
Pseudocode
Validate(descriptor);
if (descriptor.Input is OfflineTaskInput input)
{
return AssembleOffline(input);
}
throw new TaskAssemblyNotSupportedException(...);
13. Current Public Contracts
The abstraction layer is intentionally narrowed to two contract groups:
TaskAssemblyOrchestrator/TaskAssemblyOrchestrator<TSessionState>: extension points for implementation modules.- Assembly output/session contracts:
ExecutionTask,TaskAssemblyUnitSession<TSessionState>, andAssemblyFrame.
TaskAssemblyOrchestrator<TSessionState> enforces an explicit provider session-state type,
so the lifecycle from prepare stage to content-key obtain stage remains strongly typed.
13.1 Visibility Boundary Policy (public / internal)
To prevent responsibility leakage and API bloat, the layer follows:
public: stable cross-module contracts that callers must depend on directly.internal: internal implementation details (filter-chain internals, plan resolvers, default validator implementations).
This keeps:
- external API focused on domain semantics,
- internal composition details hidden behind public facades,
- internal refactoring safe without unnecessary public breaking changes.
14. Compile-Time Contract Analyzer Rules (TaskInput)
The Abstractions package ships a buildTransitive analyzer to validate TaskInput implementations at compile time.
AASM1001(Error):typeIdmust be a compile-time constant.AASM1002(Error):typeIdmust not be empty or whitespace.AASM1003(Error):typeIdmust be unique (case-insensitive).AASM1004(Error): constructors must be parameterless (including primary constructor shape).AASM1005(Error): public writable property type must be in the supported whitelist.AASM1006(Error):typeIdnaming must match lower-domain-kebab format ([a-z0-9.-]+).AASM1007(Warning):TaskInputshould be declared assealed.AASM1008(Warning):TaskInputmust not be generic.AASM1009(Error): every concreteTaskInputmust define[CommandLineName].AASM1010(Error):CommandLineName.Nameformat is invalid (only[a-z0-9-]+allowed).AASM1012(Error): duplicate command token conflict (Name).AASM1013(Error): every public writable property must define[CommandLineOption].AASM1014(Error):CommandLineOption.Nameformat is invalid (--[a-z0-9][a-z0-9-]*).AASM1015(Error):CommandLineOption.Aliasformat is invalid (-[a-z0-9][a-z0-9-]*).AASM1016(Error):DescriptionKeymust be non-empty on bothCommandLineNameandCommandLineOption.AASM1017(Error): duplicate option token (long name or alias) inside oneTaskInput.AASM1018(Error):CommandLineOption.DefaultValueis incompatible with the target property type (for collections, JSON shape is required).
AASM1005 whitelist (including Nullable<T>):
- Scalars:
string,char,bool,sbyte/byte,short/ushort,int/uint,long/ulong,float/double/decimal,Guid,Uri,DateTime,DateTimeOffset,DateOnly,TimeOnly,TimeSpan - Enums: any
enum(including[Flags]) - Collections:
T[],List<T>,IList<T>,IReadOnlyList<T>,ICollection<T>,IReadOnlyCollection<T>,HashSet<T>,ISet<T>,IEnumerable<T>(Tmust be a supported scalar or enum) - Dictionaries:
Dictionary<TKey,TValue>/IDictionary<TKey,TValue>/IReadOnlyDictionary<TKey,TValue>, whereTKeyis onlystringorGuid, andTValuemust be a supported scalar or enum
Additional command metadata constraints:
CommandLineNameis required and should use lowercase kebab token (for exampledmm,mgstage).CommandLineOption.Namemust start with--(for example--content-id).CommandLineOption.Aliasis optional, but if provided it must start with-(for example-cid).CommandLineOption.DefaultValueis optional and always expressed as string text.- Scalar / enum: literal text (for example
1,true,Main). - List / array: JSON array text (for example
[]). - Dictionary: JSON object text (for example
{}).
- Scalar / enum: literal text (for example
- Descriptions are key-based (
DescriptionKey) and should be resolved by a localizer implementation.
10. Versioning & Compatibility
- Semantic Versioning
- Breaking changes are rare and deliberate
- Contract stability is prioritized over feature growth
11. Intended Audience
- Vexo core developers
- Private vendor implementers
- Advanced integrators
12. License & Legal
This module contains no DRM, encryption keys, or restricted logic. It is safe for open-source distribution.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Zeayii.Vexo.Assembly.Abstractions:
| Package | Downloads |
|---|---|
|
Zeayii.Vexo.Assembly.Offline
Vexo Task Assembly Offline Implementation for Vexo. |
|
|
Zeayii.Vexo.Assembly.Media
Vexo Task Assembly Media for Vexo. |
|
|
Zeayii.Vexo.Assembly
Vexo Task Assembly orchestration runtime for Vexo. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.37 | 174 | 5/17/2026 |
| 0.0.36 | 127 | 5/16/2026 |
| 0.0.35 | 127 | 5/16/2026 |
| 0.0.34 | 137 | 5/16/2026 |
| 0.0.33 | 139 | 5/4/2026 |
| 0.0.32 | 159 | 4/5/2026 |
| 0.0.31 | 147 | 4/5/2026 |
| 0.0.30 | 177 | 3/28/2026 |
| 0.0.29 | 127 | 3/26/2026 |
| 0.0.28 | 123 | 3/26/2026 |
| 0.0.27 | 123 | 3/26/2026 |
| 0.0.26 | 131 | 3/16/2026 |
| 0.0.25 | 125 | 3/15/2026 |
| 0.0.24 | 124 | 3/15/2026 |
| 0.0.23 | 143 | 3/14/2026 |
| 0.0.22 | 139 | 3/14/2026 |
| 0.0.21 | 140 | 3/14/2026 |
| 0.0.20 | 149 | 3/14/2026 |
| 0.0.19 | 137 | 3/13/2026 |
| 0.0.18 | 146 | 3/13/2026 |