Spectre.Server.PublicProjection behaviour (Spectre v0.4.0)

Copy Markdown View Source

Optional incremental projection of a planning stream into public text.

Configure public_projection: Module or {Module, options} on generation. The host vouches for this adapter's public projection. It receives complete UTF-8 after the core structural sanitizer; it must never expose instructions, control data or internal reasoning, and its output must be consistent with the terminal public result. Raw provider output remains separate for final plan consolidation. This port never executes a proposal.

Summary

Callbacks

finish(term)

@callback finish(term()) :: {:ok, binary()} | {:error, term()}

init(keyword)

@callback init(keyword()) :: {:ok, term()} | {:error, term()}

push(binary, term)

@callback push(binary(), term()) :: {:ok, binary(), term()} | {:error, term()}

Functions

finish(arg1)

open(module)

push(arg1, text)