DocShell.Presentation.ArtifactBlock (DocShell v1.0.0)

Copy Markdown View Source

Projects typed external artifact blocks into verified presentation receipts.

Blocks keep the four-key documentation AST and store their closed envelope inside meta.artifact. Their child AST is a complete safe textual fallback. Each invocation receives its own profiles, manifests, projections, local assets, capability declaration and runtime constraints. Loading this module starts nothing and registers nothing.

Integrity and compatibility

The fallback digest covers block identity, source binding, wording, language and fallback AST. Variant bytes have separate original-byte SHA-256 digests. Projection checks all advertised bytes before producer callbacks and refuses altered content. Unknown optional profiles can retain a verified fallback; essential unknown profiles refuse. Receipts are versioned separately from v1 collection, page and capability records.

project/2 performs no file or network I/O. Publication and actual renderer behavior remain separate checks in DocShell.Presentation.StaticExporter.

Summary

Functions

Computes the canonical complete fallback binding for one typed AST block.

Finds typed blocks recursively and returns verified selections and local asset closure.

Functions

fallback_digest(arg1)

@spec fallback_digest(map()) :: {:ok, String.t()} | {:error, term()}

Computes the canonical complete fallback binding for one typed AST block.

project(content, opts)

@spec project([DocShell.Ast.ast_node()], keyword()) :: {:ok, map()} | {:error, term()}

Finds typed blocks recursively and returns verified selections and local asset closure.