s-m-r-t
Open the s-m-r-t source on GitHub Switch to dark color scheme
← All packages
Content & media v0.57.40

@happyvertical/smrt-assets

Provider-neutral asset storage, metadata, versions, associations, and AI-assisted operations.

Source ↗

What it gives you

Provider-neutral asset storage, metadata, versions, associations, and AI-assisted operations.

This package is one focused part of the s-m-r-t stack. Its decorated models participate in the same manifest, tenancy, persistence, and generated-interface conventions as the rest of the framework.

Version and derive assets through the runtime

createNewVersion maintains primaryVersionId and findVersions history. AssetRuntime exposes createAssetRuntime, storeSourceAsset, storeDerivedAsset, linkDerivation, and setExtractionStatus. ASSET_ROLES, ASSET_METADATA_KEYS, and ASSET_EXTRACTION_STATUS give integrations a shared vocabulary; AssetAssociation records polymorphic provenance.

Serving has explicit response semantics

serveAsset and resolveAssetForServing choose 403, 404, redirect 302, or upstream failure 502 based on access and availability. remoteMode chooses proxy or redirect. FolderCollection uses SmrtHierarchical getTree and getPath; load a planned subtree rather than recursively resolving each node to avoid an N+1 query pattern.