@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,330 @@
|
|
|
1
|
+
// SPDX-License-Identifier: FSL-1.1-ALv2
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { costOf, ROOM } from '#quo';
|
|
5
|
+
import { dataText, error, hex, result, utf8Bytes, } from '#standard';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
import { mapOf } from '../map/index.js';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
import { LEAVE } from './silence.js';
|
|
13
|
+
import { sealedOccupantOf, sealedRemoved, } from '../key/index.js';
|
|
14
|
+
import { anchorNode, anchorTaken, bindAnchor, bindRefusal } from './anchor.js';
|
|
15
|
+
import { textAt } from './fields.js';
|
|
16
|
+
import { relateChange } from './invitations.js';
|
|
17
|
+
import { linked, offerRead, redeemChange, referChange, unreferChange } from './references.js';
|
|
18
|
+
import { heirAt, heirOf, heldDirection, markBound } from './holds.js';
|
|
19
|
+
import { dropEndMark, markEnd, oweLeft, toldLeft, } from './owed.js';
|
|
20
|
+
import { endRelation, heirDrawnOn, passed, putRelation, relationAt, viewed } from './relations.js';
|
|
21
|
+
import { beingTimeout, landed, markSpan, overdue, whenLanded } from './landing.js';
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
import { towardBeings } from './toward.js';
|
|
25
|
+
import { dropOut, IN, keptIn, keptOut, OUT, pieceOut, WHOLE, wholeOf } from './pieces.js';
|
|
26
|
+
import { limitIn } from './limits.js';
|
|
27
|
+
import { linesHeld } from './lined.js';
|
|
28
|
+
import { lineTold } from './warded.js';
|
|
29
|
+
import { nextAnchors } from './next.js';
|
|
30
|
+
import { relationWardData } from './wards.js';
|
|
31
|
+
import { BRAIN, EAR } from '../ids/index.js';
|
|
32
|
+
import { askedBy } from './blueprint.js';
|
|
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
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
export { beingTimeout, whenLanded };
|
|
78
|
+
|
|
79
|
+
export const EAR_METHODS = askedBy(EAR);
|
|
80
|
+
|
|
81
|
+
const SEEN = 32;
|
|
82
|
+
|
|
83
|
+
const refused = (why ) => ({ answer: error('refused', why) });
|
|
84
|
+
|
|
85
|
+
const endRefusal = (cells , node , far ) => {
|
|
86
|
+
const direction = heldDirection(cells, node, far);
|
|
87
|
+
if (direction === undefined) return `the node ${node} holds no relation of the far organism ${far}`;
|
|
88
|
+
return direction === 'occupant' ? null : `the relation of ${far} is not an occupant's`;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export const endChange =
|
|
92
|
+
(serving , args ) =>
|
|
93
|
+
(cells) => {
|
|
94
|
+
const far = textAt(args, 'far');
|
|
95
|
+
const node = textAt(args, 'node');
|
|
96
|
+
const why = endRefusal(cells, node, far);
|
|
97
|
+
if (why !== null) return refused(why);
|
|
98
|
+
const { time, configuration } = serving.gear;
|
|
99
|
+
const ended = endRelation(cells, mapOf(cells), heirAt(cells, far), time.wall(), configuration.removedKeysSpan);
|
|
100
|
+
if (ended === null) return { answer: result(null) };
|
|
101
|
+
const owed = { lobe: ended.node, far: ended.far, note: ended.note };
|
|
102
|
+
oweLeft(cells, owed);
|
|
103
|
+
return { answer: result(null), after: () => toldLeft(serving, owed) };
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export const closing = (
|
|
107
|
+
serving ,
|
|
108
|
+
heirs ,
|
|
109
|
+
change ,
|
|
110
|
+
done ,
|
|
111
|
+
joined = [],
|
|
112
|
+
) => {
|
|
113
|
+
for (const heir of heirs) serving.ending.add(heir);
|
|
114
|
+
serving.change(
|
|
115
|
+
change,
|
|
116
|
+
(answer) => {
|
|
117
|
+
for (const heir of heirs) serving.ending.delete(heir);
|
|
118
|
+
done(answer);
|
|
119
|
+
},
|
|
120
|
+
joined,
|
|
121
|
+
);
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export const endMarked = (serving , mark ) => {
|
|
125
|
+
const { heir, far, node } = mark;
|
|
126
|
+
const change = (cells) => {
|
|
127
|
+
dropEndMark(cells, heir);
|
|
128
|
+
return endRefusal(cells, node, far) === null ? endChange(serving, { far, node })(cells) : { answer: result(null) };
|
|
129
|
+
};
|
|
130
|
+
whenLanded(serving, [heir], () => closing(serving, [heir], change, () => {}));
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export const ended = (serving , args , done , joined = []) => {
|
|
134
|
+
const far = textAt(args, 'far');
|
|
135
|
+
const cells = serving.gear.cells();
|
|
136
|
+
const node = textAt(args, 'node');
|
|
137
|
+
const heir = heirOf(cells, far);
|
|
138
|
+
if (heir === undefined || !serving.flying.has(heir))
|
|
139
|
+
return closing(serving, heir === undefined ? [] : [heir], endChange(serving, args), done, joined);
|
|
140
|
+
const why = endRefusal(cells, node, far);
|
|
141
|
+
if (why !== null) return serving.change(() => refused(why), done, joined);
|
|
142
|
+
answeredEnd(serving, { heir, far, node }, done, joined);
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
const answeredEnd = (serving , mark , done , joined ) => {
|
|
146
|
+
serving.ending.add(mark.heir);
|
|
147
|
+
serving.change(
|
|
148
|
+
(own) => {
|
|
149
|
+
markEnd(own, mark);
|
|
150
|
+
return { answer: result(null) };
|
|
151
|
+
},
|
|
152
|
+
done,
|
|
153
|
+
joined,
|
|
154
|
+
);
|
|
155
|
+
endMarked(serving, mark);
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
export const endedWhenLanded = (serving , args , done , joined = []) => {
|
|
159
|
+
const heir = heirOf(serving.gear.cells(), textAt(args, 'far'));
|
|
160
|
+
const heirs = heir === undefined ? [] : [heir];
|
|
161
|
+
for (const one of heirs) serving.ending.add(one);
|
|
162
|
+
whenLanded(serving, heirs, () => closing(serving, heirs, endChange(serving, args), done, joined));
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
export const anchorDropped = (serving , lobe , far , done , joined ) => {
|
|
166
|
+
const cells = serving.gear.cells();
|
|
167
|
+
const heirs = [heirAt(cells, far), ...nextAnchors(cells)];
|
|
168
|
+
const ending = endChange(serving, { far, node: BRAIN });
|
|
169
|
+
const taken = (own) => {
|
|
170
|
+
const still = anchorNode(own) === far;
|
|
171
|
+
const change = ending(own);
|
|
172
|
+
if (still) anchorTaken(own, lobe, serving.gear.time.wall());
|
|
173
|
+
return change;
|
|
174
|
+
};
|
|
175
|
+
for (const heir of heirs) serving.ending.add(heir);
|
|
176
|
+
whenLanded(serving, heirs, () => closing(serving, heirs, taken, done, joined));
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
const relationRead = (serving , args , done ) => {
|
|
180
|
+
const cells = serving.gear.cells();
|
|
181
|
+
const heir = typeof args['ward'] === 'string' ? heirDrawnOn(cells, args['ward']) : textAt(args, 'heir');
|
|
182
|
+
const { time, configuration } = serving.gear;
|
|
183
|
+
const found = heir === undefined ? undefined : relationAt(cells, heir);
|
|
184
|
+
if (heir === undefined || found === undefined) return done(result(null));
|
|
185
|
+
const ward = found.ward === null ? {} : { ward: relationWardData(found.ward) };
|
|
186
|
+
const open = found.ward !== null && linked(cells, found.ward) ? { linked: true } : {};
|
|
187
|
+
if (serving.ending.has(heir)) {
|
|
188
|
+
const removed = sealedRemoved(found.occupant);
|
|
189
|
+
return done(result(removed === null ? null : { far: null, occupant: removed, ...ward }));
|
|
190
|
+
}
|
|
191
|
+
const seen = serving.flying.has(heir) ? found : viewed(found, time.wall(), configuration.removedKeysSpan);
|
|
192
|
+
done(result(seen === null ? null : { far: seen.far, occupant: seen.occupant, ...ward, ...open }));
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
const refusedNext = (before , after ) => {
|
|
196
|
+
if (after.heir !== before.heir) return `the occupant is of the heir ${after.heir}, and not of ${before.heir}`;
|
|
197
|
+
if (after.removed) return 'the occupant is removed, and the door does not remove one';
|
|
198
|
+
if (!before.spent) return null;
|
|
199
|
+
if (!after.spent) return 'the occupant was spent and is not';
|
|
200
|
+
if (after.highest <= before.highest)
|
|
201
|
+
return `the number ${after.highest} does not move past the highest kept, ${before.highest}`;
|
|
202
|
+
if (after.held !== before.held && after.held !== before.vouched)
|
|
203
|
+
return 'the ask is signed by a key the relation does not hold';
|
|
204
|
+
return null;
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
const seenOf = (crypto , salt , code ) =>
|
|
208
|
+
hex(crypto.hkdf(utf8Bytes(salt), utf8Bytes(code), SEEN));
|
|
209
|
+
|
|
210
|
+
const passAsk = (serving , args , done ) => {
|
|
211
|
+
const { gear, flying } = serving;
|
|
212
|
+
const heir = textAt(args, 'heir');
|
|
213
|
+
if (flying.has(heir)) {
|
|
214
|
+
overdue(serving, heir);
|
|
215
|
+
return done(error('busy', `the relation ${heir} has an ask in flight`));
|
|
216
|
+
}
|
|
217
|
+
if (serving.ending.has(heir)) return done(error('refused', `the relation ${heir} is ending`));
|
|
218
|
+
const cells = gear.cells();
|
|
219
|
+
const found = relationAt(cells, heir);
|
|
220
|
+
const wall = gear.time.wall();
|
|
221
|
+
const live = found === undefined ? null : viewed(found, wall, gear.configuration.removedKeysSpan);
|
|
222
|
+
if (found === undefined || live === null || live.far === null || live.node === null)
|
|
223
|
+
return done(error('refused', `the relation ${heir} is none, or ended`));
|
|
224
|
+
if (serving.leaving.current !== null && live.node !== BRAIN) return done(error('refused', 'the organism is leaving'));
|
|
225
|
+
const next = sealedOccupantOf(args['next']);
|
|
226
|
+
const why = refusedNext(found.occupant, next);
|
|
227
|
+
if (why !== null) return done(error('refused', why));
|
|
228
|
+
const binding = live.node === BRAIN && !found.occupant.spent && next.spent;
|
|
229
|
+
const barred = binding ? bindRefusal(cells, heir, flying) : null;
|
|
230
|
+
if (barred !== null) return done(barred);
|
|
231
|
+
const node = mapOf(cells).node(live.node);
|
|
232
|
+
if (node === undefined) throw new Error(`brain: the relation ${heir} reaches no node.`);
|
|
233
|
+
const seen = seenOf(gear.crypto, found.salt, node.faculty ?? node.blueprint);
|
|
234
|
+
const asked = typeof args['method'] === 'string' ? args['method'] : null;
|
|
235
|
+
putRelation(cells, passed(found, next, wall));
|
|
236
|
+
if (asked !== OUT) dropOut(cells, heir);
|
|
237
|
+
const piece =
|
|
238
|
+
asked === IN
|
|
239
|
+
? keptIn(cells, heir, args['args'] ?? null)
|
|
240
|
+
: asked === OUT
|
|
241
|
+
? pieceOut(cells, heir, args['args'] ?? null)
|
|
242
|
+
: null;
|
|
243
|
+
const most = limitIn(cells, 'lobeMemory', live.node) ?? gear.configuration.lobeMemory;
|
|
244
|
+
const whole = asked === WHOLE ? wholeOf(cells, heir, args['args'] ?? null, most) : null;
|
|
245
|
+
const carried =
|
|
246
|
+
whole === null
|
|
247
|
+
? args
|
|
248
|
+
: 'why' in whole
|
|
249
|
+
? { ...args, refused: whole.why }
|
|
250
|
+
: { ...args, method: whole.method, args: whole.args };
|
|
251
|
+
const method = typeof carried['method'] === 'string' ? carried['method'] : null;
|
|
252
|
+
if (!found.occupant.spent && next.spent) markBound(cells, live.node, live.far, wall);
|
|
253
|
+
const binds = binding && bindAnchor(cells, heir, flying, wall);
|
|
254
|
+
const longest = limitIn(cells, 'longestTimeout', live.node) ?? gear.configuration.longestTimeout;
|
|
255
|
+
const token = flying.set(heir, live.far, gear.time.steady() + markSpan(longest, live.node));
|
|
256
|
+
const told = (answer ) => done(result({ answer, seen }));
|
|
257
|
+
const heard = (answer) => {
|
|
258
|
+
landed(serving, heir, token);
|
|
259
|
+
if (method === null) return told(towardBeings(answer));
|
|
260
|
+
if (piece !== null || (asked !== WHOLE && costOf(dataText(answer)) <= ROOM)) return told(answer);
|
|
261
|
+
let long = null;
|
|
262
|
+
serving.change(
|
|
263
|
+
(kept) => {
|
|
264
|
+
long = keptOut(kept, heir, answer);
|
|
265
|
+
return { answer };
|
|
266
|
+
},
|
|
267
|
+
() => told(long ?? answer),
|
|
268
|
+
);
|
|
269
|
+
};
|
|
270
|
+
if (piece !== null) return serving.change(() => ({ answer: piece }), heard, cells.batch());
|
|
271
|
+
dispatch(serving, carried, { far: live.far, node: live.node, binds }, cells.batch(), heard);
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
const dispatch = (serving , args , relation , joined , told ) => {
|
|
277
|
+
const { far, node, binds } = relation;
|
|
278
|
+
const method = typeof args['method'] === 'string' ? args['method'] : null;
|
|
279
|
+
const heard =
|
|
280
|
+
node === BRAIN
|
|
281
|
+
? (answer) => {
|
|
282
|
+
serving.gear.carry().trace(far, BRAIN, method, answer);
|
|
283
|
+
told(answer);
|
|
284
|
+
}
|
|
285
|
+
: told;
|
|
286
|
+
const refusal = typeof args['refused'] === 'string' ? args['refused'] : null;
|
|
287
|
+
if (refusal !== null) return serving.change(() => refused(refusal), heard, joined);
|
|
288
|
+
if (method === LEAVE) return leaveFrom(serving, { far, node }, joined, heard);
|
|
289
|
+
if (node === BRAIN) return serving.answer(far, method, args['args'] ?? null, heard, joined, binds);
|
|
290
|
+
const timeout = beingTimeout(
|
|
291
|
+
limitIn(serving.gear.cells(), 'longestTimeout', node) ?? serving.gear.configuration.longestTimeout,
|
|
292
|
+
);
|
|
293
|
+
serving.gear.carry().ask(far, node, method, args['args'] ?? null, timeout, heard, joined);
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
const leaveFrom = (
|
|
297
|
+
serving ,
|
|
298
|
+
ending ,
|
|
299
|
+
joined ,
|
|
300
|
+
heard ,
|
|
301
|
+
) => {
|
|
302
|
+
const cells = serving.gear.cells();
|
|
303
|
+
const { far, node } = ending;
|
|
304
|
+
if (node === BRAIN && far === anchorNode(cells))
|
|
305
|
+
return serving.change(() => refused('the anchor leaves only by passing'), heard, joined);
|
|
306
|
+
answeredEnd(serving, { heir: heirAt(cells, far), far, node }, heard, joined);
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
export const serveEar = (serving , method , args , done ) => {
|
|
310
|
+
if (method === 'relate') return serving.change(relateChange(serving, args), done);
|
|
311
|
+
if (method === 'refer') return serving.change(referChange(serving, args), done);
|
|
312
|
+
if (method === 'redeem') return serving.change(redeemChange(serving, args), done);
|
|
313
|
+
if (method === 'offered') return offerRead(serving, args, done);
|
|
314
|
+
if (method === 'unrefer') return serving.change(unreferChange(args), done);
|
|
315
|
+
if (method === 'relation') return relationRead(serving, args, done);
|
|
316
|
+
if (method === 'pass') return passAsk(serving, args, done);
|
|
317
|
+
if (method === 'line') return lineTold(serving, args, done);
|
|
318
|
+
if (method === 'lines')
|
|
319
|
+
return done(
|
|
320
|
+
result(
|
|
321
|
+
linesHeld(serving.gear.cells()).map(({ address, wards }) => ({
|
|
322
|
+
address,
|
|
323
|
+
wards: wards.map((one) => ({ ...one })),
|
|
324
|
+
})),
|
|
325
|
+
),
|
|
326
|
+
);
|
|
327
|
+
ended(serving, args, done);
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
export const isEar = (asker ) => asker === EAR;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const fieldsOf: (data: import("#standard").Data | undefined, what: string) => import("#standard").Fields, recordAt: (fields: import("#standard").Fields, key: string) => import("#standard").Fields, textAt: (fields: import("#standard").Fields, key: string) => string, numberAt: (fields: import("#standard").Fields, key: string) => number, flagAt: (fields: import("#standard").Fields, key: string) => boolean, maybeTextAt: (fields: import("#standard").Fields, key: string) => string | null, maybeNumberAt: (fields: import("#standard").Fields, key: string) => number | null, listAt: (fields: import("#standard").Fields, key: string) => readonly import("#standard").Data[], maybeRecordAt: (fields: import("#standard").Fields, key: string) => import("#standard").Fields;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// SPDX-License-Identifier: FSL-1.1-ALv2
|
|
2
|
+
import { fieldReader } from '#standard';
|
|
3
|
+
|
|
4
|
+
export const { fieldsOf, recordAt, textAt, numberAt, flagAt, maybeTextAt, maybeNumberAt, listAt, maybeRecordAt } =
|
|
5
|
+
fieldReader((field, kind) => new Error(`brain: the args held to a schema have a ${field} that is no ${kind}.`));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Why } from '#standard';
|
|
2
|
+
import { type Cells } from '#cage';
|
|
3
|
+
export declare const isLater: (one: string, other: string) => boolean;
|
|
4
|
+
export declare const genomeIn: (cells: Cells) => string;
|
|
5
|
+
export declare const layGenome: (cells: Cells) => void;
|
|
6
|
+
export declare const FLOOR = "0.33.0";
|
|
7
|
+
export declare const BELOW_FLOOR = "below the floor";
|
|
8
|
+
export declare const keepGenome: (cells: Cells) => null | Why;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// SPDX-License-Identifier: FSL-1.1-ALv2
|
|
2
|
+
import { GENOME_VERSION, } from '#standard';
|
|
3
|
+
import { putRow, rowAt } from '../cells/index.js';
|
|
4
|
+
import { } from '#cage';
|
|
5
|
+
|
|
6
|
+
const ROW = ['genome'];
|
|
7
|
+
|
|
8
|
+
const partsOf = (version ) => {
|
|
9
|
+
const parts = /^(\d+)\.(\d+)\.(\d+)$/.exec(version);
|
|
10
|
+
return parts === null ? [-1, -1, -1] : parts.slice(1).map(Number);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const isLater = (one , other ) => {
|
|
14
|
+
const [a, b] = [partsOf(one), partsOf(other)];
|
|
15
|
+
for (let at = 0; at < 3; at += 1) {
|
|
16
|
+
const [x, y] = [a[at] ?? -1, b[at] ?? -1];
|
|
17
|
+
if (x !== y) return x > y;
|
|
18
|
+
}
|
|
19
|
+
return false;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const genomeIn = (cells ) => {
|
|
23
|
+
const found = rowAt(cells, ROW, 'brain');
|
|
24
|
+
if (typeof found !== 'string') throw new Error('brain: the genome row is not as the brain wrote it.');
|
|
25
|
+
return found;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const layGenome = (cells ) => putRow(cells, ROW, GENOME_VERSION, 'brain');
|
|
29
|
+
|
|
30
|
+
export const FLOOR = '0.33.0';
|
|
31
|
+
|
|
32
|
+
export const BELOW_FLOOR = 'below the floor';
|
|
33
|
+
|
|
34
|
+
export const keepGenome = (cells ) => {
|
|
35
|
+
const kept = genomeIn(cells);
|
|
36
|
+
if (isLater(kept, GENOME_VERSION))
|
|
37
|
+
return {
|
|
38
|
+
why: `the store was last booted by genome ${kept}, later than this genome ${GENOME_VERSION}: a genome never carries memory backwards`,
|
|
39
|
+
};
|
|
40
|
+
if (isLater(FLOOR, kept))
|
|
41
|
+
return {
|
|
42
|
+
why: `the store was last booted by genome ${kept}, below ${FLOOR}, the oldest this genome ${GENOME_VERSION} carries forward: move it to ${FLOOR} first`,
|
|
43
|
+
};
|
|
44
|
+
if (kept !== GENOME_VERSION) putRow(cells, ROW, GENOME_VERSION, 'brain');
|
|
45
|
+
return null;
|
|
46
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// SPDX-License-Identifier: FSL-1.1-ALv2
|
|
2
|
+
import { isFields, } from '#standard';
|
|
3
|
+
import { putRow, rowAt } from '../cells/index.js';
|
|
4
|
+
import { } from '#cage';
|
|
5
|
+
|
|
6
|
+
export const givenOf = (cells , lobe ) => {
|
|
7
|
+
const found = rowAt(cells, ['given', lobe], 'brain');
|
|
8
|
+
if (found === undefined) return {};
|
|
9
|
+
if (!isFields(found)) throw new Error(`brain: the row given ${lobe} is not as the brain wrote it.`);
|
|
10
|
+
return found;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const putGiven = (cells , lobe , given ) => {
|
|
14
|
+
if (JSON.stringify(givenOf(cells, lobe)) !== JSON.stringify(given)) putRow(cells, ['given', lobe], given, 'brain');
|
|
15
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type Answer, type Data } from '#standard';
|
|
2
|
+
import type { Cells } from '#cage';
|
|
3
|
+
import { type GraphMap, type Order } from '../map/index.js';
|
|
4
|
+
import { toldLeft } from './owed.js';
|
|
5
|
+
type Ending = {
|
|
6
|
+
readonly standings: {
|
|
7
|
+
readonly ended: ReadonlySet<string>;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const grantTo: (cells: Cells, far: string, grant: {
|
|
11
|
+
readonly lobe: string;
|
|
12
|
+
readonly placeholder: string;
|
|
13
|
+
readonly note: Data;
|
|
14
|
+
}) => string | null;
|
|
15
|
+
export declare const grantBeside: (cells: Cells, far: string, lobe: string, placeholder: string) => string | null;
|
|
16
|
+
export declare const sharePresent: (cells: Cells, map: GraphMap) => void;
|
|
17
|
+
export declare const standingOrder: (kit: Ending, cells: Cells, node: string, order: Order, note: Data) => {
|
|
18
|
+
readonly answer: Answer;
|
|
19
|
+
};
|
|
20
|
+
export declare const revokeOne: (kit: Parameters<typeof toldLeft>[0], cells: Cells, far: string, lobe: string) => {
|
|
21
|
+
readonly after: () => void;
|
|
22
|
+
} | null;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// SPDX-License-Identifier: FSL-1.1-ALv2
|
|
2
|
+
import { error, result, } from '#standard';
|
|
3
|
+
|
|
4
|
+
import { mapOf, } from '../map/index.js';
|
|
5
|
+
import { dropGrant, grantNote, grantedFars, putGrant } from './grants.js';
|
|
6
|
+
import { noteRefusal } from './notes.js';
|
|
7
|
+
import { oweLeft, toldLeft } from './owed.js';
|
|
8
|
+
import { presentBeside, presentLobes } from './presence.js';
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
export const grantTo = (
|
|
13
|
+
cells ,
|
|
14
|
+
far ,
|
|
15
|
+
grant ,
|
|
16
|
+
) => {
|
|
17
|
+
const { lobe, placeholder, note } = grant;
|
|
18
|
+
const map = mapOf(cells, (node, termination) => node === lobe && termination === far);
|
|
19
|
+
if (map.wire(lobe, placeholder) !== undefined) return `the placeholder ${placeholder} of ${lobe} is wired`;
|
|
20
|
+
if (map.reaching(far).some((wire) => wire.node === lobe)) return `the standing ${far} is granted to ${lobe} already`;
|
|
21
|
+
putGrant(cells, far, lobe, note);
|
|
22
|
+
const wired = map.order(lobe, { termination: far, placeholder, until: null }, false);
|
|
23
|
+
return 'why' in wired ? wired.why : null;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const grantBeside = (cells , far , lobe , placeholder ) => {
|
|
27
|
+
const map = mapOf(cells);
|
|
28
|
+
for (const other of presentBeside(cells, lobe)) {
|
|
29
|
+
if (map.reaching(far).some((wire) => wire.node === other)) continue;
|
|
30
|
+
const why = grantTo(cells, far, { lobe: other, placeholder, note: null });
|
|
31
|
+
if (why !== null) return `the present lobe ${other} cannot hold the relation ${placeholder}: ${why}`;
|
|
32
|
+
}
|
|
33
|
+
return null;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const sharePresent = (cells , map ) => {
|
|
37
|
+
for (const holder of presentLobes(cells)) {
|
|
38
|
+
for (const far of grantedFars(map, holder)) {
|
|
39
|
+
const placeholder = map.reaching(far).find((wire) => wire.node === holder)?.placeholder;
|
|
40
|
+
if (placeholder === undefined) continue;
|
|
41
|
+
for (const other of presentBeside(cells, holder)) {
|
|
42
|
+
if (map.reaching(far).some((wire) => wire.node === other) || map.wire(other, placeholder) !== undefined)
|
|
43
|
+
continue;
|
|
44
|
+
if (grantTo(cells, far, { lobe: other, placeholder, note: null }) !== null) dropGrant(cells, far, other);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const refused = (why ) => ({ answer: error('refused', why) });
|
|
51
|
+
|
|
52
|
+
export const standingOrder = (
|
|
53
|
+
kit ,
|
|
54
|
+
cells ,
|
|
55
|
+
node ,
|
|
56
|
+
order ,
|
|
57
|
+
note ,
|
|
58
|
+
) => {
|
|
59
|
+
const far = order.termination;
|
|
60
|
+
const placeholder = order.placeholder ?? far;
|
|
61
|
+
const tooLong = noteRefusal(cells, node, note);
|
|
62
|
+
if (tooLong !== null) return refused(tooLong);
|
|
63
|
+
const map = mapOf(cells);
|
|
64
|
+
if (map.node(node)?.kind !== 'lobe')
|
|
65
|
+
return refused(`the node ${node} is no lobe, and a lobe alone is wired to a standing`);
|
|
66
|
+
if (kit.standings.ended.has(far)) return refused(`the standing ${far} is ending`);
|
|
67
|
+
if (order.until !== null) return refused('the wire of a standing has no time to live');
|
|
68
|
+
const held = map.reaching(far).find((wire) => wire.node === node);
|
|
69
|
+
if (held !== undefined && held.placeholder !== placeholder)
|
|
70
|
+
return refused(`${node} reaches the standing ${far} by ${held.placeholder} already, one wire each`);
|
|
71
|
+
if (held !== undefined) {
|
|
72
|
+
putGrant(cells, far, node, note);
|
|
73
|
+
return { answer: result({ placeholder }) };
|
|
74
|
+
}
|
|
75
|
+
const why = grantTo(cells, far, { lobe: node, placeholder, note });
|
|
76
|
+
if (why !== null) return refused(why);
|
|
77
|
+
const shared = grantBeside(cells, far, node, placeholder);
|
|
78
|
+
return shared === null ? { answer: result({ placeholder }) } : refused(shared);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export const revokeOne = (
|
|
82
|
+
kit ,
|
|
83
|
+
cells ,
|
|
84
|
+
far ,
|
|
85
|
+
lobe ,
|
|
86
|
+
) => {
|
|
87
|
+
const map = mapOf(cells);
|
|
88
|
+
const wire = map.reaching(far).find((one) => one.node === lobe);
|
|
89
|
+
if (wire === undefined) return null;
|
|
90
|
+
const note = grantNote(cells, far, lobe) ?? null;
|
|
91
|
+
const unwired = map.unwire(lobe, wire.placeholder, false);
|
|
92
|
+
if (unwired !== null)
|
|
93
|
+
throw new Error(`brain: the wire of ${lobe} to the standing ${far} is not ended: ${unwired.why}`);
|
|
94
|
+
dropGrant(cells, far, lobe);
|
|
95
|
+
const owed = { lobe, far, note };
|
|
96
|
+
oweLeft(cells, owed);
|
|
97
|
+
return { after: () => toldLeft(kit, owed) };
|
|
98
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Data } from '#standard';
|
|
2
|
+
import { type Cells } from '#cage';
|
|
3
|
+
import type { GraphMap } from '../map/index.js';
|
|
4
|
+
export type Granted = {
|
|
5
|
+
readonly lobe: string;
|
|
6
|
+
readonly placeholder: string;
|
|
7
|
+
readonly note: Data;
|
|
8
|
+
};
|
|
9
|
+
export declare const putGrant: (cells: Cells, far: string, lobe: string, note: Data) => void;
|
|
10
|
+
export declare const grantNote: (cells: Cells, far: string, lobe: string) => Data | undefined;
|
|
11
|
+
export declare const dropGrant: (cells: Cells, far: string, lobe: string) => void;
|
|
12
|
+
export declare const dropGrants: (cells: Cells, far: string) => void;
|
|
13
|
+
export declare const grantedLobes: (cells: Cells, map: GraphMap, far: string) => readonly Granted[];
|
|
14
|
+
export declare const grantedFars: (map: GraphMap, lobe: string) => readonly string[];
|
|
15
|
+
export declare const mergedNote: (brain: Data, lobe: Data) => Data;
|
|
16
|
+
export declare const occupantOfAsk: (cells: Cells, far: string, lobe: string) => {
|
|
17
|
+
readonly far: string;
|
|
18
|
+
readonly note: Data;
|
|
19
|
+
} | null;
|
|
20
|
+
export declare const danglingStandings: (cells: Cells, map: GraphMap) => readonly string[];
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// SPDX-License-Identifier: FSL-1.1-ALv2
|
|
2
|
+
import { isFields, } from '#standard';
|
|
3
|
+
import { dropRow, putRow, rowAt, rowsIn } from '../cells/index.js';
|
|
4
|
+
import { } from '#cage';
|
|
5
|
+
|
|
6
|
+
import { heldOf } from './holds.js';
|
|
7
|
+
import { BRAIN } from '../ids/index.js';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
export const putGrant = (cells , far , lobe , note ) => {
|
|
12
|
+
putRow(cells, ['grant', far, lobe], note, 'brain');
|
|
13
|
+
putRow(cells, ['granted', lobe, far], null, 'brain');
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const grantNote = (cells , far , lobe ) =>
|
|
17
|
+
rowAt(cells, ['grant', far, lobe], 'brain');
|
|
18
|
+
|
|
19
|
+
export const dropGrant = (cells , far , lobe ) => {
|
|
20
|
+
if (grantNote(cells, far, lobe) === undefined) return;
|
|
21
|
+
dropRow(cells, ['grant', far, lobe], 'brain');
|
|
22
|
+
dropRow(cells, ['granted', lobe, far], 'brain');
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const dropGrants = (cells , far ) => {
|
|
26
|
+
for (const { key } of rowsIn(cells, { prefix: ['grant', far] }, 'brain')) {
|
|
27
|
+
dropRow(cells, key, 'brain');
|
|
28
|
+
if (typeof key[2] === 'string') dropRow(cells, ['granted', key[2], far], 'brain');
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const grantedLobes = (cells , map , far ) =>
|
|
33
|
+
map.reaching(far).map((wire) => ({
|
|
34
|
+
lobe: wire.node,
|
|
35
|
+
placeholder: wire.placeholder,
|
|
36
|
+
note: grantNote(cells, far, wire.node) ?? null,
|
|
37
|
+
}));
|
|
38
|
+
|
|
39
|
+
export const grantedFars = (map , lobe ) =>
|
|
40
|
+
map
|
|
41
|
+
.placeholders(lobe)
|
|
42
|
+
.flatMap((placeholder) => {
|
|
43
|
+
const termination = map.wire(lobe, placeholder.id)?.termination;
|
|
44
|
+
const far = termination === undefined ? undefined : map.node(termination);
|
|
45
|
+
return far?.kind === 'far' && far.direction === 'standing' ? [far.id] : [];
|
|
46
|
+
})
|
|
47
|
+
.toSorted();
|
|
48
|
+
|
|
49
|
+
export const mergedNote = (brain , lobe ) => {
|
|
50
|
+
if (lobe === null) return brain;
|
|
51
|
+
return isFields(brain) && isFields(lobe) ? { ...brain, ...lobe } : lobe;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export const occupantOfAsk = (
|
|
55
|
+
cells ,
|
|
56
|
+
far ,
|
|
57
|
+
lobe ,
|
|
58
|
+
) => {
|
|
59
|
+
const given = heldOf(cells, lobe, far);
|
|
60
|
+
if (given !== undefined) return { far, note: given.note };
|
|
61
|
+
const own = grantNote(cells, far, lobe);
|
|
62
|
+
const held = own === undefined ? undefined : heldOf(cells, BRAIN, far);
|
|
63
|
+
return own === undefined || held === undefined ? null : { far, note: mergedNote(held.note, own) };
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const danglingStandings = (cells , map ) =>
|
|
67
|
+
rowsIn(cells, { prefix: ['standing'] }, 'brain').flatMap(({ key }) => {
|
|
68
|
+
const far = key.length === 2 ? key[1] : undefined;
|
|
69
|
+
return typeof far === 'string' && map.reaching(far).length === 0 && !map.setAside(far) ? [far] : [];
|
|
70
|
+
});
|