@lapxo/topos
v0.1.7
Published
Wire, forms, authority and views for interpreting information.
Downloads
822
Readme
Topos
Topos defines how information is read: its wire, forms, authority and views. Bound admits and folds the records; Obligatory supplies the operations on cells. A selected topos gives those operations a concrete interpretation.
Read a record
import { parse, canonical } from '@lapxo/topos/wire';
const record = parse('bound-lock/1 scope=temperature role=writes form=interval measure=celsius value=18..24 by=target at=policy:example');
if (record.kind === 'fact') {
console.log(canonical(record.value.fields));
}Parsing reads the syntax. Admission also requires the selected wire grammar, authority and context; parsing alone does not authorize a record.
Select by standing
A topos is the fold of its lock over its declared regions. Its identity is the digest of canonical live claims, excluding the signing envelope and host projection. A changed form, class, view or offer changes that identity. Re-signing does not. Artifact digests in restsOn close the required bytes.
uses/<name> selects that standing by digest. An npm package supplies SDK code; its version or archive digest is a different identity. A capsule is an executable offer of a topos. Forms, classes and views need no capsule to be selected.
Publish a lock
publicationOf(live) projects already admitted, folded configuration claims into a public lock. It removes delivery envelopes, preserves signed public-key records and orders canonical lines by wire bytes. It neither folds history nor grants authority. Withdrawals and typed object history require their own semantic projection and are refused.
publicLock(lines) recognizes that representation for a reader. Signed delivery history returns to the ordinary authority reader; unsigned delivery envelopes are refused. Recognition does not verify public keys or grant authority.
Build a domain
- Use
@lapxo/topos/formsto define how domain values are decoded and compared. - Use
@lapxo/topos/contractfor readers and renderers over declared regions. - Use
@lapxo/topos/standingto encode an already admitted, folded standing. - Use
@lapxo/topos/cells-viewand@lapxo/topos/cell-inputsfor cells rendering and semantic receipt inputs. - Keep transport, storage and execution in the host.
A sensor domain can choose units and spans; a repository domain can expose checks; a view can present the same cells differently. Bound does not infer those choices from directory names.
Compare evidence
A domain supplies opaque values and the evidence it admits. The SDK compares references and values; it does not choose an attester, start a verifier, count origins or decide a release. Missing or unadmitted evidence cannot become equality. Those decisions belong to the selected contract and its caller.
Interpret values
Forms define how values are decoded and compared. Cell operations and their four states remain in Obligatory; a view only presents the result.
Keep the boundary
Selecting a standing does not authorize a record or execute an artifact. The host verifies the named bytes; the selected contract determines what can be interpreted.
Contribute
See CONTRIBUTING.md and the wire reference.
