@nervur.org/genome 0.0.0-stage → 0.37.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/LICENSE +105 -0
- package/README.md +28 -2
- package/SECURITY.md +8 -0
- package/cage/cells/cells.d.ts +25 -0
- package/cage/cells/cells.js +114 -0
- package/cage/cells/index.d.ts +4 -0
- package/cage/cells/index.js +5 -0
- package/cage/cells/over.d.ts +5 -0
- package/cage/cells/over.js +46 -0
- package/cage/cells/range.d.ts +31 -0
- package/cage/cells/range.js +226 -0
- package/cage/cells/reader.d.ts +17 -0
- package/cage/cells/reader.js +20 -0
- package/cage/codec/codec.d.ts +2 -0
- package/cage/codec/codec.js +5 -0
- package/cage/codec/index.d.ts +1 -0
- package/cage/codec/index.js +2 -0
- package/cage/collation/check.d.ts +7 -0
- package/cage/collation/check.js +24 -0
- package/cage/collation/collation.d.ts +9 -0
- package/cage/collation/collation.js +118 -0
- package/cage/collation/index.d.ts +3 -0
- package/cage/collation/index.js +4 -0
- package/cage/collation/order.d.ts +1 -0
- package/cage/collation/order.js +9 -0
- package/cage/fill.d.ts +8 -0
- package/cage/fill.js +30 -0
- package/cage/index.d.ts +6 -0
- package/cage/index.js +78 -0
- package/cage/lobe/apart.d.ts +34 -0
- package/cage/lobe/apart.js +91 -0
- package/cage/lobe/calls.d.ts +8 -0
- package/cage/lobe/calls.js +35 -0
- package/cage/lobe/charges.d.ts +10 -0
- package/cage/lobe/charges.js +42 -0
- package/cage/lobe/decoder.d.ts +15 -0
- package/cage/lobe/decoder.js +159 -0
- package/cage/lobe/host.d.ts +27 -0
- package/cage/lobe/host.js +107 -0
- package/cage/lobe/index.d.ts +7 -0
- package/cage/lobe/index.js +32 -0
- package/cage/lobe/quo.d.ts +3 -0
- package/cage/lobe/quo.js +30 -0
- package/cage/lobe/read.d.ts +11 -0
- package/cage/lobe/read.js +18 -0
- package/cage/lobe/runner.d.ts +45 -0
- package/cage/lobe/runner.js +242 -0
- package/cage/lobe/seams.d.ts +2 -0
- package/cage/lobe/seams.js +124 -0
- package/cage/published.d.ts +1 -0
- package/cage/published.js +27 -0
- package/cage/run/cells.d.ts +9 -0
- package/cage/run/cells.js +80 -0
- package/cage/run/codes.d.ts +19 -0
- package/cage/run/codes.js +101 -0
- package/cage/run/given.d.ts +49 -0
- package/cage/run/given.js +145 -0
- package/cage/run/host.d.ts +13 -0
- package/cage/run/host.js +37 -0
- package/cage/run/index.d.ts +4 -0
- package/cage/run/index.js +5 -0
- package/cage/run/input.d.ts +14 -0
- package/cage/run/input.js +138 -0
- package/cage/run/nest.d.ts +31 -0
- package/cage/run/nest.js +187 -0
- package/cage/run/run.d.ts +12 -0
- package/cage/run/run.js +79 -0
- package/cage/run/suspend.d.ts +14 -0
- package/cage/run/suspend.js +57 -0
- package/contracts/bridge/contract.d.ts +2 -0
- package/contracts/bridge/contract.js +57 -0
- package/contracts/bridge/index.d.ts +1 -0
- package/contracts/bridge/index.js +2 -0
- package/contracts/carriers/contract.d.ts +4 -0
- package/contracts/carriers/contract.js +485 -0
- package/contracts/carriers/index.d.ts +2 -0
- package/contracts/carriers/index.js +3 -0
- package/contracts/carriers/web.d.ts +2 -0
- package/contracts/carriers/web.js +231 -0
- package/contracts/chance/contract.d.ts +2 -0
- package/contracts/chance/contract.js +25 -0
- package/contracts/chance/index.d.ts +1 -0
- package/contracts/chance/index.js +2 -0
- package/contracts/codec/contract.d.ts +2 -0
- package/contracts/codec/contract.js +124 -0
- package/contracts/codec/index.d.ts +1 -0
- package/contracts/codec/index.js +2 -0
- package/contracts/crypto/contract.d.ts +2 -0
- package/contracts/crypto/contract.js +204 -0
- package/contracts/crypto/index.d.ts +1 -0
- package/contracts/crypto/index.js +2 -0
- package/contracts/crypto/mlkem.d.ts +2 -0
- package/contracts/crypto/mlkem.js +21 -0
- package/contracts/crypto/signatures.d.ts +2 -0
- package/contracts/crypto/signatures.js +165 -0
- package/contracts/crypto/vector.d.ts +73 -0
- package/contracts/crypto/vector.js +93 -0
- package/contracts/crypto/vectors.d.ts +2 -0
- package/contracts/crypto/vectors.js +107 -0
- package/contracts/door/contract.d.ts +13 -0
- package/contracts/door/contract.js +94 -0
- package/contracts/door/index.d.ts +1 -0
- package/contracts/door/index.js +2 -0
- package/contracts/engine/contract.d.ts +2 -0
- package/contracts/engine/contract.js +251 -0
- package/contracts/engine/held.d.ts +3 -0
- package/contracts/engine/held.js +52 -0
- package/contracts/engine/index.d.ts +1 -0
- package/contracts/engine/index.js +2 -0
- package/contracts/engine/judge.d.ts +5 -0
- package/contracts/engine/judge.js +28 -0
- package/contracts/engine/sources.d.ts +17 -0
- package/contracts/engine/sources.js +67 -0
- package/contracts/index.d.ts +14 -0
- package/contracts/index.js +15 -0
- package/contracts/lobes/contract.d.ts +8 -0
- package/contracts/lobes/contract.js +186 -0
- package/contracts/lobes/index.d.ts +1 -0
- package/contracts/lobes/index.js +2 -0
- package/contracts/page-layer/contract.d.ts +2 -0
- package/contracts/page-layer/contract.js +218 -0
- package/contracts/page-layer/index.d.ts +1 -0
- package/contracts/page-layer/index.js +2 -0
- package/contracts/queues/contract.d.ts +2 -0
- package/contracts/queues/contract.js +281 -0
- package/contracts/queues/index.d.ts +1 -0
- package/contracts/queues/index.js +2 -0
- package/contracts/queues/steps.d.ts +11 -0
- package/contracts/queues/steps.js +68 -0
- package/contracts/run/contract.d.ts +2 -0
- package/contracts/run/contract.js +151 -0
- package/contracts/run/index.d.ts +1 -0
- package/contracts/run/index.js +2 -0
- package/contracts/run/sources.d.ts +6 -0
- package/contracts/run/sources.js +45 -0
- package/contracts/time/contract.d.ts +2 -0
- package/contracts/time/contract.js +113 -0
- package/contracts/time/index.d.ts +1 -0
- package/contracts/time/index.js +2 -0
- package/contracts/unlocker/contract.d.ts +2 -0
- package/contracts/unlocker/contract.js +25 -0
- package/contracts/unlocker/index.d.ts +1 -0
- package/contracts/unlocker/index.js +2 -0
- package/contracts/vitals/contract.d.ts +2 -0
- package/contracts/vitals/contract.js +50 -0
- package/contracts/vitals/index.d.ts +1 -0
- package/contracts/vitals/index.js +2 -0
- package/docs/authoring.md +1986 -0
- package/docs/changelog.md +17 -0
- package/docs/guide.md +429 -0
- package/engine/bytecode.d.ts +17 -0
- package/engine/bytecode.js +170 -0
- package/engine/context.d.ts +3 -0
- package/engine/context.js +271 -0
- package/engine/decoder.d.ts +10 -0
- package/engine/decoder.js +286 -0
- package/engine/engine.d.ts +21 -0
- package/engine/engine.js +271 -0
- package/engine/heap.d.ts +5 -0
- package/engine/heap.js +47 -0
- package/engine/held.d.ts +8 -0
- package/engine/held.js +32 -0
- package/engine/helpers.d.ts +27 -0
- package/engine/helpers.js +177 -0
- package/engine/host.d.ts +3 -0
- package/engine/host.js +78 -0
- package/engine/index.d.ts +1 -0
- package/engine/index.js +2 -0
- package/engine/loader.d.ts +6 -0
- package/engine/loader.js +72 -0
- package/engine/lock.d.ts +2 -0
- package/engine/lock.js +17 -0
- package/engine/state.d.ts +55 -0
- package/engine/state.js +107 -0
- package/engine/vendor/LICENSE +24 -0
- package/engine/vendor/emscripten-module.d.mts +5 -0
- package/engine/vendor/emscripten-module.mjs +2 -0
- package/engine/vendor/emscripten-module.wasm +0 -0
- package/engine/vendor/index.d.ts +1 -0
- package/engine/vendor/index.js +2 -0
- package/engine/watcher.d.ts +2 -0
- package/engine/watcher.js +4 -0
- package/engine/writer.d.ts +4 -0
- package/engine/writer.js +84 -0
- package/engine/written.d.ts +3 -0
- package/engine/written.js +86 -0
- package/evidence/index.d.ts +2 -0
- package/evidence/index.js +3 -0
- package/evidence/read.d.ts +42 -0
- package/evidence/read.js +210 -0
- package/evidence/replay.d.ts +17 -0
- package/evidence/replay.js +184 -0
- package/faculty/base/faculty.d.ts +24 -0
- package/faculty/base/faculty.js +300 -0
- package/faculty/base/host.d.ts +140 -0
- package/faculty/base/host.js +82 -0
- package/faculty/base/index.d.ts +6 -0
- package/faculty/base/index.js +29 -0
- package/faculty/base/objects.d.ts +82 -0
- package/faculty/base/objects.js +79 -0
- package/faculty/base/run.d.ts +63 -0
- package/faculty/base/run.js +52 -0
- package/faculty/base/source.d.ts +18 -0
- package/faculty/base/source.js +55 -0
- package/faculty/base/text.d.ts +1 -0
- package/faculty/base/text.js +3 -0
- package/faculty/index.d.ts +2 -0
- package/faculty/index.js +52 -0
- package/faculty/nervur-faculty.d.ts +28 -0
- package/faculty/published.d.ts +1 -0
- package/faculty/published.js +34 -0
- package/faculty/read/index.d.ts +1 -0
- package/faculty/read/index.js +15 -0
- package/faculty/read/read.d.ts +32 -0
- package/faculty/read/read.js +109 -0
- package/genome/backup/backup.d.ts +35 -0
- package/genome/backup/backup.js +278 -0
- package/genome/backup/file.d.ts +19 -0
- package/genome/backup/file.js +66 -0
- package/genome/backup/form.d.ts +11 -0
- package/genome/backup/form.js +339 -0
- package/genome/backup/held.d.ts +14 -0
- package/genome/backup/held.js +123 -0
- package/genome/backup/index.d.ts +6 -0
- package/genome/backup/index.js +29 -0
- package/genome/backup/kept.d.ts +117 -0
- package/genome/backup/kept.js +386 -0
- package/genome/backup/named.d.ts +6 -0
- package/genome/backup/named.js +70 -0
- package/genome/boot/anchor.d.ts +4 -0
- package/genome/boot/anchor.js +35 -0
- package/genome/boot/boot.d.ts +33 -0
- package/genome/boot/boot.js +223 -0
- package/genome/boot/channel.d.ts +11 -0
- package/genome/boot/channel.js +32 -0
- package/genome/boot/core.d.ts +17 -0
- package/genome/boot/core.js +80 -0
- package/genome/boot/given.d.ts +15 -0
- package/genome/boot/given.js +59 -0
- package/genome/boot/index.d.ts +5 -0
- package/genome/boot/index.js +6 -0
- package/genome/boot/invitation.d.ts +9 -0
- package/genome/boot/invitation.js +40 -0
- package/genome/boot/moved.d.ts +17 -0
- package/genome/boot/moved.js +133 -0
- package/genome/boot/organs.d.ts +8 -0
- package/genome/boot/organs.js +62 -0
- package/genome/boot/present.d.ts +34 -0
- package/genome/boot/present.js +136 -0
- package/genome/boot/renew.d.ts +13 -0
- package/genome/boot/renew.js +24 -0
- package/genome/boot/shelf.d.ts +16 -0
- package/genome/boot/shelf.js +60 -0
- package/genome/boot/skin.d.ts +14 -0
- package/genome/boot/skin.js +66 -0
- package/genome/brain/accept.d.ts +12 -0
- package/genome/brain/accept.js +120 -0
- package/genome/brain/addresses.d.ts +4 -0
- package/genome/brain/addresses.js +32 -0
- package/genome/brain/anchor.d.ts +22 -0
- package/genome/brain/anchor.js +155 -0
- package/genome/brain/askers.d.ts +5 -0
- package/genome/brain/askers.js +25 -0
- package/genome/brain/assets-method.d.ts +3 -0
- package/genome/brain/assets-method.js +28 -0
- package/genome/brain/assets.d.ts +4 -0
- package/genome/brain/assets.js +61 -0
- package/genome/brain/blueprint.d.ts +5 -0
- package/genome/brain/blueprint.js +528 -0
- package/genome/brain/brain.d.ts +19 -0
- package/genome/brain/brain.js +291 -0
- package/genome/brain/cede.d.ts +7 -0
- package/genome/brain/cede.js +179 -0
- package/genome/brain/changes.d.ts +23 -0
- package/genome/brain/changes.js +91 -0
- package/genome/brain/character.d.ts +8 -0
- package/genome/brain/character.js +55 -0
- package/genome/brain/children.d.ts +7 -0
- package/genome/brain/children.js +37 -0
- package/genome/brain/clock.d.ts +18 -0
- package/genome/brain/clock.js +91 -0
- package/genome/brain/ended.d.ts +3 -0
- package/genome/brain/ended.js +21 -0
- package/genome/brain/ends.d.ts +9 -0
- package/genome/brain/ends.js +109 -0
- package/genome/brain/expiry.d.ts +21 -0
- package/genome/brain/expiry.js +87 -0
- package/genome/brain/faculties.d.ts +16 -0
- package/genome/brain/faculties.js +88 -0
- package/genome/brain/far.d.ts +53 -0
- package/genome/brain/far.js +330 -0
- package/genome/brain/fields.d.ts +1 -0
- package/genome/brain/fields.js +5 -0
- package/genome/brain/genome.d.ts +8 -0
- package/genome/brain/genome.js +46 -0
- package/genome/brain/given.d.ts +4 -0
- package/genome/brain/given.js +15 -0
- package/genome/brain/granting.d.ts +23 -0
- package/genome/brain/granting.js +98 -0
- package/genome/brain/grants.d.ts +20 -0
- package/genome/brain/grants.js +70 -0
- package/genome/brain/guide.d.ts +2 -0
- package/genome/brain/guide.js +5 -0
- package/genome/brain/holds.d.ts +48 -0
- package/genome/brain/holds.js +197 -0
- package/genome/brain/index.d.ts +34 -0
- package/genome/brain/index.js +35 -0
- package/genome/brain/invitations.d.ts +6 -0
- package/genome/brain/invitations.js +80 -0
- package/genome/brain/kept.d.ts +32 -0
- package/genome/brain/kept.js +189 -0
- package/genome/brain/kit.d.ts +85 -0
- package/genome/brain/kit.js +101 -0
- package/genome/brain/landing.d.ts +6 -0
- package/genome/brain/landing.js +45 -0
- package/genome/brain/lapses.d.ts +8 -0
- package/genome/brain/lapses.js +53 -0
- package/genome/brain/letters.d.ts +8 -0
- package/genome/brain/letters.js +67 -0
- package/genome/brain/life.d.ts +24 -0
- package/genome/brain/life.js +205 -0
- package/genome/brain/limits.d.ts +14 -0
- package/genome/brain/limits.js +159 -0
- package/genome/brain/lined.d.ts +23 -0
- package/genome/brain/lined.js +90 -0
- package/genome/brain/marks.d.ts +22 -0
- package/genome/brain/marks.js +47 -0
- package/genome/brain/methods.d.ts +7 -0
- package/genome/brain/methods.js +243 -0
- package/genome/brain/mouth.d.ts +38 -0
- package/genome/brain/mouth.js +302 -0
- package/genome/brain/moves.d.ts +14 -0
- package/genome/brain/moves.js +81 -0
- package/genome/brain/nerves.d.ts +12 -0
- package/genome/brain/nerves.js +267 -0
- package/genome/brain/next.d.ts +6 -0
- package/genome/brain/next.js +25 -0
- package/genome/brain/notes.d.ts +9 -0
- package/genome/brain/notes.js +73 -0
- package/genome/brain/occupants.d.ts +7 -0
- package/genome/brain/occupants.js +79 -0
- package/genome/brain/old.d.ts +4 -0
- package/genome/brain/old.js +44 -0
- package/genome/brain/organ.d.ts +42 -0
- package/genome/brain/organ.js +248 -0
- package/genome/brain/organs.d.ts +28 -0
- package/genome/brain/organs.js +100 -0
- package/genome/brain/owed.d.ts +30 -0
- package/genome/brain/owed.js +58 -0
- package/genome/brain/owners.d.ts +15 -0
- package/genome/brain/owners.js +112 -0
- package/genome/brain/paged.d.ts +10 -0
- package/genome/brain/paged.js +26 -0
- package/genome/brain/pieces.d.ts +15 -0
- package/genome/brain/pieces.js +74 -0
- package/genome/brain/presence.d.ts +14 -0
- package/genome/brain/presence.js +111 -0
- package/genome/brain/reclaim.d.ts +7 -0
- package/genome/brain/reclaim.js +28 -0
- package/genome/brain/recovery.d.ts +34 -0
- package/genome/brain/recovery.js +165 -0
- package/genome/brain/reference-methods.d.ts +4 -0
- package/genome/brain/reference-methods.js +62 -0
- package/genome/brain/references.d.ts +22 -0
- package/genome/brain/references.js +128 -0
- package/genome/brain/reflex.d.ts +19 -0
- package/genome/brain/reflex.js +64 -0
- package/genome/brain/relations.d.ts +61 -0
- package/genome/brain/relations.js +320 -0
- package/genome/brain/road.d.ts +3 -0
- package/genome/brain/road.js +30 -0
- package/genome/brain/roll.d.ts +27 -0
- package/genome/brain/roll.js +144 -0
- package/genome/brain/schemas.d.ts +23 -0
- package/genome/brain/schemas.js +296 -0
- package/genome/brain/silence.d.ts +9 -0
- package/genome/brain/silence.js +30 -0
- package/genome/brain/space.d.ts +17 -0
- package/genome/brain/space.js +70 -0
- package/genome/brain/standing-methods.d.ts +4 -0
- package/genome/brain/standing-methods.js +78 -0
- package/genome/brain/standings.d.ts +57 -0
- package/genome/brain/standings.js +161 -0
- package/genome/brain/state.d.ts +66 -0
- package/genome/brain/state.js +322 -0
- package/genome/brain/still.d.ts +33 -0
- package/genome/brain/still.js +84 -0
- package/genome/brain/switch.d.ts +6 -0
- package/genome/brain/switch.js +24 -0
- package/genome/brain/tear.d.ts +14 -0
- package/genome/brain/tear.js +114 -0
- package/genome/brain/toward.d.ts +3 -0
- package/genome/brain/toward.js +21 -0
- package/genome/brain/upgrade.d.ts +3 -0
- package/genome/brain/upgrade.js +18 -0
- package/genome/brain/uses.d.ts +12 -0
- package/genome/brain/uses.js +62 -0
- package/genome/brain/version.d.ts +33 -0
- package/genome/brain/version.js +405 -0
- package/genome/brain/waiting.d.ts +3 -0
- package/genome/brain/waiting.js +27 -0
- package/genome/brain/wake.d.ts +26 -0
- package/genome/brain/wake.js +112 -0
- package/genome/brain/warded.d.ts +7 -0
- package/genome/brain/warded.js +67 -0
- package/genome/brain/wards.d.ts +14 -0
- package/genome/brain/wards.js +52 -0
- package/genome/brain/whole.d.ts +3 -0
- package/genome/brain/whole.js +136 -0
- package/genome/bridge/again.d.ts +9 -0
- package/genome/bridge/again.js +111 -0
- package/genome/bridge/carried.d.ts +10 -0
- package/genome/bridge/carried.js +165 -0
- package/genome/bridge/frames.d.ts +3 -0
- package/genome/bridge/frames.js +7 -0
- package/genome/bridge/gear.d.ts +19 -0
- package/genome/bridge/gear.js +26 -0
- package/genome/bridge/half.d.ts +12 -0
- package/genome/bridge/half.js +144 -0
- package/genome/bridge/index.d.ts +4 -0
- package/genome/bridge/index.js +5 -0
- package/genome/cache/cache.d.ts +20 -0
- package/genome/cache/cache.js +213 -0
- package/genome/cache/index.d.ts +3 -0
- package/genome/cache/index.js +4 -0
- package/genome/cache/snapshot.d.ts +17 -0
- package/genome/cache/snapshot.js +164 -0
- package/genome/cache/spaces.d.ts +14 -0
- package/genome/cache/spaces.js +91 -0
- package/genome/cage/index.d.ts +2 -0
- package/genome/cage/index.js +3 -0
- package/genome/cage/output.d.ts +3 -0
- package/genome/cage/output.js +75 -0
- package/genome/cage/reader.d.ts +10 -0
- package/genome/cage/reader.js +65 -0
- package/genome/cage/runner.d.ts +5 -0
- package/genome/cage/runner.js +157 -0
- package/genome/carry/apart.d.ts +24 -0
- package/genome/carry/apart.js +170 -0
- package/genome/carry/before.d.ts +22 -0
- package/genome/carry/before.js +86 -0
- package/genome/carry/carry.d.ts +6 -0
- package/genome/carry/carry.js +447 -0
- package/genome/carry/count.d.ts +72 -0
- package/genome/carry/count.js +142 -0
- package/genome/carry/dead.d.ts +17 -0
- package/genome/carry/dead.js +53 -0
- package/genome/carry/disconnect.d.ts +3 -0
- package/genome/carry/disconnect.js +21 -0
- package/genome/carry/durable.d.ts +36 -0
- package/genome/carry/durable.js +148 -0
- package/genome/carry/flight.d.ts +50 -0
- package/genome/carry/flight.js +338 -0
- package/genome/carry/flush.d.ts +12 -0
- package/genome/carry/flush.js +37 -0
- package/genome/carry/gear.d.ts +91 -0
- package/genome/carry/gear.js +164 -0
- package/genome/carry/held.d.ts +66 -0
- package/genome/carry/held.js +174 -0
- package/genome/carry/index.d.ts +15 -0
- package/genome/carry/index.js +38 -0
- package/genome/carry/letters.d.ts +31 -0
- package/genome/carry/letters.js +222 -0
- package/genome/carry/moving.d.ts +21 -0
- package/genome/carry/moving.js +179 -0
- package/genome/carry/organ.d.ts +25 -0
- package/genome/carry/organ.js +97 -0
- package/genome/carry/read.d.ts +4 -0
- package/genome/carry/read.js +24 -0
- package/genome/carry/ready.d.ts +26 -0
- package/genome/carry/ready.js +78 -0
- package/genome/carry/run.d.ts +22 -0
- package/genome/carry/run.js +146 -0
- package/genome/carry/shown.d.ts +4 -0
- package/genome/carry/shown.js +66 -0
- package/genome/carry/sick.d.ts +5 -0
- package/genome/carry/sick.js +37 -0
- package/genome/carry/span.d.ts +1 -0
- package/genome/carry/span.js +3 -0
- package/genome/carry/stamp.d.ts +3 -0
- package/genome/carry/stamp.js +19 -0
- package/genome/carry/standing.d.ts +7 -0
- package/genome/carry/standing.js +37 -0
- package/genome/carry/status.d.ts +12 -0
- package/genome/carry/status.js +36 -0
- package/genome/carry/still.d.ts +29 -0
- package/genome/carry/still.js +76 -0
- package/genome/carry/trace.d.ts +8 -0
- package/genome/carry/trace.js +24 -0
- package/genome/carry/waits.d.ts +20 -0
- package/genome/carry/waits.js +138 -0
- package/genome/carry/wire.d.ts +23 -0
- package/genome/carry/wire.js +47 -0
- package/genome/carry/words.d.ts +1 -0
- package/genome/carry/words.js +3 -0
- package/genome/carry/zero.d.ts +6 -0
- package/genome/carry/zero.js +27 -0
- package/genome/cells/digest.d.ts +8 -0
- package/genome/cells/digest.js +86 -0
- package/genome/cells/index.d.ts +2 -0
- package/genome/cells/index.js +15 -0
- package/genome/cells/rows.d.ts +18 -0
- package/genome/cells/rows.js +63 -0
- package/genome/cells/sum.d.ts +6 -0
- package/genome/cells/sum.js +35 -0
- package/genome/commits/commits.d.ts +20 -0
- package/genome/commits/commits.js +77 -0
- package/genome/commits/index.d.ts +1 -0
- package/genome/commits/index.js +2 -0
- package/genome/configuration/configuration.d.ts +2 -0
- package/genome/configuration/configuration.js +98 -0
- package/genome/configuration/index.d.ts +1 -0
- package/genome/configuration/index.js +2 -0
- package/genome/defaults/index.d.ts +4 -0
- package/genome/defaults/index.js +12 -0
- package/genome/entry/entry.d.ts +4 -0
- package/genome/entry/entry.js +27 -0
- package/genome/entry/halves.d.ts +6 -0
- package/genome/entry/halves.js +52 -0
- package/genome/entry/index.d.ts +2 -0
- package/genome/entry/index.js +3 -0
- package/genome/faculties/defaults/index.d.ts +5 -0
- package/genome/faculties/defaults/index.js +11 -0
- package/genome/faculties/ear/blueprint.d.ts +2 -0
- package/genome/faculties/ear/blueprint.js +254 -0
- package/genome/faculties/ear/ear.d.ts +18 -0
- package/genome/faculties/ear/ear.js +775 -0
- package/genome/faculties/ear/index.d.ts +2 -0
- package/genome/faculties/ear/index.js +3 -0
- package/genome/faculties/ear/source.d.ts +1 -0
- package/genome/faculties/ear/source.js +5 -0
- package/genome/faculties/ear/text.d.ts +1 -0
- package/genome/faculties/ear/text.js +3 -0
- package/genome/faculties/library/blueprint.d.ts +2 -0
- package/genome/faculties/library/blueprint.js +271 -0
- package/genome/faculties/library/index.d.ts +4 -0
- package/genome/faculties/library/index.js +5 -0
- package/genome/faculties/library/library.d.ts +26 -0
- package/genome/faculties/library/library.js +1227 -0
- package/genome/faculties/library/shelf.d.ts +15 -0
- package/genome/faculties/library/shelf.js +20 -0
- package/genome/faculties/library/source.d.ts +1 -0
- package/genome/faculties/library/source.js +5 -0
- package/genome/faculties/library/text.d.ts +1 -0
- package/genome/faculties/library/text.js +3 -0
- package/genome/faculties/mouth/blueprint.d.ts +2 -0
- package/genome/faculties/mouth/blueprint.js +171 -0
- package/genome/faculties/mouth/index.d.ts +2 -0
- package/genome/faculties/mouth/index.js +3 -0
- package/genome/faculties/mouth/mouth.d.ts +16 -0
- package/genome/faculties/mouth/mouth.js +543 -0
- package/genome/faculties/mouth/source.d.ts +1 -0
- package/genome/faculties/mouth/source.js +5 -0
- package/genome/faculties/mouth/text.d.ts +1 -0
- package/genome/faculties/mouth/text.js +3 -0
- package/genome/faculties/scheduler/blueprint.d.ts +2 -0
- package/genome/faculties/scheduler/blueprint.js +92 -0
- package/genome/faculties/scheduler/index.d.ts +2 -0
- package/genome/faculties/scheduler/index.js +3 -0
- package/genome/faculties/scheduler/scheduler.d.ts +13 -0
- package/genome/faculties/scheduler/scheduler.js +253 -0
- package/genome/faculties/scheduler/source.d.ts +1 -0
- package/genome/faculties/scheduler/source.js +5 -0
- package/genome/faculties/scheduler/text.d.ts +1 -0
- package/genome/faculties/scheduler/text.js +3 -0
- package/genome/header/file.d.ts +33 -0
- package/genome/header/file.js +121 -0
- package/genome/header/header.d.ts +11 -0
- package/genome/header/header.js +86 -0
- package/genome/header/index.d.ts +2 -0
- package/genome/header/index.js +19 -0
- package/genome/ids/ids.d.ts +11 -0
- package/genome/ids/ids.js +23 -0
- package/genome/ids/index.d.ts +1 -0
- package/genome/ids/index.js +2 -0
- package/genome/index.d.ts +11 -0
- package/genome/index.js +32 -0
- package/genome/key/arrivals.d.ts +7 -0
- package/genome/key/arrivals.js +148 -0
- package/genome/key/asks.d.ts +7 -0
- package/genome/key/asks.js +92 -0
- package/genome/key/blueprint.d.ts +3 -0
- package/genome/key/blueprint.js +149 -0
- package/genome/key/door.d.ts +12 -0
- package/genome/key/door.js +94 -0
- package/genome/key/forms.d.ts +11 -0
- package/genome/key/forms.js +45 -0
- package/genome/key/handed.d.ts +7 -0
- package/genome/key/handed.js +81 -0
- package/genome/key/index.d.ts +9 -0
- package/genome/key/index.js +18 -0
- package/genome/key/key.d.ts +9 -0
- package/genome/key/key.js +34 -0
- package/genome/key/kit.d.ts +27 -0
- package/genome/key/kit.js +85 -0
- package/genome/key/records.d.ts +12 -0
- package/genome/key/records.js +70 -0
- package/genome/key/row.d.ts +4 -0
- package/genome/key/row.js +22 -0
- package/genome/key/shapes.d.ts +54 -0
- package/genome/key/shapes.js +160 -0
- package/genome/key/standing.d.ts +19 -0
- package/genome/key/standing.js +108 -0
- package/genome/log/frame.d.ts +11 -0
- package/genome/log/frame.js +40 -0
- package/genome/log/index.d.ts +3 -0
- package/genome/log/index.js +12 -0
- package/genome/log/open.d.ts +31 -0
- package/genome/log/open.js +243 -0
- package/genome/log/pairs.d.ts +8 -0
- package/genome/log/pairs.js +187 -0
- package/genome/log/record.d.ts +8 -0
- package/genome/log/record.js +72 -0
- package/genome/log/store.d.ts +31 -0
- package/genome/log/store.js +291 -0
- package/genome/map/declare.d.ts +4 -0
- package/genome/map/declare.js +52 -0
- package/genome/map/handler.d.ts +4 -0
- package/genome/map/handler.js +37 -0
- package/genome/map/index.d.ts +8 -0
- package/genome/map/index.js +9 -0
- package/genome/map/kin.d.ts +12 -0
- package/genome/map/kin.js +63 -0
- package/genome/map/map.d.ts +40 -0
- package/genome/map/map.js +217 -0
- package/genome/map/nodes.d.ts +9 -0
- package/genome/map/nodes.js +35 -0
- package/genome/map/off.d.ts +3 -0
- package/genome/map/off.js +10 -0
- package/genome/map/order.d.ts +9 -0
- package/genome/map/order.js +105 -0
- package/genome/map/read.d.ts +4 -0
- package/genome/map/read.js +32 -0
- package/genome/map/remove.d.ts +3 -0
- package/genome/map/remove.js +30 -0
- package/genome/map/rows.d.ts +48 -0
- package/genome/map/rows.js +146 -0
- package/genome/map/skin.d.ts +10 -0
- package/genome/map/skin.js +35 -0
- package/genome/map/stands.d.ts +5 -0
- package/genome/map/stands.js +17 -0
- package/genome/map/unwired.d.ts +7 -0
- package/genome/map/unwired.js +36 -0
- package/genome/map/wires.d.ts +9 -0
- package/genome/map/wires.js +103 -0
- package/genome/network/blueprint.d.ts +4 -0
- package/genome/network/blueprint.js +111 -0
- package/genome/network/index.d.ts +3 -0
- package/genome/network/index.js +4 -0
- package/genome/network/network.d.ts +18 -0
- package/genome/network/network.js +248 -0
- package/genome/network/sent.d.ts +4 -0
- package/genome/network/sent.js +225 -0
- package/genome/network/served.d.ts +4 -0
- package/genome/network/served.js +162 -0
- package/genome/network/still.d.ts +26 -0
- package/genome/network/still.js +46 -0
- package/genome/network/web.d.ts +59 -0
- package/genome/network/web.js +74 -0
- package/genome/organism/body.d.ts +53 -0
- package/genome/organism/body.js +256 -0
- package/genome/organism/halves.d.ts +22 -0
- package/genome/organism/halves.js +181 -0
- package/genome/organism/index.d.ts +5 -0
- package/genome/organism/index.js +6 -0
- package/genome/organism/made.d.ts +73 -0
- package/genome/organism/made.js +416 -0
- package/genome/organism/organism.d.ts +9 -0
- package/genome/organism/organism.js +203 -0
- package/genome/organism/reclaim.d.ts +10 -0
- package/genome/organism/reclaim.js +41 -0
- package/genome/organism/still.d.ts +12 -0
- package/genome/organism/still.js +38 -0
- package/genome/organism/thaw.d.ts +10 -0
- package/genome/organism/thaw.js +23 -0
- package/genome/organism/told.d.ts +10 -0
- package/genome/organism/told.js +140 -0
- package/genome/pages/codes.d.ts +13 -0
- package/genome/pages/codes.js +16 -0
- package/genome/pages/file.d.ts +23 -0
- package/genome/pages/file.js +174 -0
- package/genome/pages/index.d.ts +2 -0
- package/genome/pages/index.js +3 -0
- package/genome/pages/vfs.d.ts +13 -0
- package/genome/pages/vfs.js +186 -0
- package/genome/presence/index.d.ts +1 -0
- package/genome/presence/index.js +2 -0
- package/genome/presence/organs.d.ts +8 -0
- package/genome/presence/organs.js +13 -0
- package/genome/pure/entry.d.ts +16 -0
- package/genome/pure/entry.js +76 -0
- package/genome/pure/frozen.d.ts +9 -0
- package/genome/pure/frozen.js +273 -0
- package/genome/pure/halves.d.ts +8 -0
- package/genome/pure/halves.js +63 -0
- package/genome/pure/index.d.ts +7 -0
- package/genome/pure/index.js +8 -0
- package/genome/queues/index.d.ts +1 -0
- package/genome/queues/index.js +2 -0
- package/genome/queues/queues.d.ts +2 -0
- package/genome/queues/queues.js +210 -0
- package/genome/self/blueprint.d.ts +5 -0
- package/genome/self/blueprint.js +36 -0
- package/genome/self/index.d.ts +2 -0
- package/genome/self/index.js +3 -0
- package/genome/self/self.d.ts +9 -0
- package/genome/self/self.js +49 -0
- package/genome/sqlite/database.d.ts +24 -0
- package/genome/sqlite/database.js +243 -0
- package/genome/sqlite/decoder.d.ts +10 -0
- package/genome/sqlite/decoder.js +92 -0
- package/genome/sqlite/imports.d.ts +9 -0
- package/genome/sqlite/imports.js +93 -0
- package/genome/sqlite/index.d.ts +6 -0
- package/genome/sqlite/index.js +7 -0
- package/genome/sqlite/memory.d.ts +14 -0
- package/genome/sqlite/memory.js +79 -0
- package/genome/sqlite/sqlite.d.ts +30 -0
- package/genome/sqlite/sqlite.js +77 -0
- package/genome/sqlite/table.d.ts +8 -0
- package/genome/sqlite/table.js +66 -0
- package/genome/sqlite/vendor/LICENSE +21 -0
- package/genome/sqlite/vendor/sqlite3.wasm +0 -0
- package/genome/store/held.d.ts +2 -0
- package/genome/store/held.js +41 -0
- package/genome/store/index.d.ts +6 -0
- package/genome/store/index.js +16 -0
- package/genome/store/landing.d.ts +6 -0
- package/genome/store/landing.js +50 -0
- package/genome/store/open.d.ts +38 -0
- package/genome/store/open.js +308 -0
- package/genome/store/outside.d.ts +30 -0
- package/genome/store/outside.js +165 -0
- package/genome/store/reading.d.ts +2 -0
- package/genome/store/reading.js +121 -0
- package/genome/store/rescue.d.ts +15 -0
- package/genome/store/rescue.js +168 -0
- package/genome/store/salvage.d.ts +18 -0
- package/genome/store/salvage.js +158 -0
- package/genome/store/schema.d.ts +17 -0
- package/genome/store/schema.js +77 -0
- package/genome/store/store.d.ts +54 -0
- package/genome/store/store.js +534 -0
- package/genome/store/unwritten.d.ts +2 -0
- package/genome/store/unwritten.js +57 -0
- package/genome/store/witness.d.ts +18 -0
- package/genome/store/witness.js +87 -0
- package/genome/timer/index.d.ts +1 -0
- package/genome/timer/index.js +2 -0
- package/genome/timer/timer.d.ts +10 -0
- package/genome/timer/timer.js +167 -0
- package/kit/brain/organs.d.ts +6 -0
- package/kit/brain/organs.js +33 -0
- package/kit/brain/rig.d.ts +58 -0
- package/kit/brain/rig.js +259 -0
- package/kit/brain/shelf.d.ts +3 -0
- package/kit/brain/shelf.js +42 -0
- package/kit/core/answers.d.ts +7 -0
- package/kit/core/answers.js +23 -0
- package/kit/core/chance.d.ts +4 -0
- package/kit/core/chance.js +18 -0
- package/kit/core/clock.d.ts +8 -0
- package/kit/core/clock.js +39 -0
- package/kit/core/configuration.d.ts +2 -0
- package/kit/core/configuration.js +17 -0
- package/kit/core/data.d.ts +3 -0
- package/kit/core/data.js +41 -0
- package/kit/core/foundation.d.ts +30 -0
- package/kit/core/foundation.js +139 -0
- package/kit/core/held.d.ts +11 -0
- package/kit/core/held.js +82 -0
- package/kit/core/index.d.ts +10 -0
- package/kit/core/index.js +26 -0
- package/kit/core/puppets.d.ts +8 -0
- package/kit/core/puppets.js +17 -0
- package/kit/core/stamp.d.ts +2 -0
- package/kit/core/stamp.js +10 -0
- package/kit/core/wasm.d.ts +3 -0
- package/kit/core/wasm.js +11 -0
- package/kit/faculty/base/rig.d.ts +22 -0
- package/kit/faculty/base/rig.js +97 -0
- package/kit/index.d.ts +11 -0
- package/kit/index.js +22 -0
- package/kit/organism/bakery.d.ts +31 -0
- package/kit/organism/bakery.js +223 -0
- package/kit/organism/carriers.d.ts +25 -0
- package/kit/organism/carriers.js +93 -0
- package/kit/organism/forms.d.ts +10 -0
- package/kit/organism/forms.js +31 -0
- package/kit/organism/heard.d.ts +4 -0
- package/kit/organism/heard.js +42 -0
- package/kit/organism/laid.d.ts +8 -0
- package/kit/organism/laid.js +32 -0
- package/kit/organism/link.d.ts +14 -0
- package/kit/organism/link.js +130 -0
- package/kit/organism/notes.d.ts +2 -0
- package/kit/organism/notes.js +45 -0
- package/kit/organism/peer.d.ts +7 -0
- package/kit/organism/peer.js +34 -0
- package/kit/organism/rig.d.ts +59 -0
- package/kit/organism/rig.js +252 -0
- package/kit/organism/vitals.d.ts +9 -0
- package/kit/organism/vitals.js +44 -0
- package/kit/pages/index.d.ts +1 -0
- package/kit/pages/index.js +2 -0
- package/kit/pages/memory.d.ts +23 -0
- package/kit/pages/memory.js +264 -0
- package/kit/presence/console-half.d.ts +6 -0
- package/kit/presence/console-half.js +27 -0
- package/kit/presence/home.d.ts +33 -0
- package/kit/presence/home.js +192 -0
- package/kit/presence/pipe.d.ts +15 -0
- package/kit/presence/pipe.js +66 -0
- package/kit/presence/screen-half.d.ts +16 -0
- package/kit/presence/screen-half.js +180 -0
- package/kit/presence/skins.d.ts +17 -0
- package/kit/presence/skins.js +99 -0
- package/kit/puppet/boundary.d.ts +11 -0
- package/kit/puppet/boundary.js +103 -0
- package/kit/puppet/class.d.ts +3 -0
- package/kit/puppet/class.js +56 -0
- package/kit/puppet/defaults.d.ts +2 -0
- package/kit/puppet/defaults.js +14 -0
- package/kit/puppet/engine.d.ts +3 -0
- package/kit/puppet/engine.js +50 -0
- package/kit/puppet/index.d.ts +3 -0
- package/kit/puppet/index.js +4 -0
- package/kit/puppet/puppet.d.ts +41 -0
- package/kit/puppet/puppet.js +229 -0
- package/package.json +114 -4
- package/quo/box/box.d.ts +34 -0
- package/quo/box/box.js +137 -0
- package/quo/box/index.d.ts +4 -0
- package/quo/box/index.js +5 -0
- package/quo/box/reply.d.ts +12 -0
- package/quo/box/reply.js +64 -0
- package/quo/box/room.d.ts +3 -0
- package/quo/box/room.js +27 -0
- package/quo/box/sizes.d.ts +7 -0
- package/quo/box/sizes.js +10 -0
- package/quo/crypto/ed25519.d.ts +1 -0
- package/quo/crypto/ed25519.js +44 -0
- package/quo/crypto/index.d.ts +1 -0
- package/quo/crypto/index.js +2 -0
- package/quo/crypto/noble.d.ts +2 -0
- package/quo/crypto/noble.js +46 -0
- package/quo/door/door.d.ts +36 -0
- package/quo/door/door.js +207 -0
- package/quo/door/index.d.ts +2 -0
- package/quo/door/index.js +3 -0
- package/quo/door/occupant.d.ts +17 -0
- package/quo/door/occupant.js +55 -0
- package/quo/door/payload.d.ts +9 -0
- package/quo/door/payload.js +67 -0
- package/quo/frame/frame.d.ts +23 -0
- package/quo/frame/frame.js +160 -0
- package/quo/frame/index.d.ts +1 -0
- package/quo/frame/index.js +2 -0
- package/quo/index.d.ts +7 -0
- package/quo/index.js +55 -0
- package/quo/published.d.ts +1 -0
- package/quo/published.js +51 -0
- package/quo/standing/index.d.ts +3 -0
- package/quo/standing/index.js +4 -0
- package/quo/standing/once.d.ts +14 -0
- package/quo/standing/once.js +66 -0
- package/quo/standing/reading.d.ts +28 -0
- package/quo/standing/reading.js +99 -0
- package/quo/standing/standing.d.ts +44 -0
- package/quo/standing/standing.js +235 -0
- package/quo/value/address.d.ts +2 -0
- package/quo/value/address.js +89 -0
- package/quo/value/fields.d.ts +2 -0
- package/quo/value/fields.js +14 -0
- package/quo/value/index.d.ts +3 -0
- package/quo/value/index.js +4 -0
- package/quo/value/json.d.ts +16 -0
- package/quo/value/json.js +194 -0
- package/quo/ward/index.d.ts +6 -0
- package/quo/ward/index.js +19 -0
- package/quo/ward/invitation.d.ts +16 -0
- package/quo/ward/invitation.js +100 -0
- package/quo/ward/link.d.ts +38 -0
- package/quo/ward/link.js +94 -0
- package/quo/ward/lock.d.ts +1 -0
- package/quo/ward/lock.js +17 -0
- package/quo/ward/qr.d.ts +5 -0
- package/quo/ward/qr.js +279 -0
- package/quo/ward/vouch.d.ts +5 -0
- package/quo/ward/vouch.js +33 -0
- package/quo/ward/ward.d.ts +19 -0
- package/quo/ward/ward.js +63 -0
- package/screen/access.d.ts +32 -0
- package/screen/access.js +40 -0
- package/screen/compose.d.ts +14 -0
- package/screen/compose.js +137 -0
- package/screen/diff.d.ts +19 -0
- package/screen/diff.js +152 -0
- package/screen/digest.d.ts +1 -0
- package/screen/digest.js +60 -0
- package/screen/drawn.d.ts +35 -0
- package/screen/drawn.js +89 -0
- package/screen/fill.d.ts +12 -0
- package/screen/fill.js +91 -0
- package/screen/hydrate.d.ts +14 -0
- package/screen/hydrate.js +67 -0
- package/screen/index.d.ts +15 -0
- package/screen/index.js +26 -0
- package/screen/laid.d.ts +29 -0
- package/screen/laid.js +157 -0
- package/screen/match.d.ts +13 -0
- package/screen/match.js +63 -0
- package/screen/motion.d.ts +18 -0
- package/screen/motion.js +65 -0
- package/screen/press.d.ts +12 -0
- package/screen/press.js +63 -0
- package/screen/region.d.ts +6 -0
- package/screen/region.js +23 -0
- package/screen/route.d.ts +13 -0
- package/screen/route.js +74 -0
- package/screen/screen.d.ts +15 -0
- package/screen/screen.js +55 -0
- package/screen/sheet.d.ts +20 -0
- package/screen/sheet.js +145 -0
- package/screen/told.d.ts +14 -0
- package/screen/told.js +38 -0
- package/seams/bridge/bridge.d.ts +26 -0
- package/seams/bridge/bridge.js +31 -0
- package/seams/bridge/in-process.d.ts +13 -0
- package/seams/bridge/in-process.js +112 -0
- package/seams/bridge/index.d.ts +2 -0
- package/seams/bridge/index.js +3 -0
- package/seams/carriers/carriers.d.ts +112 -0
- package/seams/carriers/carriers.js +315 -0
- package/seams/carriers/index.d.ts +2 -0
- package/seams/carriers/index.js +29 -0
- package/seams/carriers/proof.d.ts +13 -0
- package/seams/carriers/proof.js +45 -0
- package/seams/chance/chance.d.ts +6 -0
- package/seams/chance/chance.js +8 -0
- package/seams/chance/index.d.ts +1 -0
- package/seams/chance/index.js +2 -0
- package/seams/codec/codec.d.ts +12 -0
- package/seams/codec/codec.js +9 -0
- package/seams/codec/index.d.ts +1 -0
- package/seams/codec/index.js +2 -0
- package/seams/contract/bytes.d.ts +1 -0
- package/seams/contract/bytes.js +4 -0
- package/seams/contract/contract.d.ts +10 -0
- package/seams/contract/contract.js +26 -0
- package/seams/contract/index.d.ts +2 -0
- package/seams/contract/index.js +3 -0
- package/seams/crypto/crypto.d.ts +29 -0
- package/seams/crypto/crypto.js +30 -0
- package/seams/crypto/index.d.ts +1 -0
- package/seams/crypto/index.js +2 -0
- package/seams/engine/engine.d.ts +44 -0
- package/seams/engine/engine.js +55 -0
- package/seams/engine/index.d.ts +1 -0
- package/seams/engine/index.js +2 -0
- package/seams/entry/configuration.d.ts +74 -0
- package/seams/entry/configuration.js +81 -0
- package/seams/entry/entry.d.ts +124 -0
- package/seams/entry/entry.js +144 -0
- package/seams/entry/index.d.ts +2 -0
- package/seams/entry/index.js +24 -0
- package/seams/index.d.ts +16 -0
- package/seams/index.js +86 -0
- package/seams/page-layer/index.d.ts +1 -0
- package/seams/page-layer/index.js +2 -0
- package/seams/page-layer/page-layer.d.ts +32 -0
- package/seams/page-layer/page-layer.js +29 -0
- package/seams/published.d.ts +1 -0
- package/seams/published.js +85 -0
- package/seams/queues/index.d.ts +2 -0
- package/seams/queues/index.js +3 -0
- package/seams/queues/queues.d.ts +36 -0
- package/seams/queues/queues.js +50 -0
- package/seams/run/index.d.ts +1 -0
- package/seams/run/index.js +2 -0
- package/seams/run/run.d.ts +7 -0
- package/seams/run/run.js +8 -0
- package/seams/time/index.d.ts +1 -0
- package/seams/time/index.js +2 -0
- package/seams/time/time.d.ts +10 -0
- package/seams/time/time.js +14 -0
- package/seams/unlocker/index.d.ts +1 -0
- package/seams/unlocker/index.js +2 -0
- package/seams/unlocker/unlocker.d.ts +17 -0
- package/seams/unlocker/unlocker.js +15 -0
- package/seams/vitals/index.d.ts +1 -0
- package/seams/vitals/index.js +2 -0
- package/seams/vitals/vitals.d.ts +24 -0
- package/seams/vitals/vitals.js +19 -0
- package/seams/webassembly.d.ts +36 -0
- package/standard/answer/answer.d.ts +16 -0
- package/standard/answer/answer.js +38 -0
- package/standard/answer/index.d.ts +1 -0
- package/standard/answer/index.js +2 -0
- package/standard/blueprint/blueprint.d.ts +21 -0
- package/standard/blueprint/blueprint.js +123 -0
- package/standard/blueprint/index.d.ts +2 -0
- package/standard/blueprint/index.js +3 -0
- package/standard/blueprint/method.d.ts +21 -0
- package/standard/blueprint/method.js +208 -0
- package/standard/data/base64.d.ts +1 -0
- package/standard/data/base64.js +39 -0
- package/standard/data/data.d.ts +10 -0
- package/standard/data/data.js +147 -0
- package/standard/data/fields.d.ts +16 -0
- package/standard/data/fields.js +68 -0
- package/standard/data/guards.d.ts +9 -0
- package/standard/data/guards.js +12 -0
- package/standard/data/hex.d.ts +12 -0
- package/standard/data/hex.js +74 -0
- package/standard/data/index.d.ts +7 -0
- package/standard/data/index.js +8 -0
- package/standard/data/text.d.ts +19 -0
- package/standard/data/text.js +222 -0
- package/standard/data/utf8.d.ts +2 -0
- package/standard/data/utf8.js +85 -0
- package/standard/half/frames.d.ts +10 -0
- package/standard/half/frames.js +115 -0
- package/standard/half/half.d.ts +23 -0
- package/standard/half/half.js +89 -0
- package/standard/half/index.d.ts +2 -0
- package/standard/half/index.js +14 -0
- package/standard/index.d.ts +9 -0
- package/standard/index.js +93 -0
- package/standard/names/blueprint.d.ts +2 -0
- package/standard/names/blueprint.js +18 -0
- package/standard/names/code.d.ts +5 -0
- package/standard/names/code.js +21 -0
- package/standard/names/id.d.ts +3 -0
- package/standard/names/id.js +11 -0
- package/standard/names/index.d.ts +5 -0
- package/standard/names/index.js +6 -0
- package/standard/names/method.d.ts +2 -0
- package/standard/names/method.js +19 -0
- package/standard/names/version.d.ts +1 -0
- package/standard/names/version.js +5 -0
- package/standard/pattern/compile.d.ts +25 -0
- package/standard/pattern/compile.js +153 -0
- package/standard/pattern/index.d.ts +3 -0
- package/standard/pattern/index.js +4 -0
- package/standard/pattern/match.d.ts +2 -0
- package/standard/pattern/match.js +75 -0
- package/standard/pattern/parse.d.ts +39 -0
- package/standard/pattern/parse.js +259 -0
- package/standard/presence.d.ts +5 -0
- package/standard/presence.js +69 -0
- package/standard/published.d.ts +1 -0
- package/standard/published.js +57 -0
- package/standard/schema/admits.d.ts +10 -0
- package/standard/schema/admits.js +189 -0
- package/standard/schema/index.d.ts +3 -0
- package/standard/schema/index.js +4 -0
- package/standard/schema/known.d.ts +2 -0
- package/standard/schema/known.js +23 -0
- package/standard/schema/subset.d.ts +11 -0
- package/standard/schema/subset.js +140 -0
- package/standard/tree/allow.d.ts +22 -0
- package/standard/tree/allow.js +229 -0
- package/standard/tree/check.d.ts +3 -0
- package/standard/tree/check.js +227 -0
- package/standard/tree/forms.d.ts +9 -0
- package/standard/tree/forms.js +121 -0
- package/standard/tree/html.d.ts +11 -0
- package/standard/tree/html.js +59 -0
- package/standard/tree/index.d.ts +6 -0
- package/standard/tree/index.js +46 -0
- package/standard/tree/model.d.ts +7 -0
- package/standard/tree/model.js +58 -0
- package/standard/tree/tree.d.ts +44 -0
- package/standard/tree/tree.js +58 -0
- package/standard/version.d.ts +1 -0
- package/standard/version.js +2 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Data } from '#standard';
|
|
2
|
+
import type { LobeCells } from '#faculty';
|
|
3
|
+
export type Version = {
|
|
4
|
+
readonly source: string;
|
|
5
|
+
readonly blueprint: Data;
|
|
6
|
+
readonly road: string;
|
|
7
|
+
readonly label?: string;
|
|
8
|
+
readonly assets?: readonly (readonly [path: string, sha: string])[];
|
|
9
|
+
readonly second?: string;
|
|
10
|
+
};
|
|
11
|
+
export type HalfCode = {
|
|
12
|
+
readonly form: 'component' | 'native';
|
|
13
|
+
readonly code: string | Uint8Array;
|
|
14
|
+
};
|
|
15
|
+
export type Shelf = Pick<LobeCells, 'get' | 'set'>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LIBRARY_SOURCE: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LIBRARY_TEXT: string;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// SPDX-License-Identifier: FSL-1.1-ALv2
|
|
2
|
+
export const LIBRARY_TEXT =
|
|
3
|
+
"class Library extends Faculty {\n static #digest = { type: 'string', pattern: '^[0-9a-f]{64}$' };\n\n static #road = { type: 'string', minLength: 1, maxLength: 256 };\n\n static #assets = {\n type: 'array',\n items: { type: 'array', items: { type: 'string', minLength: 1 }, minItems: 2, maxItems: 2 },\n };\n\n static #faculty = {\n type: 'object',\n properties: {\n source: { type: 'string', minLength: 1 },\n digest: Library.#digest,\n blueprint: { type: 'object' },\n road: Library.#road,\n label: { type: 'string', minLength: 1, maxLength: 64 },\n assets: Library.#assets,\n },\n required: ['source', 'digest', 'blueprint', 'road'],\n additionalProperties: false,\n };\n\n static #organ = {\n type: 'object',\n properties: {\n id: { type: 'string', minLength: 1, maxLength: 64 },\n digest: Library.#digest,\n graph: { type: 'string', minLength: 1 },\n blueprint: { type: 'object' },\n reach: {},\n half: { anyOf: [Library.#digest, { type: 'null' }] },\n road: Library.#road,\n },\n required: ['id', 'digest', 'graph', 'blueprint', 'half', 'road'],\n additionalProperties: false,\n };\n\n static #asset = {\n type: 'object',\n properties: { digest: Library.#digest, bytes: { type: 'string', contentEncoding: 'base16' } },\n required: ['digest', 'bytes'],\n additionalProperties: false,\n };\n\n static #lobe = { type: 'string', pattern: '^[A-Z][A-Z0-9]*$', maxLength: 64 };\n\n static #given = {\n type: 'object',\n properties: {\n kind: { const: 'faculty' },\n given: {\n type: 'object',\n properties: {\n place: Library.#lobe,\n digest: Library.#digest,\n items: { type: 'array', items: { type: 'object' }, maxItems: 1001 },\n },\n required: ['place', 'digest', 'items'],\n additionalProperties: false,\n },\n },\n required: ['kind', 'given'],\n additionalProperties: false,\n };\n\n static #hand = {\n type: 'object',\n properties: {\n source: { type: 'string', minLength: 1 },\n assets: { type: 'array', items: { type: 'object' } },\n second: { type: 'boolean' },\n },\n required: ['source'],\n additionalProperties: false,\n };\n\n static #version = {\n type: 'string',\n pattern: '^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)$',\n };\n\n static #named = {\n type: 'string',\n pattern: '^[a-z][a-z0-9]*([.-][a-z0-9]+)*$',\n maxLength: 64,\n };\n\n static #half = {\n type: 'object',\n properties: {\n form: { enum: ['component', 'native'] },\n code: {\n anyOf: [\n { type: 'string', minLength: 1 },\n { type: 'string', contentEncoding: 'base16' },\n ],\n },\n },\n required: ['form', 'code'],\n additionalProperties: false,\n };\n\n static blueprint = {\n name: 'nervur.library',\n version: '0.37.2',\n description:\n \"The library: it keeps the organism's faculties with their assets, and its organs, as data, each version by its digest, and the versions its sources told it.\",\n methods: {\n add: {\n description:\n \"On an owner's ask through the brain alone. From a source, `road`, any lobe of the organism's own whose describe names `get` and `told`: a faculty by its label or an organ by its ID, at a version, read from it over a wire the library orders, its digest checked and its blueprint's version, and kept under the road `<lobe>@<version>`, with that lobe kept as a source of the owners' own where its `state` answers a name, once; a faculty whose blueprint names `assets` has each asset read whole by its path and checked against its SHA-256, and their canonical digest against the blueprint's, or none of it is kept. From a far source, `road`, the library holds a standing on: a faculty or an organ at a version it told, read over the standing, each digest checked against what it told, an organ by its graph.json alone, never its host half, a faculty's assets as from near. Or by an owner's hand, `source`: a faculty's text carried in the ask, with its `assets` where it has any, kept under the road `hand@<version>` by the same walls. Or a host half's form and code under the digest of its code. A code the library keeps already, added from another road, takes that road, all else as it stands; boot's laying changes no road. Answers the digest; refuses a code whose blueprint's name and version the library keeps under another digest, but with `second`, an owner's word on a faculty, which takes it as a name of its own, kept by its source.\",\n kind: 'writing',\n args: {\n anyOf: [\n {\n type: 'object',\n properties: {\n road: Library.#lobe,\n kind: { const: 'faculty' },\n label: Library.#named,\n version: Library.#version,\n second: { type: 'boolean' },\n },\n required: ['road', 'kind', 'label', 'version'],\n additionalProperties: false,\n },\n {\n type: 'object',\n properties: {\n road: Library.#lobe,\n kind: { const: 'organ' },\n id: Library.#named,\n version: Library.#version,\n },\n required: ['road', 'kind', 'id', 'version'],\n additionalProperties: false,\n },\n Library.#given,\n Library.#hand,\n ],\n },\n result: {\n type: 'object',\n properties: { digest: Library.#digest },\n required: ['digest'],\n additionalProperties: false,\n },\n errors: ['refused'],\n },\n accept: {\n description:\n \"On an owner's ask through the brain alone: accepts a far source's invitation to a library's standing through the mouth, holding the relation itself on a placeholder of its own. It asks the far lobe at once what it told, `told`, and again at an add of a version not told it yet, since an organism that cannot be dialed can be told nothing. One that can names `tells`: since a relation runs one way, it draws through the ear a standing back on itself for the far lobe, the one before for that far lobe ended, and hands it as `told { tells }`, over which the far lobe tells each version it tells after, `changed`. With `note`, the owner's, which the brain keeps beside the standing, null where none is named. Answers the far organism the brain made up for it, the road an add names it by.\",\n kind: 'writing',\n args: {\n type: 'object',\n properties: { invitation: { type: 'string', minLength: 1 }, note: {}, tells: { const: true } },\n required: ['invitation'],\n additionalProperties: false,\n },\n result: {\n type: 'object',\n properties: { far: Library.#lobe },\n required: ['far'],\n additionalProperties: false,\n },\n errors: ['refused'],\n },\n changed: {\n description:\n \"A source's word that its `main` holds a faculty or an organ at a version it never told: a near one's over its wire, a far one's over the occupant the library's `accept` gave it, by an ask; kept for the owners to see, by `list` with `told`, never added.\",\n kind: 'writing',\n args: {\n type: 'object',\n properties: {\n kind: { enum: ['faculty', 'organ'] },\n label: Library.#named,\n version: Library.#version,\n digest: Library.#digest,\n },\n required: ['kind', 'label', 'version', 'digest'],\n additionalProperties: false,\n },\n errors: ['refused'],\n },\n remove: {\n irreversible: true,\n description:\n \"Deletes a version no lobe stands on with its assets no other kept faculty names, an organ's record, or a host half's code no organ names, on the brain's ask alone.\",\n kind: 'writing',\n args: Library.#byDigest(),\n errors: ['refused', 'used'],\n },\n spare: {\n description:\n \"On an owner's ask through the brain alone: keeps a version the library holds from the sweep, or, with `spared: false`, gives it back. An owner may still remove it.\",\n kind: 'writing',\n args: {\n type: 'object',\n properties: { digest: Library.#digest, spared: { type: 'boolean' } },\n required: ['digest'],\n additionalProperties: false,\n },\n errors: ['refused'],\n },\n evidence: {\n description:\n \"The asset that carries a kept faculty's evidence, `evidence.json`, by its SHA-256, which `get` answers, or null where it carries none; refused to a far asker.\",\n kind: 'reading',\n args: {\n type: 'object',\n properties: { faculty: Library.#digest },\n required: ['faculty'],\n additionalProperties: false,\n },\n result: {\n type: 'object',\n properties: { evidence: { anyOf: [Library.#digest, { type: 'null' }] } },\n required: ['evidence'],\n additionalProperties: false,\n },\n errors: ['refused'],\n },\n get: {\n description:\n \"The version of a digest with its assets, an organ's record, an asset's bytes, or a host half's form and code, or null; refused to a far asker.\",\n kind: 'reading',\n args: {\n type: 'object',\n properties: { digest: Library.#digest },\n required: ['digest'],\n additionalProperties: false,\n },\n result: {\n anyOf: [Library.#faculty, Library.#organ, Library.#asset, Library.#half, { type: 'null' }],\n },\n errors: ['refused'],\n },\n old: {\n description:\n \"The old versions the library keeps, on the brain's ask alone: of each name, a faculty's or an organ's blueprint name, every version but the newest by semver; the brain removes each no lobe stands on.\",\n kind: 'reading',\n args: { type: 'object', additionalProperties: false },\n result: { type: 'object', properties: { digests: { type: 'array', items: { type: 'string' } } } },\n },\n list: {\n description:\n \"The versions kept, by their blueprint's name, each with its road, an organ's marked, one an owner spared marked `spared`, a faculty a source or an owner's hand brought with no evidence marked `unproven`, a page at a time; with `told`, the versions the sources told, each with whether the library keeps it; refused to a far asker.\",\n kind: 'reading',\n args: {\n type: 'object',\n properties: {\n cursor: { anyOf: [{ type: 'string' }, { type: 'null' }] },\n limit: { type: 'integer', minimum: 1 },\n told: { type: 'boolean' },\n },\n additionalProperties: false,\n },\n result: {\n anyOf: [\n {\n type: 'object',\n properties: {\n faculties: { type: 'array', items: { type: 'object' } },\n cursor: { anyOf: [{ type: 'string' }, { type: 'null' }] },\n },\n required: ['faculties', 'cursor'],\n additionalProperties: false,\n },\n {\n type: 'object',\n properties: {\n told: { type: 'array', items: { type: 'object' } },\n cursor: { anyOf: [{ type: 'string' }, { type: 'null' }] },\n },\n required: ['told', 'cursor'],\n additionalProperties: false,\n },\n ],\n },\n errors: ['refused'],\n },\n },\n placeholders: { brain: 'nervur.brain', mouth: 'nervur.mouth', ear: 'nervur.ear' },\n };\n\n static #owner = 'brain';\n\n static #contract = ['get', 'told'];\n\n static #evidence = 'evidence.json';\n\n static #handRoad = 'hand';\n\n static #versionText = /^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$/;\n static #namedText = /^[a-z][a-z0-9]*(?:[.-][a-z0-9]+)*$/;\n static #lobeText = /^[A-Z][A-Z0-9]*$/;\n\n static #sent(value ) {\n if (value === undefined) return 'nothing';\n const read = JSON.stringify(value);\n return read.length > 64 ? `${read.slice(0, 63)}…` : read;\n }\n\n #page() {\n return Math.min(1000, Math.floor(this.memory / 4 / 1024));\n }\n\n static #byDigest() {\n return {\n type: 'object',\n properties: { digest: Library.#digest },\n required: ['digest'],\n additionalProperties: false,\n };\n }\n\n static #digestIn(args ) {\n const digest = Library.field(args, 'digest');\n return typeof digest === 'string' && /^[0-9a-f]{64}$/.test(digest) ? digest : undefined;\n }\n\n static #utf8(text ) {\n const bytes = [];\n for (const char of text) {\n const point = char.codePointAt(0) ?? 0;\n if (point < 0x80) bytes.push(point);\n else if (point < 0x800) bytes.push(0xc0 | (point >> 6), 0x80 | (point & 0x3f));\n else if (point < 0x10000) bytes.push(0xe0 | (point >> 12), 0x80 | ((point >> 6) & 0x3f), 0x80 | (point & 0x3f));\n else\n bytes.push(\n 0xf0 | (point >> 18),\n 0x80 | ((point >> 12) & 0x3f),\n 0x80 | ((point >> 6) & 0x3f),\n 0x80 | (point & 0x3f),\n );\n }\n return new Uint8Array(bytes);\n }\n\n static digestOf(crypto , code ) {\n return Library.hex(crypto.sha256(typeof code === 'string' ? Library.#utf8(code) : code));\n }\n\n static assetsDigest(\n crypto ,\n assets ,\n ) {\n const sorted = assets.toSorted((one, other) => (one[0] < other[0] ? -1 : 1));\n return Library.digestOf(crypto, JSON.stringify(sorted));\n }\n\n static keep(\n cells ,\n digest ,\n kept ,\n bytes = new Map(),\n ) {\n if (!('source' in kept)) {\n if (cells.get(['half', digest]) === undefined) cells.set(['half', digest], { form: kept.form, code: kept.code });\n return null;\n }\n const { source, blueprint, road, label, assets, second } = kept;\n const name = Library.field(blueprint, 'name');\n if (typeof name !== 'string') throw new TypeError('a version kept is one whose blueprint is named');\n if (cells.get(['faculty', digest]) !== undefined) return null;\n const named = Library.field(blueprint, 'assets') !== undefined;\n if (named !== (assets !== undefined))\n return named\n ? `the blueprint of ${name} names assets the faculty carries not`\n : `${name} carries assets its blueprint names not`;\n for (const [, sha] of assets ?? [])\n if (!bytes.has(sha) && cells.get(['asset', sha]) === undefined)\n return `${name} has no bytes for its asset ${sha}`;\n const indexed = Library.#indexed(cells, name, Library.field(blueprint, 'version'), digest, second);\n if (typeof indexed === 'string') return indexed;\n for (const [, sha] of assets ?? []) {\n const held = bytes.get(sha);\n if (held !== undefined && cells.get(['asset', sha]) === undefined) cells.set(['asset', sha], held);\n }\n cells.set(['faculty', digest], {\n source,\n digest,\n blueprint,\n road,\n ...(label === undefined ? {} : { label }),\n ...(assets === undefined ? {} : { assets: assets.map(([path, sha]) => [path, sha]) }),\n ...(indexed.second === undefined ? {} : { second: indexed.second }),\n });\n cells.set(['name', name, digest], label ?? null);\n return null;\n }\n\n static #indexed(\n cells ,\n name ,\n version ,\n digest ,\n second ,\n ) {\n if (typeof version !== 'string') return `the blueprint of ${name} names no version`;\n const named = cells.get(['version', name, version]);\n if (typeof named !== 'string' || named === digest) {\n cells.set(['version', name, version], digest);\n return {};\n }\n if (second === undefined) return `the library keeps ${name} ${version} under another digest, ${named}`;\n const own = cells.get(['second', name, version, second]);\n if (typeof own === 'string' && own !== digest)\n return `the library keeps ${name} ${version} of ${second} under another digest, ${own}`;\n cells.set(['second', name, version, second], digest);\n return { second };\n }\n\n *add(args ) {\n if (this.stamp.asker !== Library.#owner)\n return this.error('refused', \"the library adds on an owner's ask through the brain alone\");\n if (Library.field(args, 'given') !== undefined) return yield* this.#addGiven(args);\n if (Library.field(args, 'source') !== undefined) return yield* this.#addHand(args);\n return yield* this.#addFrom(args);\n }\n\n *#read(source ) {\n const answered = yield { read: source };\n const read = 'result' in answered ? answered.result : undefined;\n const blueprint = Library.field(read, 'blueprint');\n if (blueprint !== undefined && typeof Library.field(blueprint, 'name') === 'string') return blueprint;\n const why = Library.field(read, 'why');\n return `the source is no faculty: ${typeof why === 'string' ? why : 'it declares no blueprint'}`;\n }\n\n static #fromArgs(\n args ,\n ) {\n const kind = Library.field(args, 'kind');\n const key = kind === 'organ' ? 'id' : 'label';\n const [road, named, version] = ['road', key, 'version'].map((one) => Library.field(args, one));\n const keys = typeof args === 'object' && args !== null ? Object.keys(args).length : 0;\n const second = Library.field(args, 'second');\n if ((kind !== 'faculty' && kind !== 'organ') || keys !== (second === undefined ? 4 : 5))\n return 'add takes a road, a kind, a faculty or an organ, its label or ID, and a version';\n if (second !== undefined && ((second !== true && second !== false) || kind !== 'faculty'))\n return `\\`second\\` is an owner's word on a faculty, true or false, not ${Library.#sent(second)}`;\n if (typeof road !== 'string' || road.length > 64 || !Library.#lobeText.test(road))\n return `a road is a lobe of this organism, by the ID the brain made up for it, not ${Library.#sent(road)}`;\n if (typeof named !== 'string' || named.length > 64 || !Library.#namedText.test(named))\n return `a ${key} is a folder's name, lowercase, not ${Library.#sent(named)}`;\n if (typeof version !== 'string' || !Library.#versionText.test(version))\n return `a version is three whole numbers joined by dots, not ${Library.#sent(version)}`;\n return { road, kind, named, version, second: second === true };\n }\n\n *#addFrom(args ) {\n const asked = Library.#fromArgs(args);\n if (typeof asked === 'string') return this.error('refused', asked);\n if (this.cells.get(['far', asked.road]) !== undefined) return yield* this.#addFar(asked);\n const { road, kind, named, version, second } = asked;\n const unreached = yield* this.#reach(road);\n if (unreached !== null) return this.error('refused', unreached);\n const got = yield {\n placeholder: road,\n method: 'get',\n args: { kind, label: named, version },\n };\n if ('error' in got)\n return this.error('refused', `the source ${road} answers ${got.error.code}: ${got.error.message}`);\n const from = `${road}@${version}`;\n const taken =\n kind === 'organ'\n ? this.#takeOrgan(got.result, named, version, from)\n : yield* this.#takeFaculty(got.result, from, {\n lobe: road,\n label: named,\n version,\n ...(second ? { second: road } : {}),\n });\n if (Library.#added(taken)) yield* this.#kindOf(road);\n return taken;\n }\n\n static #added(taken ) {\n return typeof taken === 'object' && taken !== null && 'digest' in taken;\n }\n\n *#kindOf(lobe ) {\n if (this.cells.get(['source', lobe]) !== undefined) return;\n const state = yield {\n placeholder: lobe,\n method: 'state',\n args: {},\n };\n const name = 'result' in state ? Library.field(state.result, 'name') : undefined;\n if (typeof name === 'string' && name !== '') this.cells.set(['source', lobe], 'owners');\n }\n\n *#reach(lobe ) {\n const order = { termination: lobe };\n const ordered = yield {\n placeholder: 'nerves',\n method: 'order',\n args: { order },\n };\n if ('error' in ordered) return `the library reaches no ${lobe}: ${ordered.error.message}`;\n const described = yield {\n placeholder: lobe,\n method: null,\n args: null,\n };\n const methods = 'result' in described ? Library.field(described.result, 'methods') : undefined;\n const lacking = Library.#contract.filter((method) => Library.field(methods, method) === undefined);\n if (lacking.length === 0) return null;\n yield {\n placeholder: 'nerves',\n method: 'unwire',\n args: { placeholder: lobe },\n };\n return `${lobe} is no source: its describe names no ${lacking.join(' and no ')}`;\n }\n\n *#takeFaculty(answered , road , at ) {\n const { label, version } = at;\n const source = Library.field(answered, 'source');\n const told = Library.field(answered, 'digest');\n if (typeof source !== 'string' || source === '') return this.error('refused', 'the source answered no source');\n const digest = Library.digestOf(this.crypto, source);\n if (told !== digest)\n return this.error('refused', `the source the source answered is not its digest, ${JSON.stringify(told ?? null)}`);\n if (this.cells.get(['faculty', digest]) !== undefined) return this.#reroad(digest, road, version);\n const blueprint = yield* this.#read(source);\n if (typeof blueprint === 'string') return this.error('refused', blueprint);\n const named = Library.field(blueprint, 'version');\n if (named !== version)\n return this.error('refused', `the faculty names version ${JSON.stringify(named ?? null)}, not ${version}`);\n const carried = yield* this.#assetsTaken(answered, blueprint, at);\n if (typeof carried === 'string') return this.error('refused', carried);\n const refused = Library.keep(\n this.cells,\n digest,\n { source, blueprint, road, label, ...carried.kept, ...(at.second === undefined ? {} : { second: at.second }) },\n carried.bytes,\n );\n return refused === null ? { digest } : this.error('refused', refused);\n }\n\n #reroad(digest , road , version ) {\n const kept = this.cells.get(['faculty', digest]);\n const named = Library.field(Library.field(kept, 'blueprint'), 'version');\n if (named !== version)\n return this.error('refused', `the faculty names version ${JSON.stringify(named ?? null)}, not ${version}`);\n if (Library.field(kept, 'road') === road) return { digest };\n const record = {};\n for (const field of ['source', 'digest', 'blueprint', 'label', 'assets', 'second']) {\n const value = Library.field(kept, field);\n if (value !== undefined) record[field] = value;\n }\n this.cells.set(['faculty', digest], { ...record, road });\n return { digest };\n }\n\n *#assetsTaken(\n answered ,\n blueprint ,\n at ,\n ) \n \n \n \n {\n const bytes = new Map ();\n const named = Library.field(blueprint, 'assets');\n const told = Library.field(answered, 'assets');\n if (named === undefined)\n return told === undefined ? { kept: {}, bytes } : 'the source answered assets the blueprint names not';\n const assets = this.#assetsOf(told);\n if (assets === null) return 'the source answered no assets whole: each a path and a SHA-256, one path once';\n if (Library.assetsDigest(this.crypto, assets) !== named)\n return `the assets are not the digest the blueprint names, ${JSON.stringify(named)}`;\n for (const [path, sha] of assets) {\n if (bytes.has(sha) || this.cells.get(['asset', sha]) !== undefined) continue;\n const got = yield {\n placeholder: at.lobe,\n method: 'get',\n args: { kind: 'faculty', label: at.label, version: at.version, path },\n };\n if ('error' in got)\n return `the source ${at.lobe} answers ${got.error.code} for the asset ${path}: ${got.error.message}`;\n const [given, digest, held] = ['path', 'digest', 'bytes'].map((one) => Library.field(got.result, one));\n if (given !== path || digest !== sha || !(held instanceof Uint8Array))\n return `the source answered another asset than ${path}`;\n if (Library.digestOf(this.crypto, held) !== sha) return `the asset ${path} is not its digest, ${sha}`;\n bytes.set(sha, held);\n }\n return { kept: { assets }, bytes };\n }\n\n static #json(text ) {\n try {\n const read = JSON.parse(text);\n return typeof read === 'object' && read !== null && !Array.isArray(read) ? read : null;\n } catch {\n return null;\n }\n }\n\n #takeOrgan(answered , id , version , road ) {\n const graph = Library.field(answered, 'blueprint');\n const half = Library.field(answered, 'half') ?? null;\n if (typeof graph !== 'string') return this.error('refused', \"the source answered no organ's graph.json\");\n if (half !== null && (typeof half !== 'string' || !/^[0-9a-f]{64}$/.test(half)))\n return this.error('refused', 'the source answered a built half that is no digest');\n const read = Library.#json(graph);\n const inner = Library.field(read, 'blueprint');\n const blueprint = inner !== undefined && Library.#json(JSON.stringify(inner)) !== null ? inner : read;\n const name = Library.field(blueprint, 'name');\n const named = Library.field(blueprint, 'version');\n if (blueprint === null || blueprint === undefined || typeof name !== 'string')\n return this.error('refused', 'its graph.json holds no blueprint, named');\n if (named !== version)\n return this.error('refused', `the organ names version ${JSON.stringify(named ?? null)}, not ${version}`);\n const digest = Library.digestOf(this.crypto, graph);\n const kept = this.#organAt(digest);\n if (kept !== undefined) {\n if (half !== null || kept['road'] !== road)\n this.cells.set(['organ', digest], { ...kept, ...(half === null ? {} : { half }), road });\n return { digest };\n }\n const clash = Library.#indexed(this.cells, name, named, digest, undefined);\n if (typeof clash === 'string') return this.error('refused', clash);\n const reach = inner === undefined ? undefined : Library.field(read, 'reach');\n this.cells.set(['organ', digest], {\n id,\n digest,\n graph,\n blueprint,\n ...(reach === undefined ? {} : { reach }),\n half,\n road,\n });\n this.cells.set(['name', name, digest], id);\n return { digest };\n }\n\n #assetsOf(data ) {\n if (!Array.isArray(data) || data.length > this.#page()) return null;\n const assets = [];\n for (const one of data) {\n const [path, sha] = Array.isArray(one) && one.length === 2 ? one : [];\n if (typeof path !== 'string' || path === '') return null;\n if (typeof sha !== 'string' || !/^[0-9a-f]{64}$/.test(sha)) return null;\n assets.push([path, sha]);\n }\n const sorted = assets.toSorted((one, other) => (one[0] < other[0] ? -1 : 1));\n return sorted.every((one, at) => sorted[at - 1]?.[0] !== one[0]) ? sorted : null;\n }\n\n #assetsNamed() {\n const named = new Set ();\n let cursor = null;\n do {\n const page = this.cells.range({\n prefix: ['faculty'],\n limit: this.#page(),\n ...(cursor === null ? {} : { cursor }),\n });\n for (const { value } of page.cells)\n for (const [, sha] of this.#assetsOf(Library.field(value, 'assets')) ?? []) named.add(sha);\n cursor = page.cursor;\n } while (cursor !== null);\n return named;\n }\n\n *accept(args ) {\n if (this.stamp.asker !== Library.#owner)\n return this.error('refused', \"the library accepts a standing on an owner's ask through the brain alone\");\n const invitation = Library.field(args, 'invitation');\n const note = Library.field(args, 'note');\n const keys = typeof args === 'object' && args !== null ? Object.keys(args).length : 0;\n const tells = Library.field(args, 'tells');\n const named = 1 + (note === undefined ? 0 : 1) + (tells === undefined ? 0 : 1);\n if (typeof invitation !== 'string' || invitation === '' || keys !== named || (tells ?? true) !== true)\n return this.error(\n 'refused',\n 'accept takes an invitation, a note where one is named, and `tells` where it can be told',\n );\n const held = this.cells.get(['standings']);\n const count = typeof held === 'number' ? held + 1 : 1;\n this.cells.set(['standings'], count);\n const placeholder = `far-${count}`;\n const accepted = yield* this.#accepted({ invitation, placeholder, note: note ?? null });\n if ('error' in accepted) return this.error('refused', `the mouth accepts no standing: ${accepted.error.message}`);\n const far = Library.field(accepted.result, 'far');\n if (typeof far !== 'string' || !Library.#lobeText.test(far))\n return this.error('refused', 'the mouth named no far organism');\n this.cells.set(['far', far], { placeholder });\n this.cells.set(['source', far], 'far');\n yield* this.#untold(far);\n if (tells === true) yield* this.#tellsBack(far, placeholder);\n else yield* this.#asksTold(far, placeholder);\n return { far };\n }\n\n *#accepted(args ) {\n const answer = yield { placeholder: 'mouth', method: 'accept', args };\n return answer;\n }\n\n *#tellsBack(far , placeholder ) {\n const invited = yield {\n placeholder: 'ear',\n method: 'invite',\n args: { waits: null, lives: null, note: { library: far } },\n };\n const tells = 'result' in invited ? Library.field(invited.result, 'invitation') : undefined;\n const back = 'result' in invited ? Library.field(invited.result, 'far') : undefined;\n if (typeof tells !== 'string') return;\n const asked = yield { placeholder, method: 'told', args: { tells } };\n if ('error' in asked) {\n if (typeof back === 'string') yield { placeholder: 'ear', method: 'drop', args: { far: back } };\n return;\n }\n this.#heardAll(far, asked.result);\n }\n\n *#asksTold(far , placeholder ) {\n const asked = yield { placeholder, method: 'told', args: {} };\n if ('result' in asked) this.#heardAll(far, asked.result);\n }\n\n #heardAll(far , answered ) {\n for (const one of Array.isArray(answered) ? answered.slice(0, this.#page()) : []) {\n const told = Library.#toldFar(one);\n if (told !== null) this.#heard(far, told.kind, told.label, told.version, told.digest);\n }\n }\n\n *#untold(far ) {\n let cursor = null;\n const seen = new Set ();\n const given = [];\n do {\n const page = yield {\n placeholder: 'nerves',\n method: 'relations',\n args: cursor === null ? {} : { cursor },\n };\n if ('error' in page) break;\n const relations = Library.field(page.result, 'relations');\n for (const one of Array.isArray(relations) ? relations : []) {\n const back = Library.field(one, 'far');\n const mine = Library.field(Library.field(one, 'note'), 'library') === far;\n if (Library.field(one, 'side') === 'occupant' && mine && typeof back === 'string') given.push(back);\n }\n const next = Library.field(page.result, 'cursor');\n cursor = typeof next === 'string' && !seen.has(next) ? next : null;\n if (cursor !== null) seen.add(cursor);\n } while (cursor !== null);\n for (const back of given) yield { placeholder: 'ear', method: 'drop', args: { far: back } };\n }\n\n #heard(far , kind , label , version , digest ) {\n const key = ['told', far, kind, label, version];\n if (this.cells.get(key) !== undefined) return;\n const telling = this.cells.get(['telling', far]) ?? { first: 0, next: 0 };\n let first = Number(Library.field(telling, 'first'));\n const next = Number(Library.field(telling, 'next'));\n for (; next - first >= this.#page(); first += 1) {\n const oldest = this.cells.get(['telling', far, first]);\n if (Array.isArray(oldest)) this.cells.delete(oldest);\n this.cells.delete(['telling', far, first]);\n }\n this.cells.set(['telling', far, next], key);\n this.cells.set(['telling', far], { first, next: next + 1 });\n this.cells.set(key, { digest, at: this.stamp.time });\n }\n\n static #isDigest(text ) {\n return typeof text === 'string' && /^[0-9a-f]{64}$/.test(text);\n }\n\n static #toldFar(one ) {\n const [kind, label, version, digest] = ['kind', 'label', 'version', 'digest'].map((name) =>\n Library.field(one, name),\n );\n if (kind !== 'faculty' && kind !== 'organ') return null;\n if (typeof label !== 'string' || label.length > 64 || !Library.#namedText.test(label)) return null;\n if (typeof version !== 'string' || !Library.#versionText.test(version)) return null;\n return Library.#isDigest(digest) ? { kind, label, version, digest } : null;\n }\n\n *#addFar(asked \n \n \n \n \n \n ) {\n const { road, kind, named, version, second } = asked;\n const placeholder = Library.field(this.cells.get(['far', road]), 'placeholder');\n if (this.#toldRowOf(road, kind, named, version) === undefined && typeof placeholder === 'string')\n yield* this.#asksTold(road, placeholder);\n const toldAt = this.#toldAt(road, kind, named, version);\n if (typeof toldAt === 'string') return this.error('refused', toldAt);\n const got = yield {\n placeholder: toldAt.placeholder,\n method: 'get',\n args: { kind, label: named, version },\n };\n if ('error' in got)\n return this.error('refused', `the far source ${road} answers ${got.error.code}: ${got.error.message}`);\n const at = { lobe: toldAt.placeholder, label: named, version, ...(second ? { second: road } : {}) };\n return yield* this.#takeFar(got.result, toldAt.told, { road, kind, named, version }, at);\n }\n\n #toldRowOf(road , kind , named , version ) {\n return Library.#toldRow(this.cells.get(['told', road, kind, named, version]));\n }\n\n #toldAt(road , kind , named , version ) {\n const told = this.#toldRowOf(road, kind, named, version);\n const placeholder = Library.field(this.cells.get(['far', road]), 'placeholder');\n if (told === undefined || typeof placeholder !== 'string')\n return `the far source ${road} told no ${kind} ${named} ${version}`;\n return { told, placeholder };\n }\n\n *#takeFar(\n answered ,\n told ,\n at \n \n \n \n \n ,\n asked ,\n ) {\n const { road, kind, named, version } = at;\n const from = `${road}@${version}`;\n const [source, graph] = ['source', 'blueprint'].map((one) => Library.field(answered, one));\n const matches = (code , name ) =>\n typeof code === 'string' && Library.digestOf(this.crypto, code) === Library.field(told, name);\n if (kind === 'faculty')\n return matches(source, 'digest')\n ? yield* this.#takeFaculty(\n { ...Library.#only(answered, 'assets'), source, digest: Library.field(told, 'digest') ?? null },\n from,\n asked,\n )\n : this.error('refused', `the source the far source ${road} answered is not the digest it told`);\n if (!matches(graph, 'digest'))\n return this.error('refused', `the organ the far source ${road} answered is not the digests it told`);\n return this.#takeOrgan({ blueprint: graph, half: null }, named, version, from);\n }\n\n static #only(answered , name ) {\n const found = Library.field(answered, name);\n return found === undefined ? {} : { [name]: found };\n }\n\n *changed(args ) {\n const [kind, label, version, digest] = ['kind', 'label', 'version', 'digest'].map((one) =>\n Library.field(args, one),\n );\n const keys = typeof args === 'object' && args !== null ? Object.keys(args).length : 0;\n if (\n (kind !== 'faculty' && kind !== 'organ') ||\n keys !== 4 ||\n typeof label !== 'string' ||\n !Library.#namedText.test(label) ||\n typeof version !== 'string' ||\n !Library.#versionText.test(version) ||\n !Library.#isDigest(digest)\n )\n return this.error('refused', `changed takes a kind, a label, a version and a digest, not ${Library.#sent(args)}`);\n const { asker, occupant } = this.stamp;\n if (occupant !== null && occupant.far === asker) {\n const road = Library.field(occupant.note, 'library');\n if (typeof road !== 'string' || this.cells.get(['far', road]) === undefined)\n return this.error('refused', 'changed comes over an occupant the library gave a far source');\n this.#heard(road, kind, label, version, digest);\n return null;\n }\n if (!Library.#lobeText.test(asker)) return this.error('refused', \"changed is a source's word\");\n const unreached = yield* this.#reach(asker);\n if (unreached !== null) return this.error('refused', unreached);\n this.#heard(asker, kind, label, version, digest);\n return null;\n }\n\n static #unbase64(text ) {\n if (!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/u.test(text)) return null;\n const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n const bytes = [];\n let [word, bits] = [0, 0];\n for (const char of text.replaceAll('=', '')) {\n word = (word << 6) | alphabet.indexOf(char);\n bits += 6;\n if (bits >= 8) {\n bits -= 8;\n bytes.push((word >> bits) & 0xff);\n word &= (1 << bits) - 1;\n }\n }\n return new Uint8Array(bytes);\n }\n\n static #givenAssets(\n crypto ,\n items ,\n ) {\n let source ;\n const bytes = new Map ();\n const assets = [];\n for (const item of items) {\n const sourceText = Library.field(item, 'source');\n if (typeof sourceText === 'string') {\n if (source !== undefined) return 'a faculty given holds one source';\n source = sourceText;\n continue;\n }\n const [path, digest, text, base64] = ['path', 'digest', 'text', 'base64'].map((one) => Library.field(item, one));\n const held =\n typeof text === 'string' ? Library.#utf8(text) : typeof base64 === 'string' ? Library.#unbase64(base64) : null;\n if (typeof path !== 'string' || path === '' || typeof digest !== 'string' || held === null)\n return 'a faculty given holds an asset that is none';\n if (Library.digestOf(crypto, held) !== digest) return `the asset ${path} is not its digest, ${digest}`;\n if (assets.some(([seen]) => seen === path)) return `the asset ${path} is given twice`;\n assets.push([path, digest]);\n bytes.set(digest, held);\n }\n return source === undefined ? 'a faculty given holds its source' : { source, bytes, assets };\n }\n\n *#addGiven(args ) {\n const given = Library.field(args, 'given');\n const [place, digest, items] = ['place', 'digest', 'items'].map((one) => Library.field(given, one));\n if (typeof place !== 'string' || typeof digest !== 'string')\n return this.error('refused', 'a faculty given names its place and its digest');\n const kind = this.cells.get(['source', place]);\n if (kind !== undefined && kind !== 'far')\n return this.error('refused', `the place ${place} is a source of the owners' own, which offers no faculty`);\n if (!Array.isArray(items)) return this.error('refused', 'a faculty given holds its items');\n const taken = Library.#givenAssets(this.crypto, items);\n if (typeof taken === 'string') return this.error('refused', taken);\n const { source, bytes, assets } = taken;\n if (Library.digestOf(this.crypto, source) !== digest)\n return this.error('refused', `the faculty given is not its digest, ${digest}`);\n const blueprint = yield* this.#read(source);\n if (typeof blueprint === 'string') return this.error('refused', blueprint);\n const version = Library.field(blueprint, 'version');\n if (typeof version !== 'string' || !Library.#versionText.test(version))\n return this.error('refused', `a version is three whole numbers joined by dots, not ${Library.#sent(version)}`);\n const road = `${place}@${version}`;\n if (this.cells.get(['faculty', digest]) !== undefined) return this.#reroad(digest, road, version);\n const named = Library.field(blueprint, 'assets');\n if (!(named === undefined && assets.length === 0) && Library.assetsDigest(this.crypto, assets) !== named)\n return this.error('refused', \"the assets given are not the digest the faculty's blueprint names\");\n const sorted = assets.toSorted((one, other) => (one[0] < other[0] ? -1 : 1));\n const refused = Library.keep(\n this.cells,\n digest,\n { source, blueprint, road, ...(named === undefined ? {} : { assets: sorted }) },\n bytes,\n );\n return refused === null ? { digest } : this.error('refused', refused);\n }\n\n *#addHand(args ) {\n const [source, assets, second] = ['source', 'assets', 'second'].map((one) => Library.field(args, one));\n if (typeof source !== 'string' || source === '') return this.error('refused', \"an owner's hand carries a source\");\n if (assets !== undefined && (!Array.isArray(assets) || assets.length > this.#page()))\n return this.error(\n 'refused',\n `assets carried are a list, of as many as a faculty holds, not ${Library.#sent(assets)}`,\n );\n if (second !== undefined && typeof second !== 'boolean')\n return this.error('refused', `\\`second\\` is an owner's word, true or false, not ${Library.#sent(second)}`);\n const taken = Library.#givenAssets(this.crypto, [{ source }, ...(assets ?? [])]);\n if (typeof taken === 'string') return this.error('refused', taken);\n const blueprint = yield* this.#read(source);\n if (typeof blueprint === 'string') return this.error('refused', blueprint);\n const version = Library.field(blueprint, 'version');\n if (typeof version !== 'string' || !Library.#versionText.test(version))\n return this.error('refused', `a version is three whole numbers joined by dots, not ${Library.#sent(version)}`);\n const road = `${Library.#handRoad}@${version}`;\n const digest = Library.digestOf(this.crypto, source);\n if (this.cells.get(['faculty', digest]) !== undefined) return this.#reroad(digest, road, version);\n const named = Library.field(blueprint, 'assets');\n if (named !== undefined && Library.assetsDigest(this.crypto, taken.assets) !== named)\n return this.error('refused', \"the assets carried are not the digest the faculty's blueprint names\");\n const refused = Library.keep(\n this.cells,\n digest,\n {\n source,\n blueprint,\n road,\n ...(named === undefined && taken.assets.length === 0\n ? {}\n : { assets: taken.assets.toSorted((one, other) => (one[0] < other[0] ? -1 : 1)) }),\n ...(second === true ? { second: Library.#handRoad } : {}),\n },\n taken.bytes,\n );\n return refused === null ? { digest } : this.error('refused', refused);\n }\n\n *remove(args ) {\n if (this.stamp.asker !== 'brain')\n return this.error('unavailable', \"the library removes a faculty on the brain's ask alone\");\n const digest = Library.#digestIn(args);\n if (digest === undefined) return this.error('refused', 'remove takes a digest');\n const record = this.cells.get(['faculty', digest]) ?? this.#organAt(digest);\n const blueprint = Library.field(record, 'blueprint');\n const name = Library.field(blueprint, 'name');\n const half = this.cells.get(['half', digest]) !== undefined;\n if (typeof name !== 'string' && !half) return this.error('refused', `the library keeps nothing under ${digest}`);\n const uses = yield {\n placeholder: 'brain',\n method: 'uses',\n args: { digest },\n };\n if ('error' in uses) return this.error(uses.error.code, uses.error.message);\n if (uses.result !== false) return this.error('used', `a lobe or an organ stands on ${digest}`);\n if (typeof name !== 'string') this.cells.delete(['half', digest]);\n else {\n this.cells.delete(['faculty', digest]);\n this.cells.delete(['organ', digest]);\n const held = this.#assetsOf(Library.field(record, 'assets')) ?? [];\n const named = held.length === 0 ? new Set () : this.#assetsNamed();\n for (const [, sha] of held) if (!named.has(sha)) this.cells.delete(['asset', sha]);\n this.cells.delete(['name', name, digest]);\n this.cells.delete(['spared', digest]);\n }\n return null;\n }\n\n spare(args ) {\n if (this.stamp.asker !== Library.#owner)\n return this.error('refused', \"the library spares a version on an owner's ask through the brain alone\");\n const digest = Library.#digestIn(args);\n const spared = Library.field(args, 'spared') ?? true;\n if (digest === undefined || typeof spared !== 'boolean')\n return this.error('refused', 'spare takes a digest, and `spared` where it gives one back');\n if (!this.#keeps(digest)) return this.error('refused', `the library keeps nothing under ${digest}`);\n if (spared) this.cells.set(['spared', digest], true);\n else this.cells.delete(['spared', digest]);\n return null;\n }\n\n #keeps(digest ) {\n return this.cells.get(['faculty', digest]) !== undefined || this.cells.get(['organ', digest]) !== undefined;\n }\n\n static proven(record ) {\n const road = Library.field(record, 'road');\n const taken = typeof road === 'string' && /^(?:hand|[A-Z][A-Z0-9]*)@/u.test(road);\n const assets = Library.field(record, 'assets');\n return (\n !taken || (Array.isArray(assets) && assets.some((one) => Array.isArray(one) && one[0] === Library.#evidence))\n );\n }\n\n #evidenceOf(record ) {\n const carried = this.#assetsOf(Library.field(record, 'assets')) ?? [];\n return carried.find(([path]) => path === Library.#evidence)?.[1] ?? null;\n }\n\n evidence(args ) {\n if (this.stamp.occupant !== null) return this.error('refused', 'evidence is kept from a far asker');\n const digest = Library.field(args, 'faculty');\n const record = Library.#isDigest(digest) ? this.cells.get(['faculty', digest]) : undefined;\n if (record === undefined) return this.error('refused', 'evidence takes the digest of a faculty the library keeps');\n return { evidence: this.#evidenceOf(record) };\n }\n\n old() {\n if (this.stamp.asker !== Library.#owner)\n return this.error('unavailable', 'the library names its old versions to the brain alone');\n return { digests: this.#olderIn() };\n }\n\n #olderIn() {\n const newest = new Map ();\n const older = [];\n let cursor = null;\n do {\n const page = this.cells.range({\n prefix: ['version'],\n limit: this.#page(),\n ...(cursor === null ? {} : { cursor }),\n });\n for (const { key, value } of page.cells) {\n const at = Library.#semver(key[2]);\n if (typeof value !== 'string' || at === null || !this.#keeps(value)) continue;\n const name = String(key[1]);\n const top = newest.get(name);\n if (top === undefined) newest.set(name, { at, digest: value });\n else if (Library.#newer(at, top.at)) {\n older.push(top.digest);\n newest.set(name, { at, digest: value });\n } else older.push(value);\n }\n cursor = page.cursor;\n } while (cursor !== null);\n return older.filter((digest) => this.cells.get(['spared', digest]) === undefined);\n }\n\n static #semver(version ) {\n if (typeof version !== 'string' || !Library.#versionText.test(version)) return null;\n return version.split('.').map(Number);\n }\n\n static #newer(one , other ) {\n for (let at = 0; at < 3; at += 1) if ((one[at] ?? 0) !== (other[at] ?? 0)) return (one[at] ?? 0) > (other[at] ?? 0);\n return false;\n }\n\n get(args ) {\n if (this.stamp.occupant !== null) return this.error('refused', 'get is kept from a far asker');\n const digest = Library.#digestIn(args);\n if (digest === undefined) return this.error('refused', 'get takes a digest');\n return (\n this.cells.get(['faculty', digest]) ??\n this.#organAt(digest) ??\n this.#assetAt(digest) ??\n this.cells.get(['half', digest]) ??\n null\n );\n }\n\n #assetAt(digest ) {\n const kept = this.cells.get(['asset', digest]);\n return kept instanceof Uint8Array ? { digest, bytes: kept } : undefined;\n }\n\n list(args ) {\n if (this.stamp.occupant !== null) return this.error('refused', 'list is kept from a far asker');\n const cursor = Library.field(args, 'cursor') ?? null;\n const most = this.#page();\n const limit = Library.field(args, 'limit') ?? most;\n const told = Library.field(args, 'told') ?? false;\n if (cursor !== null && typeof cursor !== 'string')\n return this.error('refused', `a cursor is a text, or null, not ${Library.#sent(cursor)}`);\n if (typeof limit !== 'number' || !Number.isInteger(limit) || limit < 1 || limit > most)\n return this.error('refused', `a limit is a whole number from 1 to ${most}, not ${Library.#sent(limit)}`);\n if (typeof told !== 'boolean') return this.error('refused', `told is true or false, not ${Library.#sent(told)}`);\n const page = this.cells.range({\n prefix: [told ? 'told' : 'name'],\n limit,\n ...(cursor === null ? {} : { cursor }),\n });\n if (told) return { told: page.cells.map((cell) => this.#told(cell)), cursor: page.cursor };\n const faculties = page.cells.map(({ key, value }) => {\n const digest = String(key[2]);\n const organ = this.#organAt(digest);\n const record = organ ?? this.cells.get(['faculty', digest]);\n const road = Library.field(record, 'road');\n return {\n name: String(key[1]),\n digest,\n ...(typeof value === 'string' ? { label: value } : {}),\n ...(typeof road === 'string' ? { road } : {}),\n ...(organ === undefined ? {} : { kind: 'organ' }),\n ...(this.cells.get(['spared', digest]) === undefined ? {} : { spared: true }),\n ...(organ === undefined && !Library.proven(record) ? { unproven: true } : {}),\n };\n });\n return { faculties, cursor: page.cursor };\n }\n\n #organAt(digest ) {\n const row = this.cells.get(['organ', digest]);\n if (row === undefined) return undefined;\n const record = {};\n for (const field of ['id', 'digest', 'graph', 'blueprint', 'reach', 'half', 'road']) {\n const value = Library.field(row, field);\n if (value !== undefined) record[field] = value;\n }\n return record;\n }\n\n static #toldRow(row ) {\n if (row === undefined) return undefined;\n const [digest, at] = ['digest', 'at'].map((one) => Library.field(row, one));\n return {\n ...(digest === undefined ? {} : { digest }),\n ...(at === undefined ? {} : { at }),\n };\n }\n\n #told({ key, value } ) {\n const row = Library.#toldRow(value) ?? {};\n const { at } = row;\n const { digest } = row;\n const kept =\n typeof digest === 'string' &&\n (this.cells.get(['faculty', digest]) !== undefined || this.cells.get(['organ', digest]) !== undefined);\n const [lobe = '', kind = '', label = '', version = ''] = key.slice(1).map(String);\n return {\n lobe,\n kind,\n label,\n version,\n digest: digest ?? null,\n at: at ?? null,\n kept,\n };\n }\n}";
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
// SPDX-License-Identifier: FSL-1.1-ALv2
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export const MOUTH_BLUEPRINT = {
|
|
5
|
+
name: 'nervur.mouth',
|
|
6
|
+
version: '0.37.2',
|
|
7
|
+
description:
|
|
8
|
+
'The mouth: it seals the asks of the relations this organism holds as the standing, and opens their replies; the brain keeps every standing.',
|
|
9
|
+
methods: {
|
|
10
|
+
accept: {
|
|
11
|
+
description:
|
|
12
|
+
"The organism accepts an invitation, at the ask of the asker, never the asker: the brain makes a far organism for its relation, keeps the standing as the organism's, and grants it to the asker by wiring the asker's placeholder to it, one wire each; an owner grants it to other lobes by `grant`. Its text is read past every ASCII whitespace, so one a mail wrapped or a hand spaced reads as it was written. The spans the invitation carries go to the brain, so the standing lapses here by this side's clock: unknocked past `waits`, bound past `lives`; and its anchor's mark, so it ends only once the far brain answered its owner's `drop`. With `note`, free data of at most 4 KiB as its canonical text by default and never a secret, what the organism holds, from whom and what for: the brain keeps it beside the standing as its own, null where none is named, and it never travels to the inviter; the asker's own note on it starts empty and is written through its `nerves`. With `node`, asked by the brain alone for an owner from afar, the standing is granted to that lobe rather than to the asker.",
|
|
13
|
+
kind: 'reading',
|
|
14
|
+
args: {
|
|
15
|
+
type: 'object',
|
|
16
|
+
properties: {
|
|
17
|
+
invitation: { type: 'string', minLength: 1 },
|
|
18
|
+
placeholder: { type: 'string', minLength: 1 },
|
|
19
|
+
note: {},
|
|
20
|
+
node: { type: 'string', minLength: 1 },
|
|
21
|
+
},
|
|
22
|
+
required: ['invitation', 'placeholder'],
|
|
23
|
+
additionalProperties: false,
|
|
24
|
+
},
|
|
25
|
+
result: {
|
|
26
|
+
type: 'object',
|
|
27
|
+
properties: { far: { type: 'string', minLength: 1 } },
|
|
28
|
+
required: ['far'],
|
|
29
|
+
additionalProperties: false,
|
|
30
|
+
},
|
|
31
|
+
errors: ['refused'],
|
|
32
|
+
},
|
|
33
|
+
carry: {
|
|
34
|
+
askers: ['brain'],
|
|
35
|
+
description:
|
|
36
|
+
"The brain's alone: seals an ask on a standing, has the brain keep before its box goes what it needs kept, the bound its number lies below or the standing whole with its knock or probe, sends it to the first address that takes it, the same box again after the brain's pause where a door replied nothing, and answers what the asker hears, the standing moved, the being's newest addresses, and `answered` where the being's object came back, so the brain marks a standing fallen silent bound again.",
|
|
37
|
+
kind: 'reading',
|
|
38
|
+
args: {
|
|
39
|
+
type: 'object',
|
|
40
|
+
properties: {
|
|
41
|
+
far: { type: 'string', minLength: 1 },
|
|
42
|
+
standing: { type: 'object' },
|
|
43
|
+
at: { anyOf: [{ type: 'array', items: { type: 'string', minLength: 1 } }, { type: 'null' }] },
|
|
44
|
+
method: { anyOf: [{ type: 'string', minLength: 1 }, { type: 'null' }] },
|
|
45
|
+
args: {},
|
|
46
|
+
timeout: { type: 'number', minimum: 0 },
|
|
47
|
+
room: { type: 'integer', minimum: 1 },
|
|
48
|
+
},
|
|
49
|
+
required: ['far', 'standing', 'at', 'method', 'args', 'timeout', 'room'],
|
|
50
|
+
additionalProperties: false,
|
|
51
|
+
},
|
|
52
|
+
result: {
|
|
53
|
+
type: 'object',
|
|
54
|
+
properties: {
|
|
55
|
+
heard: {},
|
|
56
|
+
standing: { type: 'object' },
|
|
57
|
+
at: { anyOf: [{ type: 'array', items: { type: 'string', minLength: 1 } }, { type: 'null' }] },
|
|
58
|
+
answered: { const: true },
|
|
59
|
+
},
|
|
60
|
+
required: ['heard', 'standing', 'at'],
|
|
61
|
+
additionalProperties: false,
|
|
62
|
+
},
|
|
63
|
+
errors: ['refused'],
|
|
64
|
+
},
|
|
65
|
+
cede: {
|
|
66
|
+
askers: ['brain'],
|
|
67
|
+
description:
|
|
68
|
+
"The brain's alone: has `key` seal a standing whole, its numbers as the brain hands them, with what the brain keeps `beside` it, to `to`, the public half of a key another organism's `taking` drew, and answers `{handed}`, which no lobe reads; refused where `to` is no named key.",
|
|
69
|
+
kind: 'reading',
|
|
70
|
+
args: {
|
|
71
|
+
type: 'object',
|
|
72
|
+
properties: {
|
|
73
|
+
standing: { type: 'object' },
|
|
74
|
+
beside: { type: 'object' },
|
|
75
|
+
to: { type: 'string', pattern: '^[0-9a-f]{2432}$' },
|
|
76
|
+
},
|
|
77
|
+
required: ['standing', 'beside', 'to'],
|
|
78
|
+
additionalProperties: false,
|
|
79
|
+
},
|
|
80
|
+
result: { type: 'object' },
|
|
81
|
+
errors: ['refused'],
|
|
82
|
+
},
|
|
83
|
+
drop: {
|
|
84
|
+
irreversible: true,
|
|
85
|
+
description:
|
|
86
|
+
"The asker gives up the standing of a far organism it is granted, accepted through the mouth: its wire and its note go and it is asked `left`; where it was the last lobe wired, the brain sends the inviting side one last letter, `#leave`, then forgets the standing whatever answers, with its notes, and asks each other lobe that was wired `left`. One its invitation marked an anchor's the brain first asks the far brain its owner's `drop`, and forgets only once it answered or had ended it; refused, with the far brain's why or as unheard, it is kept.",
|
|
87
|
+
kind: 'reading',
|
|
88
|
+
args: {
|
|
89
|
+
type: 'object',
|
|
90
|
+
properties: { far: { type: 'string', minLength: 1 } },
|
|
91
|
+
required: ['far'],
|
|
92
|
+
additionalProperties: false,
|
|
93
|
+
},
|
|
94
|
+
result: { type: 'null' },
|
|
95
|
+
errors: ['refused'],
|
|
96
|
+
},
|
|
97
|
+
once: {
|
|
98
|
+
description:
|
|
99
|
+
"Asks once with no relation: the ask goes on the zero head of the card's ward, at the first of its addresses that takes it, and the asker hears what the being answered. No far organism is made.",
|
|
100
|
+
kind: 'reading',
|
|
101
|
+
args: {
|
|
102
|
+
type: 'object',
|
|
103
|
+
properties: {
|
|
104
|
+
card: {
|
|
105
|
+
type: 'object',
|
|
106
|
+
properties: {
|
|
107
|
+
ward: { type: 'string', pattern: '^[0-9a-f]{128}$' },
|
|
108
|
+
at: { type: 'array', items: { type: 'string', minLength: 1 } },
|
|
109
|
+
},
|
|
110
|
+
required: ['ward', 'at'],
|
|
111
|
+
additionalProperties: false,
|
|
112
|
+
},
|
|
113
|
+
method: { type: 'string', minLength: 1 },
|
|
114
|
+
args: { type: 'object' },
|
|
115
|
+
},
|
|
116
|
+
required: ['card'],
|
|
117
|
+
additionalProperties: false,
|
|
118
|
+
},
|
|
119
|
+
errors: ['refused'],
|
|
120
|
+
},
|
|
121
|
+
take: {
|
|
122
|
+
askers: ['brain'],
|
|
123
|
+
description:
|
|
124
|
+
"The brain's alone: has `key` open a standing `cede` handed by the key `taking` drew, the secret it sealed named in `taking`, and seal it again under this organism's record key, and answers `{standing, beside}`; refused where it is not sealed to that key.",
|
|
125
|
+
kind: 'reading',
|
|
126
|
+
args: {
|
|
127
|
+
type: 'object',
|
|
128
|
+
properties: {
|
|
129
|
+
taking: {
|
|
130
|
+
type: 'object',
|
|
131
|
+
properties: {
|
|
132
|
+
key: { type: 'string', pattern: '^[0-9a-f]{2432}$' },
|
|
133
|
+
sealed: { type: 'string', contentEncoding: 'base16' },
|
|
134
|
+
},
|
|
135
|
+
required: ['key', 'sealed'],
|
|
136
|
+
additionalProperties: false,
|
|
137
|
+
},
|
|
138
|
+
handed: { type: 'string', contentEncoding: 'base16' },
|
|
139
|
+
},
|
|
140
|
+
required: ['taking', 'handed'],
|
|
141
|
+
additionalProperties: false,
|
|
142
|
+
},
|
|
143
|
+
result: { type: 'object' },
|
|
144
|
+
errors: ['refused'],
|
|
145
|
+
},
|
|
146
|
+
taking: {
|
|
147
|
+
askers: ['brain'],
|
|
148
|
+
description:
|
|
149
|
+
"The brain's alone: has `key` draw a key a standing is handed to, and answers `{key, sealed}`, its public half and its secret sealed, which only that `key` opens.",
|
|
150
|
+
kind: 'reading',
|
|
151
|
+
args: { type: 'object', properties: {}, additionalProperties: false },
|
|
152
|
+
result: { type: 'object' },
|
|
153
|
+
errors: ['refused'],
|
|
154
|
+
},
|
|
155
|
+
vouch: {
|
|
156
|
+
askers: ['brain'],
|
|
157
|
+
description:
|
|
158
|
+
"The brain's alone: reads a domain's vouch, `https://<domain>/.well-known/quo`, through `network`, and answers its body as bytes, or null where it answered no 200 or nothing at all.",
|
|
159
|
+
kind: 'reading',
|
|
160
|
+
args: {
|
|
161
|
+
type: 'object',
|
|
162
|
+
properties: { domain: { type: 'string', minLength: 1 } },
|
|
163
|
+
required: ['domain'],
|
|
164
|
+
additionalProperties: false,
|
|
165
|
+
},
|
|
166
|
+
result: { anyOf: [{ type: 'object' }, { type: 'null' }] },
|
|
167
|
+
errors: ['refused'],
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
placeholders: { brain: 'nervur.brain', network: 'nervur.network', key: 'nervur.key' },
|
|
171
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type Answer, type Blueprint, type Data } from '#standard';
|
|
2
|
+
import { Faculty, type Expected } from '#faculty';
|
|
3
|
+
type Steps<Value> = Generator<unknown, Value, Answer>;
|
|
4
|
+
export declare class Mouth extends Faculty {
|
|
5
|
+
#private;
|
|
6
|
+
static readonly blueprint: Blueprint;
|
|
7
|
+
once(args: Data): Steps<Data | Expected>;
|
|
8
|
+
accept(args: Data): Steps<Data | Expected>;
|
|
9
|
+
vouch(args: Data): Steps<Data | Expected>;
|
|
10
|
+
taking(): Steps<Data | Expected>;
|
|
11
|
+
cede(args: Data): Steps<Data | Expected>;
|
|
12
|
+
take(args: Data): Steps<Data | Expected>;
|
|
13
|
+
drop(args: Data): Steps<Data | Expected>;
|
|
14
|
+
carry(args: Data): Steps<Data | Expected>;
|
|
15
|
+
}
|
|
16
|
+
export {};
|