Files

@hypit/source

The byte-oriented Source contract shared by Author and saved-Invocation compilation.

SourceUnit contains opaque bytes and a closure-local identity. ResolvedSource pairs those bytes with the exact trusted Frontend selected by the caller, Workspace mount or package Source export. Source itself never guesses from a suffix or body and has no default parser. Physical locators remain private to the Workspace; a Host may expose one separately for diagnostics or editing, but it never becomes graph identity.

SourceRange is owned here because offsets locate authoring syntax inside a Source; graph Protocol values remain independent of parsers, text encodings and editor positions.

A SourceAssetRequest carries the written locator, media type, optional package-owned bytes and source range. The Workspace resolves it directly to one Protocol BlobRef; byte transfer, attachment identity and physical storage remain with the Workspace.

@hypit/source/text is the optional adapter used by Hypit's self-described UTF-8 author files. It recognizes one bounded Header such as:

<?svml using="@hypit/markup@1"?>

The adapter masks the Header while preserving UTF-16 offsets and line breaks. Other Workspaces can produce ResolvedSource directly and need not use text or a Header. Neither entry recognizes imports, XML, Script, Recipes, saved-Invocation syntax or domain Types; those belong to the selected Frontend.