@lapxo/topos 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # @lapxo/topos
4
4
 
5
- ![version 0.1.1](https://img.shields.io/badge/version-0.1.1-8c959f) ![license MIT](https://img.shields.io/badge/license-MIT-8c959f) ![node >=22.12](https://img.shields.io/badge/node-%3E%3D22.12-8c959f) ![dependencies 1](https://img.shields.io/badge/dependencies-1-8c959f) ![cases 12 hold](https://img.shields.io/badge/cases-12_hold-2da44e) ![verify agrees](https://img.shields.io/badge/verify-agrees-2da44e)
5
+ ![version 0.1.2](https://img.shields.io/badge/version-0.1.2-8c959f) ![license MIT](https://img.shields.io/badge/license-MIT-8c959f) ![node >=22.12](https://img.shields.io/badge/node-%3E%3D22.12-8c959f) ![dependencies 1](https://img.shields.io/badge/dependencies-1-8c959f) ![cases 12 hold](https://img.shields.io/badge/cases-12_hold-2da44e) ![verify agrees](https://img.shields.io/badge/verify-agrees-2da44e)
6
6
 
7
7
  One line for every fact.
8
8
 
package/TARGET.bound CHANGED
@@ -227,6 +227,7 @@ bound-lock/1 about="the mark of a set one claim falls out of" at=witness:a-world
227
227
  bound-lock/1 about="the mark of what is refused" at=witness:a-world-that-typed-its-own-look by=owner epoch=1 form=alphabet measure=id role=writes scope=form/style/glyph/FORBIDDEN sig="ed25519:era1:B7tjHYd6Nat18EKvV5QfBcRcZFkjO+wNInLPz+20EMUjoWU8HjRcR7fnXldFSgvbDXx/0miA0/Evc7CI2PcTCw==" value=✕
228
228
  bound-lock/1 about="the mark of a cell whose origins meet" at=witness:a-world-that-typed-its-own-look by=owner epoch=1 form=alphabet measure=id role=writes scope=form/style/glyph/FREE sig="ed25519:era1:E5zWlhQaPdtYUYMqAo8TXllOGnI2oBL4rHqCddAbAnlJKkX9bPoV/BXZBx4KsMoaAKI/yWNDQd9wCaP0dZEuDw==" value=●
229
229
  bound-lock/1 about="the mark of a claim alone" at=witness:a-world-that-typed-its-own-look by=owner epoch=1 form=alphabet measure=id role=writes scope=form/style/glyph/REQUIRED sig="ed25519:era1:4sY3SYB+CdVln33NOvwdcYq2YKwGt27xxk99gm+Eo3sIo0G2hQ/MoUU2lkPXZAMe79GVnkhZ+MMw4yWYXz6FCw==" value=○
230
+ bound-lock/1 about="the spaces a JSON page indents each level by" at=witness:a-json-indent-spelled-in-code by=owner epoch=1 form=alphabet measure=id role=writes scope=form/style/json/indent sig="ed25519:era1:qY8vCN2OAMOSsPqLFLqqXTr8C+sJ7mNywK58kTr102HhMII6UmiBzdH7q+x0X2un389+S7wJoP7rS3kWGLw9Dg==" value=2
230
231
  bound-lock/1 about="the spacing of a line drawn field by field: first" at=witness:a-world-that-typed-its-own-look by=owner epoch=1 form=alphabet measure=id role=writes scope=form/style/line/first sig="ed25519:era1:eGiEbt+BSTMN5RyWF1E4VBnF6KO4USrWQPgePWqwu5I9wlvpfmkUp+VxWKxkwbWvgJsfugHXSW+tvMidKENwBg==" value=30
231
232
  bound-lock/1 about="the spacing of a line drawn field by field: label" at=witness:a-world-that-typed-its-own-look by=owner epoch=1 form=alphabet measure=id role=writes scope=form/style/line/label sig="ed25519:era1:r74/O2ojj1c1h+4DGkeSt3wmEIL0ssY1ewKglIIZSXLfDpv3KZfHdJMFg89/CEWsbd3uzRHhXn0sVi157PndDA==" value=104
232
233
  bound-lock/1 about="the spacing of a line drawn field by field: row" at=witness:a-world-that-typed-its-own-look by=owner epoch=1 form=alphabet measure=id role=writes scope=form/style/line/row sig="ed25519:era1:yFCpI8iF7wBKkIjlyHPbN8YgdIPg9TJ7adONnz3cGK40YW1P1K/CrTeTq3i1vQ+QuEMozL25fVS1zA5vnR3CDA==" value=26
@@ -345,6 +346,7 @@ bound-lock/1 at=witness:a-page-that-knew-its-world by=owner epoch=1 form=alphabe
345
346
  bound-lock/1 at=witness:a-page-that-knew-its-world by=owner epoch=1 form=alphabet measure=id role=writes scope=form/template/what-holds/measured sig="ed25519:era1:44JY520WrKOZlDk+vCCHrZs8IHVuoHuqIBvkCWOCZLLPZbaYXl+KiLKJRV6bs7jc2Zdqjtr6lQP6wZ9jNMITAg==" value=sentence|measured
346
347
  bound-lock/1 at=witness:a-page-that-knew-its-world by=owner epoch=1 form=alphabet measure=id role=writes scope=form/template/what-holds/other sig="ed25519:era1:iFz+4LoXesMNs38uoqaZigJNxDQN4n77ImqVt/h24yAWzngojCRQA52aL7W++MHvcuGZUi+kaONQK4OjfY9ICw==" value=name|about
347
348
  bound-lock/1 at=witness:a-page-that-knew-its-world by=owner epoch=1 form=alphabet measure=id role=writes scope=form/template/what-holds/others sig="ed25519:era1:pTRwSihtptJdiaKj5wZW9gENlqpSgG8pFGb/OTJ7ev4b3qQXiQKFmme58sgS/B36rxGoMZ32X6kPNp1sRdM7DQ==" value=count
349
+ bound-lock/1 at=witness:a-blob-the-wire-never-named by=owner epoch=1 form=alphabet measure=id role=writes scope=form/template/wire/blob sig="ed25519:era1:U0X2ZHyWuAQ+JQLL+FkPPywdxx7P3zGcE8zYnBgHj2E6q0Af1iPWSvWaSlmwdfoGAtIB4MkABjnP0F3ac3WaBw==" value=hash
348
350
  bound-lock/1 at=policy:wire-page by=owner epoch=1 form=alphabet measure=id role=writes scope=form/template/wire/canonical sig="ed25519:era1:pxGSEeCO0nrJ/fnvNM2XCsm4eNzvTu1lLy1yFbX/gh1wjQMWkhRB/dvQv9M3S/01vHWurOk9iKCFxsqO2SBBAQ==" value=hash
349
351
  bound-lock/1 at=policy:wire-page by=owner epoch=1 form=alphabet measure=id role=writes scope=form/template/wire/encoding sig="ed25519:era1:X1aDg1htI/1cAW3ZVV2emHPpNpTSnIUJUH6uX21+pLTdU35pZ6x6HXXoFnUoeNv4Eckx+qm7GEKA7F91Rzy5Ag==" value=encoding
350
352
  bound-lock/1 at=policy:wire-page by=owner epoch=1 form=alphabet measure=id role=writes scope=form/template/wire/header sig="ed25519:era1:APRBKIFZ+EEQdIDJBwjvU8xezc7kmMgQ7LUQcv8d22dW0AtvE9Njajq4lZryBV2XTc/VzEqi2w1ysJ/HkwHVCQ==" value=header
@@ -494,6 +496,8 @@ bound-lock/1 about=[{place}]({repository}) at=witness:a-notation-whose-door-was-
494
496
  bound-lock/1 about="[what it is]({repository}/blob/HEAD/{what})" at=witness:a-notation-whose-door-was-not-the-one-shape by=owner epoch=1 form=alphabet measure=text role=writes scope=prose/en/rested/what sig="ed25519:era1:a8JSOFnSYC4AjwQTqD7DE4xYerSSy+lMmhMBPmWTP6B5geQEgOSAphG7ILTfjmodw3wfNknhrGETAxeBzN0aAA==" value=lock
495
497
  bound-lock/1 about="It rests on {names}. Nothing else." at=witness:a-rest-drawn-against-its-edge by=owner epoch=1 form=alphabet measure=text role=writes scope=prose/en/rests/on sig="ed25519:era1:/4jmEFXpBb1aNHOLbV0ZPamsUYBUSfoZjYQyC5hSYEiLT19AUb4MdIXxRe829tSyAdHoI+UeB4H9O1b8bwMfBA==" value=lock
496
498
  bound-lock/1 about="bound's SDK: the wire, the forms, the contract and the shell you build a world with — a reader of any source or a renderer of any artefact, in an afternoon" at=witness:a-manifest-that-still-said-notation by=owner epoch=1 form=alphabet measure=text role=writes scope=prose/en/what sig="ed25519:era1:7oYYQZGT6L6Qgk8+9CmmyUqjlRYQtBnHhUr0iXwsg3XsRuFQD18hgqmGt4AJQG5LMnmfcFgSS9rGpbnwt5A9BQ==" value=lock
499
+ bound-lock/1 about="A world travels as a blob: its own lock and its build, the entry and one module per region, split as ES modules and packed as one tar, gzipped and named by the {hash} digest of its bytes. The entry names only where the world lies; the host reads the lock once and loads each region by its name and its role." at=witness:a-blob-the-wire-never-named by=owner epoch=1 form=alphabet measure=text role=writes scope=prose/en/wire/blob sig="ed25519:era1:5kGCHd4yKOhZeIhsr7Y4m6XywCuLnp65sI4sTBq8kPWSfo2yrCINd7TjOsMiUlfKEd8DhseUOiCBRpTl2EQQCg==" value=lock
500
+ bound-lock/1 about="A world's blob" at=witness:a-blob-the-wire-never-named by=owner epoch=1 form=alphabet measure=text role=writes scope=prose/en/wire/blob/heading sig="ed25519:era1:HcXyVDonwJzVEOtb2Ifgayfx/ly7X2M3C5vWeEY+/oHzFRFK5ilzLwquwEPfvg0JI/AmrhfkDZsXn1gU1VSACQ==" value=lock
497
501
  bound-lock/1 about="The canonical line is the header, then every field in the byte order of its key, one space apart, each value quoted only where it must be. Parsing a canonical line and writing it again gives back the same bytes. The digest of a line is the {hash} of those bytes, and a signature travels beside the bytes it signs, never inside them." at=policy:wire-page by=owner epoch=1 form=alphabet measure=text role=writes scope=prose/en/wire/canonical sig="ed25519:era1:Pv8+Q5d8TN4k6l9xc74aGKk8z8NgK+0Cd0v9coz1jKKhchrFlgpaw/2snV/zOE0mtcFZDfERIh3A2kcFmbqJDA==" value=lock
498
502
  bound-lock/1 about="Canonical and parse" at=policy:wire-page by=owner epoch=1 form=alphabet measure=text role=writes scope=prose/en/wire/canonical/heading sig="ed25519:era1:tSznYP+AvcMKDRFpisBdqH4NBE2Cnvw4xUl2JyWhDEOSPbg+wlhaLjzwIB3jJrcvNA26p1VQ6T5idAJfOpUXCg==" value=lock
499
503
  bound-lock/1 about="The corpus" at=policy:wire-page by=owner epoch=1 form=alphabet measure=text role=writes scope=prose/en/wire/corpus/heading sig="ed25519:era1:9xqcqZx5BOlIXYzeDREvKIK0GUR5RBhY5TFUBuoFQYxfHOpXnEjqDFspK19z6QHkmU508db8vrvGlB5gKhGRBA==" value=lock
@@ -514,7 +518,7 @@ bound-lock/1 about="A value that holds a space, an equals sign, a double quote,
514
518
  bound-lock/1 about=Quoting at=policy:wire-page by=owner epoch=1 form=alphabet measure=text role=writes scope=prose/en/wire/quoting/heading sig="ed25519:era1:Xyxrb6tUIiRyDe7DfOMtl6tZcxoxWVV0HXvDPF8Q9A7q0yRx9ChxVL+vm9EweobwFpwNYi7wCr3XHFrecaSYCA==" value=lock
515
519
  bound-lock/1 about="The reference" at=policy:wire-page by=owner epoch=1 form=alphabet measure=text role=writes scope=prose/en/wire/reference/heading sig="ed25519:era1:4dkPQetQ+v6yAsvd1cWK0MM+mRttiijim5xkQNTXhNGJzmtCILSrEI9Aqv2Q9cP2SykGgqWd7Luv4/ZvVjOOBQ==" value=lock
516
520
  bound-lock/1 about="| function | as the language reads it |" at=policy:wire-page by=owner epoch=1 form=alphabet measure=text role=writes scope=prose/en/wire/reference/table sig="ed25519:era1:9oIc1u0tucCwFjrrany+PpjTFYSf3M7IQeouwxxOKDst/kdSTgZ7e/m64BEc2r396k6dIwte5WfC1z4WXTGdDA==" value=lock
517
- bound-lock/1 about="The kernel never looks inside a value; each value has its own grammar, one function each in `topos/wire`. An alphabet is members apart by `|`, with `\\|` and `\\\\` escaped, `not:` before them to forbid and `none` for no member at all. Fields are `key=value` members of an alphabet, parted at the first `=`. A scope is steps apart by `/`, every step kept. A region is `name@resolution`, its resolution digits or `*`. Each function reads its text and writes it back canonical, and what it writes reads back the same." at=policy:wire-page by=owner epoch=1 form=alphabet measure=text role=writes scope=prose/en/wire/values sig="ed25519:era1:xNgg2UFFbII1fAmicrypRJHqOYW8i+39IZswRwJdNA1UmJyiqTcn+BU4U2GgDSkI2jEsiZJ+Jd+8IB11kac+BQ==" value=lock
521
+ bound-lock/1 about="The kernel never looks inside a value; each value has its own grammar, one function each in `topos/wire`. An alphabet is members apart by `|`, with `\\|` and `\\\\` escaped, `not:` before them to forbid and `none` for no member at all. Fields are `key=value` members of an alphabet, parted at the first `=`. A scope is steps apart by `/`, every step kept. A region is `name@resolution`, its resolution digits or `*`. A requirement is `name@range`, parted at its last `@`, so a scoped name keeps its own. Each function reads its text and writes it back canonical, and what it writes reads back the same." at=witness:a-requirement-the-manifests-parsed-by-hand by=owner epoch=1 form=alphabet measure=text role=writes scope=prose/en/wire/values sig="ed25519:era1:Y6aVosVw+glyJLHelx26icP5oajX3lnRNpS0NIq2NKTThrt9HoYe0Eac5SbwFJLJcad8Y6XcCQ6i8Lk8SsTDDg==" value=lock
518
522
  bound-lock/1 about="Inside a value" at=policy:wire-page by=owner epoch=1 form=alphabet measure=text role=writes scope=prose/en/wire/values/heading sig="ed25519:era1:qOsggWAvyyH/7sX5tgoC8CRf/3tqJOUieFQMlv+wEgGLMp6Wg1tyay04w2qho/MJccfG3I5ywXDliwN3/TtnBw==" value=lock
519
523
  bound-lock/1 about="the published place's first line: its lock begins here at epoch one, judged by a bound not yet on npm; a token publishes once, and every publish after it is the trusted publisher's" at=witness:a-topos-that-was-not-a-place by=owner epoch=1 form=alphabet measure=status role=writes scope=publish/bootstrap sig="ed25519:era1:7rcOJIygVblrbvnmv0YB8Jub7A/eRCCE7/tNCbiyy9g8WLdj+LpBXVfXEgHkuBraB6Xs6bEkzkQsFQikPtShAQ==" value=topos
520
524
  bound-lock/1 about="the version this place carries is on the registry: it rests on published/topos/0.1.0, the FACT npm view lands, and stands owed until that is paid" at=witness:a-publish-that-failed-and-read-green by=owner condition=published/0.1.0 epoch=1 form=alphabet measure=status role=demands scope=published/0.1.0 sig="ed25519:era1:sT/dGo2Sd61meQTRYg4vu8MCKVaKvmomul/NXKCB0AGKMctf/T+xnYQJc388RQWdFLKqfCYMvapjTL6L+ayeAg==" value=present
@@ -642,18 +646,18 @@ bound-lock/1 at=witness:a-claim-read-by-a-reader-that-left by=owner epoch=1 form
642
646
  bound-lock/1 at=witness:a-claim-read-by-a-reader-that-left by=owner epoch=1 form=interval measure=count role=reads scope=source/text/src/** sig="ed25519:era1:g1V/7pt4e0Q7t92y8JIP3rR4EJxkrCe3jqFDWJRwF5PheGrAZkOmoh2iLtTnIKJ3nSLK/vM9STEkFpslyIaICQ==" value=0..0
643
647
  bound-lock/1 at=witness:a-topos-that-was-not-a-place by=owner epoch=1 form=alphabet measure=id role=writes scope=sources/badges sig="ed25519:era1:46JzBJgPV+zFYjxyoDLKBUIbMPcx3/59O7Zy/WT2oiY46csW0V4Koths0ADcgwpkGT/bqY/dxiYZ8Kt0PRAeBg==" value=https://img.shields.io/badge
644
648
  bound-lock/1 about="where the notation's digest resolves: the releases of the published topos, whose digest each world's uses/topos names and every world packs against" at=policy:topos/sources by=owner epoch=1 form=alphabet measure=id role=writes scope=sources/topos sig="ed25519:era1:tQXQ6ZHqRQSkNnGoDs75gSWLEG6SF28t5TDJZSKOi/AULm37dWtlkDKhbxCaDhiTZ4bFgvArZCaTqABLB8+MDA==" value=https://github.com/lapxo/topos/releases
645
- bound-lock/1 about="the ratchet: topos's code holds no more lines than the source reader read at its birth, and each release holds no more; the ceiling is re-signed only downward, release by release, never widened" at=witness:a-ceiling-lowered-by-its-heads by=owner epoch=1 form=interval measure=count role=reads scope=src/lines sig="ed25519:era1:tpvIFe2nWFzSk0H2a9uDfWxV44fzpggy/KUJ/zrGF6el7jvv3HrfYomaw2rTvMNwf6rKYxbciKGDYnNBiSh7BA==" value=0..1645
649
+ bound-lock/1 about="topos's code, at most the lines this release carries: the grammar a requirement is read by joins it, and a refusal type nothing read leaves it" at=witness:a-requirement-the-manifests-parsed-by-hand by=owner epoch=1 form=interval measure=count role=reads scope=src/lines sig="ed25519:era1:wYH8A5CxJJMWI+y9vypNtWECJgU7FL/pkpGwDl7K89eHRKbopmYgR6S6Fy01I4ecmsDQUE04FLB/BBhuJT6UCA==" value=0..1649
646
650
  bound-lock/1 about="the render each state carries, signed once: its colour and its glyph, in the order the definition names the renders, and the colour text is written in, light, dark and on a filled node; every figure, graph and badge reads it here" at=witness:a-text-colour-on-a-filled-node-written-in-the-capsule by=owner epoch=1 form=alphabet measure=id role=writes scope=theme sig="ed25519:era1:IKLKPwG8M4JfRL+Rc7/jflZW64f7j9Thl+ojfcuXEJUF2jtPp7OzTHqmW2BmWltr1il2+lQN76aCW+OKWLOUCQ==" value=green:2da44e:●|grey:8c959f:○|red:cf222e:✕|fork:8250df:⋔|text:59636e|text-dark:9198a1|text-on:ffffff
647
651
  bound-lock/1 about="the module system a consumer loads: the one the algebra is published in" at=witness:a-form-no-block-could-reach-in-a-commonjs-build by=owner epoch=1 form=alphabet measure=id needs=package.json role=writes scope=type shape=package.json sig="ed25519:era1:nl0SD8Py4NekJu5WqfewcZe8pvx5NQIEkZZ282/MfjNe6HrHvUISaGd667+g+4d3pg3yAH7UrRSKDtgHWPY0Cw==" value=module
648
652
  bound-lock/1 about="what topos uses of obligations is a range; which release answers it is a resolved/ receipt the lockfile renders from, never a line" at=witness:a-range-older-than-the-release-it-was-packed-against by=owner epoch=1 form=alphabet measure=id role=writes scope=uses/obligations sig="ed25519:era1:gS+2s+RiVAXeSuIOrPz+qUpuJKZOow1Df8Q0s4ULE5EQnzVSQ0f/ptvCBIqtsLcbQSqhOlJ3RNqPi0aasTVbDA==" value=^0.3.5
649
653
  bound-lock/1 about="the capsule this place's lock and capsules are read by, each count a count" at=witness:a-capsule-bundling-a-topos-nobody-released by=owner epoch=1 form=alphabet measure=id role=writes scope=uses/topos-bound sig="ed25519:era1:EXOB9i2rdoo5HEPEzeKSL/HOzJRIliGiAbOpXfcPUxRVAubCc+q+5siPGAqeKcEU64l2XvRGONWdSPYGeTimCQ==" value=sha256:8742250a27d7848a731c72f2f6296a3527ff68e0b5232c6afd44e0d2b666ee92
650
654
  bound-lock/1 at=witness:a-world-that-typed-its-own-look by=owner epoch=1 form=alphabet measure=id role=writes scope=uses/topos-doc sig="ed25519:era1:2hKYSVdIVoWUaQSLdbWmvTHyRmrmzxMhYUlgJWElliAJP4lbIheOz5p6GZE7dJ7nxRbgTcDSilrddmuq1NkFDw==" value=sha256:3af35f8a7ccdd752196de70640b28d8ceb79d16f5c845bf2fe3884bf8cb9ac31
651
655
  bound-lock/1 about="the capsule this place's pipelines are rendered by, each command its place's own line" at=witness:laws-that-read-a-text-no-reader-emits by=owner epoch=1 form=alphabet measure=id role=writes scope=uses/topos-github sig="ed25519:era1:w49tVEdfrLpJ+oYtRpkvf9f2DL/CdN8QVViqFQhhEhxptzM9hL3ckIfOcmtsE3p+xhWIW1n4fM0H0dhl1X0eBg==" value=sha256:11024bce063738c1d375a7033d99e90245bc8497e59626234c5dc73b4623e6e8
652
- bound-lock/1 about="the capsule this place's manifest and build are rendered by" at=witness:a-capsule-bundling-a-topos-nobody-released by=owner epoch=1 form=alphabet measure=id role=writes scope=uses/topos-node sig="ed25519:era1:jB3vwEgK/ZHPT0mmgpy82uZ74fCxuZ6zKfGw7TLVZsZhPOAKl29ZfxOgUICjFt7uXcpaZT8XXSzho1Lzyw4PDw==" value=sha256:384a74b07eb8c7235e584b2801dbda1d78acd7ef6dac933ab05400a40658c55b
656
+ bound-lock/1 at=witness:a-manifest-that-spelled-its-own-indent by=owner epoch=1 form=alphabet measure=id role=writes scope=uses/topos-node sig="ed25519:era1:gSmU+iVNVZVMC7fxIpBK0+By1CmzoGFkmsMaThyMvnJIP8CdCKcDadyFGnnpCDy9XvEGYLHA++awTyY+mJVnCg==" value=sha256:64e7858876be9cdd3687cdd224e797531d6576fdcb4fb6b2207c6c2b2be6ff7d
653
657
  bound-lock/1 about="the capsule this place's code is read through, each measure combined as it declares" at=witness:a-capsule-bundling-a-topos-nobody-released by=owner epoch=1 form=alphabet measure=id role=writes scope=uses/topos-typescript-tree sig="ed25519:era1:N6JpWdiE8/k3tD8FYP7bvuMJhlbN5GU8L3c/W0eL5DktKJlK5Dud/q6BBj/EzOU85g1wxi/F9juHU2yhkO0kCQ==" value=sha256:9d9b44b8ef299b946b823a1767367b64ef6b333c1566f8ea3ae74da4f3f3ce13
654
658
  bound-lock/1 about="coverage-honours-withdraws: a key's coverage is its standing lines, withdraws honoured; a withdrawn coverage covers nothing signed after it, and the old reach is never counted again. Read by the one harness over the lanes' key lines" at=witness:coverage-that-never-narrowed by=owner epoch=1 form=alphabet measure=pass role=reads scope=vector/coverage-honours-withdraws sig="ed25519:era1:VH+j1prCqR0vErNlRXSo+2a/KScHs46nL2UgPoxkO1MNxOsjIbOCP5IwZzciegHzb08N5L3szm13gwLC8NLzDQ==" value=pass
655
659
  bound-lock/1 about="After the header come the fields, each `key=value`, apart by runs of spaces. A key appears once, and a line that names one twice is refused. A value `-` is absence, and the field reads as unwritten. A field no reader knows rides through untouched. `needs` names coordinates by path, never by digest: steps apart by `/`, a wildcard only in the last step. A line rests on bytes in `restsOn`, an alphabet whose member is their digest, `sha256:` and 64 lowercase hex digits; a member that is a scope rests on that line instead. For example: `bound-lock/1 at=witness:a-second-head-that-never-said-what-it-is by=owner form=alphabet measure=status needs=verify/docs/what.md restsOn=sha256:fd99c1421a6a4ccabc4de5a34e1d604e68a66d31004d651d3be982f1c0c623e6 role=demands scope=verify/docs/what shape=render value=present`." at=policy:wire-page by=owner epoch=1 form=alphabet measure=text role=writes scope=prose/en/wire/fields sig="ed25519:era1:FcrNUr/pq8sTCGt+beJNAPXHPs6b/yoCjXkBeJaxAY3KYOSvcoHqhs9aFXU4mmgFCccR9OfF13RdaArvTS9LBQ==" value=lock
656
- bound-lock/1 about="the version topos carries, as the owner states it; its compatibility witness is the release before it: its vectors, tests, samples and examples are carried byte for byte, and every vector the one harness runs passes against the new code" at=witness:a-release-number-older-than-its-words by=owner epoch=1 form=alphabet measure=id role=writes scope=version shape=package.json sig="ed25519:era1:SCVunuFHq0c0uPEhy4/Tt7OyhAGvbN/j83otM8prKBCPATOwH3IqC8J5RB9AH9saQnDFyuSJIQ3l7CCWr03YDw==" value=0.1.1
660
+ bound-lock/1 about="the version topos carries, as the owner states it; its compatibility witness is the release before it: its vectors, tests, samples and examples are carried byte for byte and hold against the new code, and the grammar a requirement is read by adds its own cases to the corpus" at=witness:a-grammar-the-release-before-it-lacked by=owner epoch=1 form=alphabet measure=id role=writes scope=version shape=package.json sig="ed25519:era1:8Ux2PUiUtGa+j+TpnUMIEtCy7SRVST0NvZsMfIdJLXBoE7kA45W5joj/JPTWKXyvVkeT8reTIrAukD0SgBXRCQ==" value=0.1.2
657
661
  bound-lock/1 at=policy:place/version by=owner epoch=1 form=interval measure=version-differs role=reads scope=version-differs sig="ed25519:era1:Rk62Otv6B9gylPWMDOZEJigPNgz+GY0oac9TxuBH/RvFb9G3vf2uMbDWVoCZ+YkiWlx5zVacfyLY5/43C+bGAQ==" value=0..0
658
662
  bound-lock/1 about="how to cite the place: the file a forge reads for its cite button, rendered from the lock and never written by hand" at=witness:a-topos-that-was-not-a-place by=owner epoch=1 form=alphabet measure=id needs=CITATION.cff role=demands scope=view/citation-file shape=CITATION.cff sig="ed25519:era1:GZ2t8DBb5ElL/V12/lWJosgBd6tN33WKpZ+z5vr7+bdn8fh1jSo5dSis7AjcGHHCLw6XfoqlVVdippKQ72e4Bw==" value=cff
659
663
  bound-lock/1 about="a state renders with its amplitude, from the theme line; two greens of 0.9 and 0.1 differ" at=policy:views/colour by=owner epoch=1 form=alphabet measure=id role=writes scope=view/colour sig="ed25519:era1:avXiTv3z6Ja1GaHYOQcoOGyagObE4lG27S0L6gXTYlCjQ9oEYJn5BgGyE/2flfz3e40KfPk80OZ3GDT9TH+LBg==" value=state|amplitude
@@ -675,6 +679,6 @@ bound-lock/1 about="the reference of a capsule: its regions, what each reads and
675
679
  bound-lock/1 at=witness:a-topos-that-was-not-a-place by=owner epoch=1 form=alphabet measure=id needs=tsconfig.json role=demands scope=view/tsconfig shape=tsconfig.json sig="ed25519:era1:mLR9jexWiTXqB6zfLBFv3NIqoQcrfWkDxSAOTeiyvGupumfWbFlJ8MxGreTII22guzssnlarnKtyY4PvDsQ6Dg==" value=build
676
680
  bound-lock/1 about="the wire of this place, written from its lines by the capsule that renders it" at=policy:place/views by=owner epoch=1 form=alphabet measure=id role=demands scope=view/wire shape=docs/wire.md sig="ed25519:era1:JvVNo049g6Jpi1s3LrReLOy6GQE++jnHHBtsXcSJXSU94YUF5NfbucUbW44e/y/XrEcuQfEg53RjMuX2bqhEAg==" value=wire
677
681
  bound-lock/1 at=policy:topos/wire-page by=owner epoch=1 form=alphabet measure=id role=writes scope=wire/corpus sig="ed25519:era1:fOwwTw1uDC7kPs/YScf0HBQrbRnojzidHsd06dbNy4Pta1xfqiSsP61/+IzZ4y1sIbGYzNrEfTNNu1uhPThXCg==" value=spec/bound-lock-1|spec/fold|spec/values
678
- bound-lock/1 at=policy:topos/wire-page by=owner epoch=1 form=alphabet measure=id role=writes scope=wire/reference sig="ed25519:era1:BhBLUxG6kaqekXYni7Sg1QXHajXwNIuAlsAR9C2Yn21UdH0s6WcaaRBVjI8i2TYvoYAn6+STF4gddlSTsd/SBw==" value=parse|canonical|signedBytes|byBytes|alphabet|fields|steps|atResolution|decimal
679
- bound-lock/1 at=policy:topos/wire-page by=owner epoch=1 form=alphabet measure=id role=writes scope=wire/rules sig="ed25519:era1:LrxfSIGeamZGBA/Dn3wsPXPPRMGZyc2EmZudHABPDXYVYZyUtqNI/Ntkx9A8WFw2ki+UrfFb9yknFDDPPSwHDA==" value=header|fields|quoting|encoding|order|newline|canonical|values|numbers
682
+ bound-lock/1 at=witness:a-requirement-the-manifests-parsed-by-hand by=owner epoch=1 form=alphabet measure=id role=writes scope=wire/reference sig="ed25519:era1:bV/oK/AGmMNFQEzwe+G2052UkcUCgRRXgAN6yqiKGHD536NHypyFbSKDkTuGog2UIXd2pWBERlg7vDUdG28yAQ==" value=parse|canonical|signedBytes|byBytes|alphabet|fields|steps|atResolution|requirement|decimal
683
+ bound-lock/1 at=witness:a-blob-the-wire-never-named by=owner epoch=1 form=alphabet measure=id role=writes scope=wire/rules sig="ed25519:era1:q0jkxwEU9pbfEQM3Enxh8FpFlHiMGHCr7zEPd0dOOz/gw7TKOhXgmYzsSGOZNAyyWFmViz0nskVepXnmdaWSCw==" value=header|fields|quoting|encoding|order|newline|canonical|values|numbers|blob
680
684
  bound-lock/1 at=policy:topos/wire-page by=owner epoch=1 form=alphabet measure=id role=writes scope=wire/tokens sig="ed25519:era1:oILWbvztXmwFdK/TJcxZ79kORdUxlDsyUg6g7RFHdq1Og1JWeZs3FvzxFufrvw6WgfJ2OlBMf+trH2wtQ2ruBw==" value=header:bound-lock/1|encoding:UTF-8|hash:sha256
@@ -3,11 +3,13 @@ type Region = (asked: Asked) => readonly string[];
3
3
  /**
4
4
  * The shell a capsule's rendered index hands its regions to: a region is answered only when it was handed every read
5
5
  * its own line declares, and one handed less is refused — the no every render capsule carries without writing it.
6
+ * Handed the url of a world's index instead, each shell only names where the world lies: its host reads the own lock
7
+ * beside it once and loads each region by name and role.
6
8
  */
7
9
  export declare function shell(regions: Readonly<Record<string, {
8
10
  readonly reads: readonly string[];
9
11
  readonly region: Region;
10
- }>>): Region;
12
+ }>> | string): Region;
11
13
  type Handed = readonly {
12
14
  readonly place: string;
13
15
  readonly text: string;
@@ -24,7 +26,7 @@ type Reading = {
24
26
  * reads only what that line declares it reads — a region fits a read when some tail of its steps matches the read's glob,
25
27
  * and what follows its `@` is the resolution it is handed at. A region no line names is refused, and so is a file of another shape.
26
28
  */
27
- export declare function readers(regions: Readonly<Record<string, Reading>>): {
29
+ export declare function readers(regions: Readonly<Record<string, Reading>> | string): {
28
30
  readonly observe: (bytes: Uint8Array, place: string, region?: string, files?: Handed) => readonly unknown[];
29
31
  readonly run: (place: string, self: string, held: readonly (readonly [string, string])[], region?: string) => readonly unknown[];
30
32
  };
@@ -47,5 +49,5 @@ export declare const counted: (asked: Asked, what: string, n: number, measure: s
47
49
  export declare function receiptShell(regions: Readonly<Record<string, {
48
50
  readonly reads: readonly string[];
49
51
  readonly region: (asked: Asked) => readonly unknown[];
50
- }>>): (asked: Asked) => readonly unknown[];
52
+ }>> | string): (asked: Asked) => readonly unknown[];
51
53
  export {};
@@ -3,18 +3,22 @@ import { atResolution, steps } from "../wire/grammar.js";
3
3
  /**
4
4
  * The shell a capsule's rendered index hands its regions to: a region is answered only when it was handed every read
5
5
  * its own line declares, and one handed less is refused — the no every render capsule carries without writing it.
6
+ * Handed the url of a world's index instead, each shell only names where the world lies: its host reads the own lock
7
+ * beside it once and loads each region by name and role.
6
8
  */
7
9
  export function shell(regions) {
8
- return (asked) => {
9
- const one = regions[asked.region];
10
- if (one === undefined)
11
- throw new Error(`REFUSE·region ${asked.region}: no line of this capsule renders it`);
12
- const short = one.reads.filter((read) => !asked.reads.includes(read));
13
- if (short.length)
14
- throw new Error(`REFUSE·region ${asked.region}: handed less than it declares, without ${short.join(' · ')}`);
15
- return one.region(asked);
16
- };
10
+ return typeof regions === 'string' ? located(regions) : dispatch(regions, 'renders');
17
11
  }
12
+ const dispatch = (regions, verb) => (asked) => {
13
+ const one = regions[asked.region];
14
+ if (one === undefined)
15
+ throw new Error(`REFUSE·region ${asked.region}: no line of this capsule ${verb} it`);
16
+ const short = one.reads.filter((read) => !asked.reads.includes(read));
17
+ if (short.length)
18
+ throw new Error(`REFUSE·region ${asked.region}: handed less than it declares, without ${short.join(' · ')}`);
19
+ return one.region(asked);
20
+ };
21
+ const located = (url) => Object.assign(() => { throw new Error(`REFUSE·world ${url}: its host answers it by the regions its own lock names`); }, { world: url });
18
22
  const fits = (read, place) => {
19
23
  const glob = atResolution(read).name;
20
24
  const [bare, tail] = place.endsWith('/') ? [place.slice(0, -1), '/'] : [place, ''];
@@ -27,6 +31,8 @@ const fits = (read, place) => {
27
31
  * and what follows its `@` is the resolution it is handed at. A region no line names is refused, and so is a file of another shape.
28
32
  */
29
33
  export function readers(regions) {
34
+ if (typeof regions === 'string')
35
+ return { observe: located(regions), run: located(regions) };
30
36
  const one = (region, places) => {
31
37
  const held = region === undefined ? undefined : regions[region];
32
38
  if (held === undefined)
@@ -52,13 +58,5 @@ export const counted = (asked, what, n, measure) => [{ scope: `${asked.region}/$
52
58
  * a count, named by the region that read it and by what it counted.
53
59
  */
54
60
  export function receiptShell(regions) {
55
- return (asked) => {
56
- const one = regions[asked.region];
57
- if (one === undefined)
58
- throw new Error(`REFUSE·region ${asked.region}: no line of this capsule answers it`);
59
- const short = one.reads.filter((read) => !asked.reads.includes(read));
60
- if (short.length)
61
- throw new Error(`REFUSE·region ${asked.region}: handed less than it declares, without ${short.join(' · ')}`);
62
- return one.region(asked);
63
- };
61
+ return typeof regions === 'string' ? located(regions) : dispatch(regions, 'answers');
64
62
  }
@@ -7,6 +7,10 @@ export interface Resolution {
7
7
  readonly name: string;
8
8
  readonly at?: number | '*';
9
9
  }
10
+ export interface Requirement {
11
+ readonly name: string;
12
+ readonly range: string;
13
+ }
10
14
  /**
11
15
  * The grammars inside a value, one function each: handed the text a line carries it reads the value, handed the value
12
16
  * it writes the canonical text, and what it writes reads back to what it was handed. A value is read after its line has
@@ -20,3 +24,5 @@ export declare function steps(text: string): readonly string[];
20
24
  export declare function steps(value: readonly string[]): string;
21
25
  export declare function atResolution(text: string): Resolution;
22
26
  export declare function atResolution(value: Resolution): string;
27
+ export declare function requirement(text: string): Requirement;
28
+ export declare function requirement(value: Requirement): string;
@@ -40,3 +40,9 @@ export function atResolution(given) {
40
40
  refuse('atResolution', `\`${given}\` is not name@digits or name@*`);
41
41
  return { name, at: said === EVERY ? EVERY : Number(said) };
42
42
  }
43
+ export function requirement(given) {
44
+ if (typeof given !== 'string')
45
+ return given.name === '' || given.range === '' || given.range.includes(AT) ? refuse('requirement', 'a requirement names what it requires and a range, with no at sign') : given.name + AT + given.range;
46
+ const at = given.lastIndexOf(AT);
47
+ return at > 0 && at < given.length - 1 ? { name: given.slice(0, at), range: given.slice(at + 1) } : refuse('requirement', `\`${given}\` is not name@range`);
48
+ }
@@ -2,8 +2,8 @@
2
2
  export { PROTOCOL } from './types.ts';
3
3
  export type { Claim, Method } from './types.ts';
4
4
  export { byBytes, canonical, parse, signedBytes } from './line.ts';
5
- export { alphabet, atResolution, fields, steps } from './grammar.ts';
6
- export type { Alphabet, Field, Resolution } from './grammar.ts';
5
+ export { alphabet, atResolution, fields, requirement, steps } from './grammar.ts';
6
+ export type { Alphabet, Field, Requirement, Resolution } from './grammar.ts';
7
7
  export { fromLine, signersOf, authorityOf, windowAt, roleClaimsOf, roleAt, namesAt, isKeyClaim, isWireClaim, wireAt, ENVELOPE } from './claimline.ts';
8
8
  export type { Signer, SignerVerdict, CoordinateRole, RoleClaim } from './claimline.ts';
9
9
  export { matches } from './classes.ts';
@@ -1,7 +1,7 @@
1
1
  /** It answers the line, the forms' encodings, the names — how is a fact written? */
2
2
  export { PROTOCOL } from "./types.js";
3
3
  export { byBytes, canonical, parse, signedBytes } from "./line.js";
4
- export { alphabet, atResolution, fields, steps } from "./grammar.js";
4
+ export { alphabet, atResolution, fields, requirement, steps } from "./grammar.js";
5
5
  export { fromLine, signersOf, authorityOf, windowAt, roleClaimsOf, roleAt, namesAt, isKeyClaim, isWireClaim, wireAt, ENVELOPE } from "./claimline.js";
6
6
  export { matches } from "./classes.js";
7
7
  export { CAPSULE, EXTENSION, LOCK, RECEIPTS } from "./names.js";
@@ -13,11 +13,3 @@ export interface FormGrammar {
13
13
  export declare function boundOf(form: string, value: string, grammars?: readonly FormGrammar[]): Bound | null;
14
14
  export declare const BOUND_FORMS: readonly string[];
15
15
  export declare const REF_RELATIONS: readonly ["within", "copies", "derives"];
16
- export interface Refusal {
17
- readonly kind: 'refuse';
18
- readonly scope: string;
19
- readonly measure: string;
20
- readonly why: string;
21
- readonly witness: string;
22
- readonly at?: string;
23
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lapxo/topos",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Bound's SDK: the wire, the forms, the contract and the shell you build a world with — a reader of any source or a renderer of any artefact, in an afternoon.",
5
5
  "type": "module",
6
6
  "license": "MIT",