@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,72 @@
|
|
|
1
|
+
// SPDX-License-Identifier: FSL-1.1-ALv2
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
const KINDS = { commit: 1, snapshot: 2 };
|
|
11
|
+
const HEAD = 1 + 8 + 4;
|
|
12
|
+
|
|
13
|
+
const sizeOf = (write ) => 1 + 4 + write.key.length + (write.value === null ? 0 : 4 + write.value.length);
|
|
14
|
+
|
|
15
|
+
export const recordBytes = (record ) => {
|
|
16
|
+
const size = record.writes.reduce((sum, write) => sum + sizeOf(write), HEAD);
|
|
17
|
+
const bytes = new Uint8Array(size);
|
|
18
|
+
const view = new DataView(bytes.buffer);
|
|
19
|
+
view.setUint8(0, KINDS[record.kind]);
|
|
20
|
+
view.setUint32(1, Math.floor(record.sequence / 2 ** 32));
|
|
21
|
+
view.setUint32(5, record.sequence % 2 ** 32);
|
|
22
|
+
view.setUint32(9, record.writes.length);
|
|
23
|
+
let at = HEAD;
|
|
24
|
+
for (const { key, value } of record.writes) {
|
|
25
|
+
view.setUint8(at, value === null ? 0 : 1);
|
|
26
|
+
view.setUint32(at + 1, key.length);
|
|
27
|
+
bytes.set(key, at + 5);
|
|
28
|
+
at += 5 + key.length;
|
|
29
|
+
if (value === null) continue;
|
|
30
|
+
view.setUint32(at, value.length);
|
|
31
|
+
bytes.set(value, at + 4);
|
|
32
|
+
at += 4 + value.length;
|
|
33
|
+
}
|
|
34
|
+
return bytes;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const runAt = (bytes , at , length ) =>
|
|
38
|
+
at + length <= bytes.length ? bytes.slice(at, at + length) : null;
|
|
39
|
+
|
|
40
|
+
const writeAt = (
|
|
41
|
+
bytes ,
|
|
42
|
+
view ,
|
|
43
|
+
at ,
|
|
44
|
+
) => {
|
|
45
|
+
if (at + 5 > bytes.length) return null;
|
|
46
|
+
const flag = view.getUint8(at);
|
|
47
|
+
const key = runAt(bytes, at + 5, view.getUint32(at + 1));
|
|
48
|
+
if (key === null || flag > 1) return null;
|
|
49
|
+
const after = at + 5 + key.length;
|
|
50
|
+
if (flag === 0) return { write: { key, value: null }, next: after };
|
|
51
|
+
if (after + 4 > bytes.length) return null;
|
|
52
|
+
const value = runAt(bytes, after + 4, view.getUint32(after));
|
|
53
|
+
return value === null ? null : { write: { key, value }, next: after + 4 + value.length };
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const readRecord = (bytes ) => {
|
|
57
|
+
if (bytes.length < HEAD) return null;
|
|
58
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
59
|
+
const code = view.getUint8(0);
|
|
60
|
+
const kind = code === KINDS.commit ? 'commit' : code === KINDS.snapshot ? 'snapshot' : null;
|
|
61
|
+
const sequence = view.getUint32(1) * 2 ** 32 + view.getUint32(5);
|
|
62
|
+
if (kind === null || !Number.isSafeInteger(sequence)) return null;
|
|
63
|
+
const writes = [];
|
|
64
|
+
let at = HEAD;
|
|
65
|
+
for (let left = view.getUint32(9); left > 0; left -= 1) {
|
|
66
|
+
const read = writeAt(bytes, view, at);
|
|
67
|
+
if (read === null) return null;
|
|
68
|
+
writes.push(read.write);
|
|
69
|
+
at = read.next;
|
|
70
|
+
}
|
|
71
|
+
return at === bytes.length ? { kind, sequence, writes } : null;
|
|
72
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { PageFile, PageLayerSeam } from '#seams';
|
|
2
|
+
export declare const LOG_CIPHER = "aes-256-gcm";
|
|
3
|
+
import type { Store } from '../store/index.js';
|
|
4
|
+
import type { Pair } from '#cage';
|
|
5
|
+
import { type Sealing } from './frame.js';
|
|
6
|
+
import type { Pairs } from './pairs.js';
|
|
7
|
+
export type LogFiles = {
|
|
8
|
+
readonly log: PageFile;
|
|
9
|
+
readonly snapshots: readonly [PageFile, PageFile];
|
|
10
|
+
};
|
|
11
|
+
export type Recovered = {
|
|
12
|
+
readonly pairs: Pairs;
|
|
13
|
+
readonly sequence: number;
|
|
14
|
+
readonly end: number;
|
|
15
|
+
readonly slot: 0 | 1;
|
|
16
|
+
};
|
|
17
|
+
export type Beside = {
|
|
18
|
+
readonly sealing: Sealing;
|
|
19
|
+
readonly stopped: (why: string) => void;
|
|
20
|
+
readonly compactAt: number;
|
|
21
|
+
readonly pages: PageLayerSeam;
|
|
22
|
+
};
|
|
23
|
+
export type LogFrozen = Omit<Recovered, 'pairs'> & {
|
|
24
|
+
readonly key: Uint8Array;
|
|
25
|
+
readonly pairs: readonly Pair[];
|
|
26
|
+
};
|
|
27
|
+
export type LogStore = Store & {
|
|
28
|
+
idle(): boolean;
|
|
29
|
+
frozen(): LogFrozen;
|
|
30
|
+
};
|
|
31
|
+
export declare const makeLogStore: (files: LogFiles, recovered: Recovered, given: Beside) => LogStore;
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
// SPDX-License-Identifier: FSL-1.1-ALv2
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
ahead,
|
|
6
|
+
backedUpUnder,
|
|
7
|
+
backupEnded,
|
|
8
|
+
backupKeyOf,
|
|
9
|
+
ended,
|
|
10
|
+
heldOf,
|
|
11
|
+
heldOver,
|
|
12
|
+
keep,
|
|
13
|
+
pieceOf,
|
|
14
|
+
takingOf,
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
} from '../backup/index.js';
|
|
21
|
+
import { layRekey, readHeader, rewrapHeader } from '../header/index.js';
|
|
22
|
+
|
|
23
|
+
export const LOG_CIPHER = 'aes-256-gcm';
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
import { sealFrame, } from './frame.js';
|
|
27
|
+
|
|
28
|
+
import { recordBytes, } from './record.js';
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
const standing = (state ) => (state.why === '' ? state.phase : `${state.phase}: ${state.why}`);
|
|
71
|
+
|
|
72
|
+
const landed = async (file , at , bytes ) =>
|
|
73
|
+
file.write(at, bytes) ?? (await file.flush());
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
const stop = (log , why ) => {
|
|
83
|
+
log.state.phase = 'stopped';
|
|
84
|
+
log.state.why = why;
|
|
85
|
+
log.beside.stopped(why);
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const commitOf = async (
|
|
89
|
+
log ,
|
|
90
|
+
batches ,
|
|
91
|
+
helds ,
|
|
92
|
+
) => {
|
|
93
|
+
const { state, files, pairs } = log;
|
|
94
|
+
if (state.phase !== 'open') return { why: `The store is ${standing(state)}.` };
|
|
95
|
+
const next = state.sequence + 1;
|
|
96
|
+
const writes = batches.flat();
|
|
97
|
+
const record = { kind: 'commit', sequence: next, writes };
|
|
98
|
+
const frame = sealFrame(log.beside.sealing, recordBytes(record));
|
|
99
|
+
const failed = await landed(files.log, state.end, frame);
|
|
100
|
+
if (failed !== null) {
|
|
101
|
+
stop(log, `a commit failed with ${failed.why}`);
|
|
102
|
+
return { why: `The commit is not on the device: ${failed.why}. The store is stopped.` };
|
|
103
|
+
}
|
|
104
|
+
for (const write of writes) {
|
|
105
|
+
for (const held of helds) if (ahead(held, write.key)) keep(held, write.key, pairs.get(write.key));
|
|
106
|
+
pairs.apply(write);
|
|
107
|
+
}
|
|
108
|
+
state.sequence = next;
|
|
109
|
+
state.end += frame.length;
|
|
110
|
+
return { sequence: next };
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const settle = async (log ) => {
|
|
114
|
+
const { state, files, pairs } = log;
|
|
115
|
+
if (state.phase !== 'open') return;
|
|
116
|
+
if (state.end <= Math.max(log.beside.compactAt, 2 * pairs.bytes())) return;
|
|
117
|
+
const record = { kind: 'snapshot', sequence: state.sequence, writes: pairs.all() };
|
|
118
|
+
const frame = sealFrame(log.beside.sealing, recordBytes(record));
|
|
119
|
+
const slot = files.snapshots[state.slot];
|
|
120
|
+
const snapped = (await landed(slot, 0, frame)) ?? slot.truncate(frame.length) ?? (await slot.flush());
|
|
121
|
+
const cut = snapped ?? files.log.truncate(0) ?? (await files.log.flush());
|
|
122
|
+
if (cut !== null) return stop(log, `the log was not compacted: ${cut.why}`);
|
|
123
|
+
state.end = 0;
|
|
124
|
+
state.slot = state.slot === 0 ? 1 : 0;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
const lineOf = () => {
|
|
128
|
+
let line = Promise.resolve();
|
|
129
|
+
let going = 0;
|
|
130
|
+
const queued = (run , after ) => {
|
|
131
|
+
going += 1;
|
|
132
|
+
const done = line.then(run);
|
|
133
|
+
line = (after === undefined ? done : done.then(after)).then(
|
|
134
|
+
() => void (going -= 1),
|
|
135
|
+
() => void (going -= 1),
|
|
136
|
+
);
|
|
137
|
+
return done;
|
|
138
|
+
};
|
|
139
|
+
return { queued, idle: () => going === 0 };
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
const closeOf = (log ) => {
|
|
143
|
+
const { state, files } = log;
|
|
144
|
+
if (state.phase !== 'closed') {
|
|
145
|
+
state.phase = 'closed';
|
|
146
|
+
state.why = '';
|
|
147
|
+
for (const file of [files.log, ...files.snapshots]) file.close();
|
|
148
|
+
}
|
|
149
|
+
return Promise.resolve();
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
const rewrapOf = async (log , next ) => {
|
|
153
|
+
if (log.state.phase !== 'open') return { why: `The store is ${standing(log.state)}.` };
|
|
154
|
+
const { crypto, key, draw } = log.beside.sealing;
|
|
155
|
+
const written = await rewrapHeader({ pages: log.beside.pages, crypto, draw }, key, next, LOG_CIPHER);
|
|
156
|
+
if (written === null || 'why' in written) return written;
|
|
157
|
+
stop(log, `the header was not rewritten: ${written.unfinished}`);
|
|
158
|
+
return null;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
const backupOf = (
|
|
162
|
+
log ,
|
|
163
|
+
) => {
|
|
164
|
+
if (log.state.phase !== 'open') return { why: `The store is ${standing(log.state)}.` };
|
|
165
|
+
const found = readHeader(log.beside.pages);
|
|
166
|
+
if ('why' in found) return { why: `the header is not read: ${found.why}` };
|
|
167
|
+
const { crypto, key, draw } = log.beside.sealing;
|
|
168
|
+
const backing = { pages: log.beside.pages, crypto, draw, key: backupKeyOf(crypto, key), dataKey: key };
|
|
169
|
+
return { backing, header: found.header, sequence: log.state.sequence };
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
export const makeLogStore = (files , recovered , given ) => {
|
|
173
|
+
const { pairs } = recovered;
|
|
174
|
+
const state = { phase: 'open', why: '', ...recovered };
|
|
175
|
+
const taking = takingOf();
|
|
176
|
+
const beside = {
|
|
177
|
+
...given,
|
|
178
|
+
stopped: (why) => {
|
|
179
|
+
taking.stop(why);
|
|
180
|
+
given.stopped(why);
|
|
181
|
+
},
|
|
182
|
+
};
|
|
183
|
+
const log = { files, pairs, state, beside };
|
|
184
|
+
const live = (call ) => {
|
|
185
|
+
if (state.phase !== 'open') throw new Error(`store.${call}: the store is ${standing(state)}.`);
|
|
186
|
+
};
|
|
187
|
+
const { queued, idle } = lineOf();
|
|
188
|
+
const helds = new Set ();
|
|
189
|
+
let backups = Promise.resolve();
|
|
190
|
+
let backupsAsked = 0;
|
|
191
|
+
let writing = 0;
|
|
192
|
+
let closing = false;
|
|
193
|
+
const begin = (form , naming , begun , mine ) => {
|
|
194
|
+
const begins = backupOf(log);
|
|
195
|
+
if ('why' in begins) return begins;
|
|
196
|
+
const held = heldOf();
|
|
197
|
+
helds.add(held);
|
|
198
|
+
writing += 1;
|
|
199
|
+
const whole = backups.then(async () => {
|
|
200
|
+
try {
|
|
201
|
+
if (mine !== backupsAsked) return { why: 'a later backup takes its place' };
|
|
202
|
+
if (closing || state.phase !== 'open') return { why: `The store is ${closing ? 'closing' : standing(state)}.` };
|
|
203
|
+
const { backing, header, sequence } = begins;
|
|
204
|
+
return await backedUpUnder(backing, header, heldOver(held, pairs), sequence, form, naming, taking, begun);
|
|
205
|
+
} finally {
|
|
206
|
+
helds.delete(held);
|
|
207
|
+
ended(held);
|
|
208
|
+
writing -= 1;
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
backups = whole.then(
|
|
212
|
+
() => undefined,
|
|
213
|
+
() => undefined,
|
|
214
|
+
);
|
|
215
|
+
return { whole };
|
|
216
|
+
};
|
|
217
|
+
return {
|
|
218
|
+
ciphers: [LOG_CIPHER],
|
|
219
|
+
get: (key) => {
|
|
220
|
+
live('get');
|
|
221
|
+
return pairs.get(key);
|
|
222
|
+
},
|
|
223
|
+
range: (from, to, limit, after) => {
|
|
224
|
+
live('range');
|
|
225
|
+
if (!Number.isSafeInteger(limit) || limit < 0) throw new Error(`store.range: the limit ${limit} is no count.`);
|
|
226
|
+
return pairs.range(from, to, limit, after);
|
|
227
|
+
},
|
|
228
|
+
count: (from, to) => {
|
|
229
|
+
live('count');
|
|
230
|
+
return pairs.count(from, to);
|
|
231
|
+
},
|
|
232
|
+
nth: (from, to, index) => {
|
|
233
|
+
live('nth');
|
|
234
|
+
if (!Number.isSafeInteger(index) || index < 0) throw new Error(`store.nth: the index ${index} is no count.`);
|
|
235
|
+
return pairs.nth(from, to, index);
|
|
236
|
+
},
|
|
237
|
+
commit: (batches) =>
|
|
238
|
+
queued(
|
|
239
|
+
() => commitOf(log, batches, helds),
|
|
240
|
+
() => settle(log),
|
|
241
|
+
),
|
|
242
|
+
rewrap: (next) => queued(() => rewrapOf(log, next)),
|
|
243
|
+
rekey: (next) => queued(async () => (await rewrapOf(log, next)) ?? layRekey(log.beside.pages, 'asked')),
|
|
244
|
+
backup: async (form, naming, begun) => {
|
|
245
|
+
taking.stop('a later backup takes its place');
|
|
246
|
+
backupsAsked += 1;
|
|
247
|
+
const mine = backupsAsked;
|
|
248
|
+
const begunHere = await queued(() => Promise.resolve(begin(form, naming, begun, mine)));
|
|
249
|
+
return 'whole' in begunHere ? begunHere.whole : begunHere;
|
|
250
|
+
},
|
|
251
|
+
backupEnd: (form, asked) =>
|
|
252
|
+
queued(async () => {
|
|
253
|
+
await backups;
|
|
254
|
+
if (log.state.phase !== 'open') return { why: `The store is ${standing(log.state)}.` };
|
|
255
|
+
const { crypto, key, draw } = log.beside.sealing;
|
|
256
|
+
const backing = { pages: log.beside.pages, crypto, draw, key: backupKeyOf(crypto, key), dataKey: key };
|
|
257
|
+
return backupEnded(backing, form, asked);
|
|
258
|
+
}),
|
|
259
|
+
leave: (why) => {
|
|
260
|
+
taking.stop(why);
|
|
261
|
+
stop(log, why);
|
|
262
|
+
},
|
|
263
|
+
backupPiece: (asked) =>
|
|
264
|
+
state.phase === 'open'
|
|
265
|
+
? pieceOf(beside.pages, taking, asked)
|
|
266
|
+
: Promise.resolve({ why: `The store is ${standing(state)}.` }),
|
|
267
|
+
sequence: () => {
|
|
268
|
+
live('sequence');
|
|
269
|
+
return state.sequence;
|
|
270
|
+
},
|
|
271
|
+
size: () => {
|
|
272
|
+
live('size');
|
|
273
|
+
const { log: file, snapshots } = files;
|
|
274
|
+
return file.size() + snapshots[0].size() + snapshots[1].size();
|
|
275
|
+
},
|
|
276
|
+
sweep: () => {},
|
|
277
|
+
close: () => {
|
|
278
|
+
closing = true;
|
|
279
|
+
taking.stop('the store closes');
|
|
280
|
+
return queued(async () => {
|
|
281
|
+
await backups;
|
|
282
|
+
await closeOf(log);
|
|
283
|
+
});
|
|
284
|
+
},
|
|
285
|
+
idle: () => idle() && writing === 0,
|
|
286
|
+
frozen: () => {
|
|
287
|
+
const { sequence, end, slot } = state;
|
|
288
|
+
return { key: beside.sealing.key, pairs: pairs.all(), sequence, end, slot };
|
|
289
|
+
},
|
|
290
|
+
};
|
|
291
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// SPDX-License-Identifier: FSL-1.1-ALv2
|
|
2
|
+
|
|
3
|
+
import { dropWired, putWired } from './handler.js';
|
|
4
|
+
import { refusedWire } from './order.js';
|
|
5
|
+
import { dropPlaceholder, nodeAt, placeholderAt, placeholdersOf, putPlaceholder, } from './rows.js';
|
|
6
|
+
import { dropUnwired, putUnwired, unwiredAt } from './unwired.js';
|
|
7
|
+
import { declaredIn, refusedSkin } from './skin.js';
|
|
8
|
+
import { refusedChild } from './kin.js';
|
|
9
|
+
import { wireAt } from './wires.js';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
const kept = (cells , node , placeholder , expects ) => {
|
|
14
|
+
const { id } = node;
|
|
15
|
+
const row = placeholderAt(cells, id, placeholder);
|
|
16
|
+
if (row === undefined) return false;
|
|
17
|
+
if (row.declared && row.expects === expects) return true;
|
|
18
|
+
const wire = wireAt(cells, id, placeholder);
|
|
19
|
+
const target = wire === undefined ? undefined : nodeAt(cells, wire.termination);
|
|
20
|
+
const meets =
|
|
21
|
+
wire !== undefined &&
|
|
22
|
+
target !== undefined &&
|
|
23
|
+
refusedWire(expects, target, wire.termination) === null &&
|
|
24
|
+
refusedSkin(declaredIn(cells), node, placeholder, target) === null &&
|
|
25
|
+
refusedChild(cells, node, placeholder, target) === null;
|
|
26
|
+
if (meets) {
|
|
27
|
+
putPlaceholder(cells, id, placeholder, { expects, declared: true });
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
if (wire !== undefined) dropWired(cells, id, placeholder);
|
|
31
|
+
dropPlaceholder(cells, id, placeholder);
|
|
32
|
+
return false;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const redeclare = (cells , node , held ) => {
|
|
36
|
+
const { id } = node;
|
|
37
|
+
for (const placeholder of placeholdersOf(cells, id))
|
|
38
|
+
if (placeholder.declared && !held.has(placeholder.id)) {
|
|
39
|
+
const wire = wireAt(cells, id, placeholder.id);
|
|
40
|
+
if (wire !== undefined && nodeAt(cells, wire.termination)?.kind === 'far') putUnwired(cells, wire);
|
|
41
|
+
if (wire !== undefined) dropWired(cells, id, placeholder.id);
|
|
42
|
+
dropPlaceholder(cells, id, placeholder.id);
|
|
43
|
+
}
|
|
44
|
+
for (const [placeholder, expects] of held) {
|
|
45
|
+
if (!kept(cells, node, placeholder, expects)) putPlaceholder(cells, id, placeholder, { expects, declared: true });
|
|
46
|
+
const aside = unwiredAt(cells, id, placeholder);
|
|
47
|
+
if (aside === undefined) continue;
|
|
48
|
+
dropUnwired(cells, id, placeholder);
|
|
49
|
+
if (nodeAt(cells, aside.termination) !== undefined && wireAt(cells, id, placeholder) === undefined)
|
|
50
|
+
putWired(cells, aside);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// SPDX-License-Identifier: FSL-1.1-ALv2
|
|
2
|
+
|
|
3
|
+
import { BRAIN } from '../ids/index.js';
|
|
4
|
+
import { dropPlaceholder, nodeAt, placeholderAt, putPlaceholder, } from './rows.js';
|
|
5
|
+
import { dropWire, putWire, wireAt } from './wires.js';
|
|
6
|
+
|
|
7
|
+
const organOfSkin = (cells , node , placeholder ) => {
|
|
8
|
+
const organ = nodeAt(cells, placeholder);
|
|
9
|
+
if (organ?.kind !== 'organ' || organ.id === BRAIN) return null;
|
|
10
|
+
if (node !== BRAIN && nodeAt(cells, node)?.kind !== 'lobe') return null;
|
|
11
|
+
return placeholderAt(cells, node, placeholder)?.declared === true ? organ.id : null;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const putWired = (cells , wire ) => {
|
|
15
|
+
const before = wireAt(cells, wire.node, wire.placeholder);
|
|
16
|
+
if (before !== undefined && before.termination !== wire.termination) dropWired(cells, wire.node, wire.placeholder);
|
|
17
|
+
putWire(cells, wire);
|
|
18
|
+
if (wire.placeholder !== wire.termination) return;
|
|
19
|
+
const organ = organOfSkin(cells, wire.node, wire.placeholder);
|
|
20
|
+
if (organ === null) return;
|
|
21
|
+
putPlaceholder(cells, organ, wire.node, { expects: null, declared: false });
|
|
22
|
+
putWire(cells, {
|
|
23
|
+
node: organ,
|
|
24
|
+
placeholder: wire.node,
|
|
25
|
+
termination: wire.node,
|
|
26
|
+
until: wire.until,
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const dropWired = (cells , node , placeholder ) => {
|
|
31
|
+
const wire = wireAt(cells, node, placeholder);
|
|
32
|
+
const organ = wire?.termination === placeholder ? organOfSkin(cells, node, placeholder) : null;
|
|
33
|
+
dropWire(cells, node, placeholder);
|
|
34
|
+
if (organ === null || wireAt(cells, organ, node)?.termination !== node) return;
|
|
35
|
+
dropWire(cells, organ, node);
|
|
36
|
+
dropPlaceholder(cells, organ, node);
|
|
37
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { farNode, mapOf, type GraphMap } from './map.js';
|
|
2
|
+
export type { Holds } from './order.js';
|
|
3
|
+
export { nodeAt, type Node, type Order, type Placeholder, type Wire } from './rows.js';
|
|
4
|
+
export { childrenOf, OBJECTS, parentOf, putParent, putSealed, sealedAt } from './kin.js';
|
|
5
|
+
export { putWire } from './wires.js';
|
|
6
|
+
export { putOff } from './off.js';
|
|
7
|
+
export { putUnwired } from './unwired.js';
|
|
8
|
+
export { MAP_ROWS } from './read.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// SPDX-License-Identifier: FSL-1.1-ALv2
|
|
2
|
+
export { farNode, mapOf, } from './map.js';
|
|
3
|
+
|
|
4
|
+
export { nodeAt, } from './rows.js';
|
|
5
|
+
export { childrenOf, OBJECTS, parentOf, putParent, putSealed, sealedAt } from './kin.js';
|
|
6
|
+
export { putWire } from './wires.js';
|
|
7
|
+
export { putOff } from './off.js';
|
|
8
|
+
export { putUnwired } from './unwired.js';
|
|
9
|
+
export { MAP_ROWS } from './read.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Why } from '#standard';
|
|
2
|
+
import type { Cells } from '#cage';
|
|
3
|
+
import { type Node } from './rows.js';
|
|
4
|
+
export declare const OBJECTS: readonly string[];
|
|
5
|
+
export declare const parentOf: (cells: Cells, child: string) => string | undefined;
|
|
6
|
+
export declare const putParent: (cells: Cells, child: string, parent: string) => void;
|
|
7
|
+
export declare const sealedAt: (cells: Cells, lobe: string) => boolean;
|
|
8
|
+
export declare const putSealed: (cells: Cells, lobe: string) => void;
|
|
9
|
+
export declare const childrenOf: (cells: Cells, parent: string) => readonly string[];
|
|
10
|
+
export declare const dropKin: (cells: Cells, id: string) => void;
|
|
11
|
+
export declare const refusedOwn: (cells: Cells, lobe: string, to: Node, asked: string | null) => Why | null;
|
|
12
|
+
export declare const refusedChild: (cells: Cells, from: Node, placeholder: string, to: Node) => Why | null;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// SPDX-License-Identifier: FSL-1.1-ALv2
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { BRAIN } from '../ids/index.js';
|
|
5
|
+
import { drop, get, nodeAt, placeholdersOf, scalarOf, set, under, } from './rows.js';
|
|
6
|
+
import { wireAt } from './wires.js';
|
|
7
|
+
|
|
8
|
+
export const OBJECTS = ['cells', 'nerves'];
|
|
9
|
+
|
|
10
|
+
export const parentOf = (cells , child ) => {
|
|
11
|
+
const parent = get(cells, ['parent', child]);
|
|
12
|
+
if (parent !== undefined && typeof parent !== 'string')
|
|
13
|
+
throw new Error(`map: the row parent ${child} is not as the map wrote it.`);
|
|
14
|
+
return parent;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const putParent = (cells , child , parent ) => {
|
|
18
|
+
set(cells, ['parent', child], parent);
|
|
19
|
+
set(cells, ['child', parent, child], null);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const sealedAt = (cells , lobe ) => get(cells, ['sealed', lobe]) !== undefined;
|
|
23
|
+
|
|
24
|
+
export const putSealed = (cells , lobe ) => set(cells, ['sealed', lobe], null);
|
|
25
|
+
|
|
26
|
+
export const childrenOf = (cells , parent ) =>
|
|
27
|
+
under(cells, ['child', parent]).map((cell) => scalarOf(cell.key, 2));
|
|
28
|
+
|
|
29
|
+
export const dropKin = (cells , id ) => {
|
|
30
|
+
drop(cells, ['sealed', id]);
|
|
31
|
+
const parent = parentOf(cells, id);
|
|
32
|
+
if (parent !== undefined) {
|
|
33
|
+
drop(cells, ['parent', id]);
|
|
34
|
+
drop(cells, ['child', parent, id]);
|
|
35
|
+
}
|
|
36
|
+
for (const child of childrenOf(cells, id)) {
|
|
37
|
+
drop(cells, ['child', id, child]);
|
|
38
|
+
drop(cells, ['parent', child]);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const reaches = (cells , parent , termination ) =>
|
|
43
|
+
placeholdersOf(cells, parent).some(
|
|
44
|
+
(placeholder) =>
|
|
45
|
+
!(termination === BRAIN && OBJECTS.includes(placeholder.id)) &&
|
|
46
|
+
wireAt(cells, parent, placeholder.id)?.termination === termination,
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
export const refusedOwn = (cells , lobe , to , asked ) => {
|
|
50
|
+
if (to.kind === 'far' || parentOf(cells, to.id) === lobe || reaches(cells, lobe, BRAIN)) return null;
|
|
51
|
+
if (to.id === asked && to.kind === 'lobe' && !to.core && reaches(cells, asked, lobe)) return null;
|
|
52
|
+
return {
|
|
53
|
+
why: `the lobe ${lobe} orders a wire only to its child and to who asked it, and every other wire, to ${to.id} among them, is an owner's`,
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export const refusedChild = (cells , from , placeholder , to ) => {
|
|
58
|
+
const parent = parentOf(cells, from.id);
|
|
59
|
+
if (parent === undefined || to.id === parent || to.kind === 'far') return null;
|
|
60
|
+
if (to.id === BRAIN && OBJECTS.includes(placeholder)) return null;
|
|
61
|
+
if (nodeAt(cells, parent) !== undefined && reaches(cells, parent, to.id)) return null;
|
|
62
|
+
return { why: `the child ${from.id} reaches nothing its parent ${parent} does not, and ${to.id} is none it reaches` };
|
|
63
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type Why } from '#standard';
|
|
2
|
+
import type { Cells } from '#cage';
|
|
3
|
+
import { type Holds } from './order.js';
|
|
4
|
+
import { type Node, type Order, type Placeholder, type Wire } from './rows.js';
|
|
5
|
+
type Declared = {
|
|
6
|
+
readonly [id: string]: string | null;
|
|
7
|
+
};
|
|
8
|
+
export declare const farNode: (id: string, direction: 'standing' | 'occupant') => Node;
|
|
9
|
+
export type GraphMap = {
|
|
10
|
+
node(id: string): Node | undefined;
|
|
11
|
+
nodes(): readonly Node[];
|
|
12
|
+
count(): number;
|
|
13
|
+
nodesFrom(offset: number, limit: number): readonly Node[];
|
|
14
|
+
placeholders(node: string): readonly Placeholder[];
|
|
15
|
+
wire(node: string, placeholder: string): Wire | undefined;
|
|
16
|
+
reaching(termination: string): readonly Wire[];
|
|
17
|
+
add(node: Node, placeholders: Declared, wiring: {
|
|
18
|
+
readonly [placeholder: string]: string;
|
|
19
|
+
}): null | Why;
|
|
20
|
+
order(node: string, order: Order, throughBrain: boolean): {
|
|
21
|
+
readonly placeholder: string;
|
|
22
|
+
} | Why;
|
|
23
|
+
refusedOwn(lobe: string, termination: string, asked: string | null): null | Why;
|
|
24
|
+
unwire(node: string, placeholder: string, throughBrain: boolean): null | Why;
|
|
25
|
+
expire(wall: number): readonly Wire[];
|
|
26
|
+
remove(id: string): null | Why;
|
|
27
|
+
earliest(): number | null;
|
|
28
|
+
madeUp(): string;
|
|
29
|
+
parent(id: string): string | undefined;
|
|
30
|
+
sealed(id: string): boolean;
|
|
31
|
+
off(id: string): boolean;
|
|
32
|
+
switched(id: string, off: boolean): void;
|
|
33
|
+
standsOn(digest: string): boolean;
|
|
34
|
+
move(id: string, digest: string, placeholders: Declared, blueprint?: string): null | Why;
|
|
35
|
+
unwired(id: string): readonly Wire[];
|
|
36
|
+
setAside(far: string): boolean;
|
|
37
|
+
release(id: string, placeholders: Declared): null | Why;
|
|
38
|
+
};
|
|
39
|
+
export declare const mapOf: (cells: Cells, holds?: Holds) => GraphMap;
|
|
40
|
+
export {};
|