RelayMark.ContentEdit (relay_mark_elixir v0.6.4)

Copy Markdown View Source

Maintained ProseMirror/Yjs execution and ephemeral command proof over the canonical editor schema.

Hosts supply an admitted pre-document, prove CRDT anchors/frontiers and copies, and own runtime supervision/pooling. This module owns no durable editable document replica, authorization, transport or global serial runtime. Each runtime has a bounded isolated QuickJS-NG thread. Resource refusal never invokes another interpreter.

Summary

Functions

Apply actual Step JSON to a host-admitted PM document using the maintained owner.

Execute the same maintained steps from a host-admitted canonical AST, preserving its envelope.

Derive exact relocation-copy and human selectors from maintained StepMaps and trusted identity snapshots.

Checkpoint the actual maintained owner after trusted chronological command replay. The host owns scoped checkpoint persistence, coverage and immutable receipt authentication. No raw update archive is returned.

Stateless classification after the host authenticates current original receipts, scope and complete proof. Inputs and results are not credentials.

Fold authenticated current references for only the requested candidate identities; tombstoned ancestors remain exact evidence.

Imports retained inert HTML through the maintained DOM and canonical editor grammar.

Map independently authenticated human archive candidates through recomputed structural recovery regions.

Partition recomputed imported destinations using separately authenticated human/generated subsets. Unproven remainder is unknown; inputs confer no authority.

Allocate colliding imported Anchor names as actual maintained Steps while retaining all target destinations. No donor authority is issued.

Plan original-ordinal imported heading/link repairs as actual maintained Steps. No donor or receipt authority is issued.

Read-only dependency planning across an authenticated complete actor/owner cut. The host authenticates original reviewed associations and the whole checkpoint sidecar; the plan grants no source or erasure authority.

Verifies or derives a finite physical/history cut through the maintained owner.

Plan one exact authored-text replacement as maintained Steps over canonical rich AST.

Recheck target-only regional allocations for an already authenticated original issued association. The host owns receipt/scope/archive authority and must independently prove complete mutation correspondence.

Prove complete-block reviewed append regions against exact archived structure and actual fresh allocations. The host still authenticates archive hashes, target guard, donor ancestry and complete mutation correspondence.

Prepare exact causal text/copy evidence. The result is not final mutation or history admission.

Produce one actual DOM-free maintained command from host-admitted retained state and trusted server command/manager identities. The host still authorizes and independently admits the original returned update.

Plan a complete canonical authored target through the same maintained command producer.

Produce one actual maintained undo/redo from host-authenticated original owner receipts or checkpoint.

Replay actual maintained PM/Yjs command and compare its complete original mutation footprint. Optional private accepted-owner receipts reconstruct the same maintained UndoManager for inverse correspondence. Hosts still authorize source, scope, receipt membership and accepted undo/redo cycles.

Resolve validated current visible source ranges in document order.

Retire authenticated complete owned groups through the actual reconstructed manager and capture its surviving checkpoint. Source classification and erasure authority remain with the host.

Read original finite archive candidate windows; the host authenticates the file and every source claim.

Resolve only reviewed imported archive candidates; this issues no human or donor authority.

Exact maintained interpreter bytes used to qualify finite conversion receipts.

Read current visible selector windows; no authorship or command admission is inferred.

Start an isolated reusable runtime; the host must stop it when its owner exits.

Subtract authenticated erasure summary intervals from one bounded candidate selector. No admission or ancestry authority is granted.

Functions

apply(runtime, document, operation)

Apply actual Step JSON to a host-admitted PM document using the maintained owner.

apply_document(runtime, document, operation)

Execute the same maintained steps from a host-admitted canonical AST, preserving its envelope.

build_witness(runtime, evidence)

Derive exact relocation-copy and human selectors from maintained StepMaps and trusted identity snapshots.

checkpoint_owned_history(runtime, input)

Checkpoint the actual maintained owner after trusted chronological command replay. The host owns scoped checkpoint persistence, coverage and immutable receipt authentication. No raw update archive is returned.

classify_source_reference(runtime, binding, transaction, proof, human_ancestry, regional_context \\ nil)

Stateless classification after the host authenticates current original receipts, scope and complete proof. Inputs and results are not credentials.

fold_source_references(runtime, binding, candidate_selector, references, regional_contexts \\ nil)

Fold authenticated current references for only the requested candidate identities; tombstoned ancestors remain exact evidence.

import_document_html(runtime, input)

Imports retained inert HTML through the maintained DOM and canonical editor grammar.

map_reviewed_recovery_selection(runtime, evidence)

Map independently authenticated human archive candidates through recomputed structural recovery regions.

partition_reviewed_recovery_destinations(runtime, input)

Partition recomputed imported destinations using separately authenticated human/generated subsets. Unproven remainder is unknown; inputs confer no authority.

plan_reviewed_anchor_allocation(runtime, input)

Allocate colliding imported Anchor names as actual maintained Steps while retaining all target destinations. No donor authority is issued.

plan_reviewed_heading_navigation(runtime, input)

Plan original-ordinal imported heading/link repairs as actual maintained Steps. No donor or receipt authority is issued.

plan_reviewed_recovery_retirement(runtime, input)

Read-only dependency planning across an authenticated complete actor/owner cut. The host authenticates original reviewed associations and the whole checkpoint sidecar; the plan grants no source or erasure authority.

prepare_aggregate_settings_history_cut(runtime, input)

Verifies or derives a finite physical/history cut through the maintained owner.

Supply exactly the conversion update/destination state pair, or writer_client alone. The writer must be a fresh uint32 absent from the complete original client roster; null is allowed only for a proved zero-effect transform. Original basis, receipts and owner/cohort requirements are unchanged. Derivation adds the independently verified conversion_update_base64 to the existing result.

Reviewed cohorts use the same privately recognized aggregate/per-field input and exact Video/Slot plans; the Video array may be empty. Internal conditional field/option relations affect capability closure only, never typed ancestry. Option predecessors validate placement without becoming capability sources.

The host authenticates the complete original inventory and consumes the actual state and manager result. No receipt, source authority, installation permission or live historical codec fallback is supplied. Prior physical-cut/terminal continuity and actual host installation require separate qualification.

prepare_document_text_replacement(runtime, input)

Plan one exact authored-text replacement as maintained Steps over canonical rich AST.

prepare_retained_reviewed_recovery_witness(runtime, evidence)

Recheck target-only regional allocations for an already authenticated original issued association. The host owns receipt/scope/archive authority and must independently prove complete mutation correspondence.

prepare_reviewed_recovery_witness(runtime, evidence)

Prove complete-block reviewed append regions against exact archived structure and actual fresh allocations. The host still authenticates archive hashes, target guard, donor ancestry and complete mutation correspondence.

prepare_witness(runtime, evidence)

Prepare exact causal text/copy evidence. The result is not final mutation or history admission.

produce(runtime, input)

Produce one actual DOM-free maintained command from host-admitted retained state and trusted server command/manager identities. The host still authorizes and independently admits the original returned update.

produce_document_patch(runtime, input)

Plan a complete canonical authored target through the same maintained command producer.

produce_owned_history(runtime, input)

Produce one actual maintained undo/redo from host-authenticated original owner receipts or checkpoint.

replay_mutation(runtime, evidence)

Replay actual maintained PM/Yjs command and compare its complete original mutation footprint. Optional private accepted-owner receipts reconstruct the same maintained UndoManager for inverse correspondence. Hosts still authorize source, scope, receipt membership and accepted undo/redo cycles.

resolve_text_items(runtime, snapshot, selector)

Resolve validated current visible source ranges in document order.

retire_owned_history(runtime, input)

Retire authenticated complete owned groups through the actual reconstructed manager and capture its surviving checkpoint. Source classification and erasure authority remain with the host.

reviewed_recovery_archive_source_windows(runtime, evidence)

Read original finite archive candidate windows; the host authenticates the file and every source claim.

reviewed_recovery_source_selection(runtime, evidence)

Resolve only reviewed imported archive candidates; this issues no human or donor authority.

runtime_digest()

Exact maintained interpreter bytes used to qualify finite conversion receipts.

source_selector_windows(runtime, snapshot)

Read current visible selector windows; no authorship or command admission is inferred.

start_runtime(opts \\ [])

Start an isolated reusable runtime; the host must stop it when its owner exits.

stop_runtime(runtime)

subtract_source_selectors(runtime, candidates, excluded)

Subtract authenticated erasure summary intervals from one bounded candidate selector. No admission or ancestry authority is granted.