@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,222 @@
|
|
|
1
|
+
// SPDX-License-Identifier: FSL-1.1-ALv2
|
|
2
|
+
import { error, isFields, result, } from '#standard';
|
|
3
|
+
import { countRows, dropRow, eachRow, putRow, rowAt, rowsFrom } from '../cells/index.js';
|
|
4
|
+
import { cellsOf, } from '#cage';
|
|
5
|
+
import { bury } from './dead.js';
|
|
6
|
+
import { flushSoon } from './flush.js';
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
import { BRAIN, SCHEDULER } from '../ids/index.js';
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
const keyOf = (letter ) => [
|
|
26
|
+
'letter',
|
|
27
|
+
letter.lobe,
|
|
28
|
+
letter.number,
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
const broken = (key , field ) =>
|
|
32
|
+
new Error(`carry: the letter row ${key} is not as the carry kept it, in its ${field}.`);
|
|
33
|
+
|
|
34
|
+
export const letterFrom = (key , value ) => {
|
|
35
|
+
const [, lobe, number] = key;
|
|
36
|
+
const row = JSON.stringify(key);
|
|
37
|
+
if (key.length !== 3 || typeof lobe !== 'string' || typeof number !== 'number') throw broken(row, 'key');
|
|
38
|
+
if (!isFields(value)) throw broken(row, 'fields');
|
|
39
|
+
const { asker, method, until } = value;
|
|
40
|
+
if (typeof asker !== 'string' || typeof method !== 'string') throw broken(row, 'asker');
|
|
41
|
+
if (typeof until !== 'number') throw broken(row, 'time to live');
|
|
42
|
+
const attempts = value['attempts'] ?? 0;
|
|
43
|
+
if (typeof attempts !== 'number') throw broken(row, 'attempts');
|
|
44
|
+
return { lobe, number, asker, method, args: value['args'] ?? null, until, attempts };
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const rowOf = (letter ) => {
|
|
48
|
+
const { asker, method, args, until, attempts } = letter;
|
|
49
|
+
return { asker, method, args, until, ...(attempts === 0 ? {} : { attempts }) };
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const eachUnder = (cells , prefix , each ) =>
|
|
53
|
+
eachRow(cells, { prefix }, 'carry', ({ key, value }) => each(letterFrom(key, value)));
|
|
54
|
+
|
|
55
|
+
const deleted = (cells , letter ) => dropRow(cells, keyOf(letter), 'carry');
|
|
56
|
+
|
|
57
|
+
const nextNumber = (hold , cells ) => {
|
|
58
|
+
const last = hold.posted ?? postedIn(cells);
|
|
59
|
+
hold.posted = last + 1;
|
|
60
|
+
return hold.posted;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export const postedIn = (cells ) => {
|
|
64
|
+
const found = rowAt(cells, ['posted'], 'carry') ?? 0;
|
|
65
|
+
if (typeof found !== 'number') throw new Error('carry: the last letter posted is not as the carry wrote it.');
|
|
66
|
+
return found;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const takeLetters = (hold , lobe , enqueue ) => {
|
|
70
|
+
const { gear } = hold;
|
|
71
|
+
if (gear.held === true) return;
|
|
72
|
+
const map = gear.map();
|
|
73
|
+
const node = map.node(lobe);
|
|
74
|
+
const queue = hold.queues.get(lobe);
|
|
75
|
+
if (node === undefined || node.faculty === null || queue === undefined) return;
|
|
76
|
+
if (map.off(lobe) || hold.paused.has(lobe) || gear.damaged(node.faculty) !== null) return;
|
|
77
|
+
hold.full.delete(lobe);
|
|
78
|
+
const reach = { node, queue };
|
|
79
|
+
const forgiving = cellsOf(gear.cache, BRAIN, true);
|
|
80
|
+
const wall = gear.time.wall();
|
|
81
|
+
eachUnder(forgiving, ['letter', lobe], (letter) => {
|
|
82
|
+
const id = JSON.stringify(keyOf(letter));
|
|
83
|
+
if (hold.taking.has(id)) return true;
|
|
84
|
+
if (letter.until <= wall) {
|
|
85
|
+
deleted(forgiving, letter);
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
if (handed(hold, reach, letter, id, enqueue) === 'queued') return true;
|
|
89
|
+
hold.full.add(lobe);
|
|
90
|
+
return false;
|
|
91
|
+
});
|
|
92
|
+
const forgiven = forgiving.batch();
|
|
93
|
+
if (forgiven.length === 0) return;
|
|
94
|
+
gear.commits.add(forgiven, () => {});
|
|
95
|
+
flushSoon(gear, hold);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const ATTEMPTS = new Set(['fault', 'timeout']);
|
|
99
|
+
|
|
100
|
+
const attempted = (hold , taken , again ) => {
|
|
101
|
+
const { gear } = hold;
|
|
102
|
+
const cells = cellsOf(gear.cache, BRAIN, true);
|
|
103
|
+
const row = rowAt(cells, keyOf(taken), 'carry');
|
|
104
|
+
if (row === undefined) return;
|
|
105
|
+
const letter = letterFrom(keyOf(taken), row);
|
|
106
|
+
const attempts = letter.attempts + 1;
|
|
107
|
+
const most = gear.limit?.('letters.attempts', letter.lobe) ?? gear.configuration.letters.attempts;
|
|
108
|
+
if (attempts < most) putRow(cells, keyOf(letter), rowOf({ ...letter, attempts }), 'carry');
|
|
109
|
+
else {
|
|
110
|
+
deleted(cells, letter);
|
|
111
|
+
bury(cells, letter);
|
|
112
|
+
}
|
|
113
|
+
gear.commits.add(cells.batch(), again);
|
|
114
|
+
flushSoon(gear, hold);
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const handed = (hold , reach , letter , id , enqueue ) => {
|
|
118
|
+
const { gear } = hold;
|
|
119
|
+
hold.taking.add(id);
|
|
120
|
+
const removal = cellsOf(gear.cache, BRAIN, true);
|
|
121
|
+
deleted(removal, letter);
|
|
122
|
+
const { asker, method, args, lobe } = letter;
|
|
123
|
+
const timeout = gear.configuration.longestTimeout;
|
|
124
|
+
const done = (answer ) => {
|
|
125
|
+
hold.taking.delete(id);
|
|
126
|
+
if ('error' in answer && ATTEMPTS.has(answer.error.code))
|
|
127
|
+
attempted(hold, letter, () => {
|
|
128
|
+
if (answer.error.code === 'timeout' && !hold.stopped) takeLetters(hold, lobe, enqueue);
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
const post = { from: asker, placeholder: lobe, method, args, timeout, done };
|
|
132
|
+
return enqueue(reach, post, removal.batch());
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export const postedBy = (hold , held ) => {
|
|
136
|
+
if (held.posted.length === 0) return [];
|
|
137
|
+
held.landed.push(...held.postedLanded);
|
|
138
|
+
return [...held.posted, ...postedNumber(hold)];
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const postedNumber = (hold ) => {
|
|
142
|
+
const cells = cellsOf(hold.gear.cache, BRAIN, true);
|
|
143
|
+
cells.set(['posted'], hold.posted ?? 0);
|
|
144
|
+
return cells.batch();
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
export const ringAgain = (hold , held , answer , enqueue ) => {
|
|
148
|
+
if (!held.letter || held.asker !== SCHEDULER || !('result' in answer) || !isFields(answer.result)) return;
|
|
149
|
+
const { again } = answer.result;
|
|
150
|
+
if (typeof again !== 'number' || !Number.isSafeInteger(again) || again < 0) return;
|
|
151
|
+
const { gear } = hold;
|
|
152
|
+
const cells = cellsOf(gear.cache, BRAIN, true);
|
|
153
|
+
const { method, args } = held.input;
|
|
154
|
+
const at = Math.max(again, gear.time.wall() + 1);
|
|
155
|
+
const number = nextNumber(hold, cells);
|
|
156
|
+
const kept = { asker: held.lobe, method: 'set', args: { at, method, args }, until: Number.MAX_SAFE_INTEGER };
|
|
157
|
+
if (cells.set(keyOf({ lobe: SCHEDULER, number }), kept) !== null) return;
|
|
158
|
+
held.posted = [...held.posted, ...cells.batch()];
|
|
159
|
+
held.postedLanded.push(() => takeLetters(hold, SCHEDULER, enqueue));
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
export const postLetter = (hold , post , lives , enqueue , join ) => {
|
|
163
|
+
const { gear } = hold;
|
|
164
|
+
const map = gear.map();
|
|
165
|
+
const wire = map.wire(post.from, post.placeholder);
|
|
166
|
+
const node = wire === undefined ? undefined : map.node(wire.termination);
|
|
167
|
+
if (node === undefined) return post.done(error('unavailable', `the placeholder ${post.placeholder} reaches no node`));
|
|
168
|
+
if (node.kind !== 'lobe' || post.method === null)
|
|
169
|
+
return post.done(error('refused', `a letter goes to a lobe's method, and ${node.id} is none`));
|
|
170
|
+
if (join === undefined) return post.done(error('refused', 'a letter is posted only while a lobe answers an ask'));
|
|
171
|
+
const cells = cellsOf(gear.cache, BRAIN, true);
|
|
172
|
+
const number = nextNumber(hold, cells);
|
|
173
|
+
const kept = { asker: post.from, method: post.method, args: post.args };
|
|
174
|
+
const refused = cells.set(keyOf({ lobe: node.id, number }), {
|
|
175
|
+
...kept,
|
|
176
|
+
until: gear.time.wall() + lives,
|
|
177
|
+
});
|
|
178
|
+
if (refused !== null) return post.done(error('refused', `the letter is not kept: ${refused.why}`));
|
|
179
|
+
const laid = join.post(cells.batch(), () => takeLetters(hold, node.id, enqueue));
|
|
180
|
+
if (!laid) return post.done(error('refused', 'a letter is posted only while a lobe answers a writing ask'));
|
|
181
|
+
post.done(result(null));
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
export const forgiveLetters = (cells , wall ) =>
|
|
185
|
+
eachUnder(cells, ['letter'], (letter) => {
|
|
186
|
+
if (letter.until <= wall) deleted(cells, letter);
|
|
187
|
+
return true;
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
export const buryLetters = (cells , lobe ) =>
|
|
191
|
+
eachUnder(cells, ['letter', lobe], (letter) => {
|
|
192
|
+
deleted(cells, letter);
|
|
193
|
+
bury(cells, letter);
|
|
194
|
+
return true;
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
export const everyLetter = (cells ) => {
|
|
198
|
+
const found = [];
|
|
199
|
+
eachUnder(cells, ['letter'], (letter) => {
|
|
200
|
+
found.push(letter);
|
|
201
|
+
return true;
|
|
202
|
+
});
|
|
203
|
+
return found;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
export const countLetters = (cells ) => countRows(cells, { prefix: ['letter'] }, 'carry');
|
|
207
|
+
|
|
208
|
+
export const lettersFrom = (cells , offset , limit ) =>
|
|
209
|
+
rowsFrom(cells, { prefix: ['letter'] }, 'carry', offset, limit).map(({ key, value }) => letterFrom(key, value));
|
|
210
|
+
|
|
211
|
+
export const letterAt = (cells , lobe , number ) => {
|
|
212
|
+
const value = rowAt(cells, keyOf({ lobe, number }), 'carry');
|
|
213
|
+
return value === undefined ? undefined : letterFrom(keyOf({ lobe, number }), value);
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
export const putLetter = (cells , letter ) => putRow(cells, keyOf(letter), rowOf(letter), 'carry');
|
|
217
|
+
|
|
218
|
+
export const dropLetter = (cells , letter ) =>
|
|
219
|
+
dropRow(cells, keyOf(letter), 'carry');
|
|
220
|
+
|
|
221
|
+
export const isTaking = (hold , lobe , number ) =>
|
|
222
|
+
hold.taking.has(JSON.stringify(keyOf({ lobe, number })));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type Answer, type Data } from '#standard';
|
|
2
|
+
import type { Batch } from '#cage';
|
|
3
|
+
import type { Hold } from './held.js';
|
|
4
|
+
import { type CarryAsk } from './run.js';
|
|
5
|
+
import type { Run } from './waits.js';
|
|
6
|
+
export type Migrated = {
|
|
7
|
+
readonly answer: Answer;
|
|
8
|
+
readonly writes: Batch;
|
|
9
|
+
readonly landed: readonly (() => void)[];
|
|
10
|
+
readonly apart: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const MIGRATE_TIMES = 4;
|
|
13
|
+
export type Migration = {
|
|
14
|
+
readonly lobe: string;
|
|
15
|
+
readonly digest: string;
|
|
16
|
+
readonly args: Data;
|
|
17
|
+
readonly budget: number;
|
|
18
|
+
readonly timeout: number;
|
|
19
|
+
};
|
|
20
|
+
export declare const pausedIdle: (hold: Hold, lobe: string) => void;
|
|
21
|
+
export declare const migrateRun: (hold: Hold, migration: Migration, carry: CarryAsk, done: (migrated: Migrated) => void, waits: (run: Run) => void) => void;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
// SPDX-License-Identifier: FSL-1.1-ALv2
|
|
2
|
+
import { error, } from '#standard';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
import { spaceFor } from './apart.js';
|
|
6
|
+
import { tallied } from './count.js';
|
|
7
|
+
import { flushSoon } from './flush.js';
|
|
8
|
+
|
|
9
|
+
import { postedBy } from './letters.js';
|
|
10
|
+
|
|
11
|
+
import { flightFor, } from './run.js';
|
|
12
|
+
|
|
13
|
+
import { spanOf } from './span.js';
|
|
14
|
+
import { stampOf } from './stamp.js';
|
|
15
|
+
import { BRAIN } from '../ids/index.js';
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
export const MIGRATE_TIMES = 4;
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
export const pausedIdle = (hold , lobe ) => {
|
|
36
|
+
const idle = hold.paused.get(lobe);
|
|
37
|
+
if (idle === undefined || idle === null) return;
|
|
38
|
+
if ((hold.queues.get(lobe)?.running().length ?? 0) > 0) return;
|
|
39
|
+
hold.paused.set(lobe, null);
|
|
40
|
+
idle();
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const migratedOf = (
|
|
44
|
+
hold ,
|
|
45
|
+
lobe ,
|
|
46
|
+
ending ,
|
|
47
|
+
writes ,
|
|
48
|
+
) => {
|
|
49
|
+
if ('answered' in ending)
|
|
50
|
+
return {
|
|
51
|
+
answer: ending.answered,
|
|
52
|
+
...('result' in ending.answered ? writes() : { writes: [], landed: [] }),
|
|
53
|
+
};
|
|
54
|
+
if ('busy' in ending) return { answer: error('busy', ending.busy), writes: [], landed: [] };
|
|
55
|
+
const answer = 'fault' in ending ? error('fault', ending.fault) : error('timeout', 'migrate passed its budget');
|
|
56
|
+
tallied(hold.tally, lobe, 'fault' in ending ? 'fault' : 'budget', answer);
|
|
57
|
+
return { answer, writes: [], landed: [] };
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const joining = (hold , migrate , over ) => {
|
|
61
|
+
let posted = [];
|
|
62
|
+
const landed = [];
|
|
63
|
+
const postedLanded = [];
|
|
64
|
+
const join = {
|
|
65
|
+
asker: () => null,
|
|
66
|
+
run: () => (over() ? null : migrate),
|
|
67
|
+
waiter: () => null,
|
|
68
|
+
post: (batch, told) => {
|
|
69
|
+
if (over()) return false;
|
|
70
|
+
posted = [...posted, ...batch];
|
|
71
|
+
postedLanded.push(told);
|
|
72
|
+
return true;
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
const writes = (own ) => {
|
|
76
|
+
const letters = postedBy(hold, { posted, postedLanded, landed });
|
|
77
|
+
return { writes: [...own, ...letters], landed };
|
|
78
|
+
};
|
|
79
|
+
return { join, writes };
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export const migrateRun = (
|
|
83
|
+
hold ,
|
|
84
|
+
migration ,
|
|
85
|
+
carry ,
|
|
86
|
+
done ,
|
|
87
|
+
waits ,
|
|
88
|
+
) => {
|
|
89
|
+
const { gear } = hold;
|
|
90
|
+
const { lobe, digest, args, budget, timeout } = migration;
|
|
91
|
+
const span = spanOf(timeout, gear.limit?.('longestTimeout', lobe) ?? gear.configuration.longestTimeout);
|
|
92
|
+
const deadline = gear.time.steady() + span;
|
|
93
|
+
const memory = gear.limit?.('lobeMemory', lobe) ?? gear.configuration.lobeMemory;
|
|
94
|
+
const most = gear.limit?.('migrate', lobe) ?? MIGRATE_TIMES * Math.max(gear.holds?.(lobe) ?? 0, memory);
|
|
95
|
+
let over = false;
|
|
96
|
+
let alarm = null;
|
|
97
|
+
let flight = null;
|
|
98
|
+
const space = spaceFor({
|
|
99
|
+
reader: gear.cache,
|
|
100
|
+
lobe,
|
|
101
|
+
digest,
|
|
102
|
+
bound: () => gear.limit?.('lobeMemory', lobe) ?? gear.configuration.lobeMemory,
|
|
103
|
+
add: (batch, landed) => {
|
|
104
|
+
gear.commits.add(batch, landed, (why) => {
|
|
105
|
+
landed();
|
|
106
|
+
flight?.cut();
|
|
107
|
+
end({ answer: error('fault', why), writes: [], landed: [] });
|
|
108
|
+
});
|
|
109
|
+
flushSoon(gear, hold);
|
|
110
|
+
},
|
|
111
|
+
fits: (writes, bytes) => {
|
|
112
|
+
const full = gear.refused?.(lobe, writes, bytes) ?? null;
|
|
113
|
+
if (full === null) return true;
|
|
114
|
+
flight?.cut();
|
|
115
|
+
end({ answer: error('busy', full), writes: [], landed: [] });
|
|
116
|
+
return false;
|
|
117
|
+
},
|
|
118
|
+
wrote: (bytes) => {
|
|
119
|
+
if (bytes > most) {
|
|
120
|
+
flight?.cut();
|
|
121
|
+
const answer = error(
|
|
122
|
+
'timeout',
|
|
123
|
+
`migrate wrote ${bytes} bytes, past the ${most} it may write in all, a default an owner's word over \`migrate\` moves`,
|
|
124
|
+
);
|
|
125
|
+
tallied(hold.tally, lobe, 'budget', answer);
|
|
126
|
+
end({ answer, writes: [], landed: [] });
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
launching.deadline = gear.time.steady() + span;
|
|
130
|
+
launching.asks = launching.deadline;
|
|
131
|
+
flight?.renew();
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
const migrate = { inFlight: new Set(), shrunk: false };
|
|
135
|
+
hold.migrating.set(lobe, migrate);
|
|
136
|
+
const end = (migrated ) => {
|
|
137
|
+
if (over) return;
|
|
138
|
+
over = true;
|
|
139
|
+
if (hold.migrating.get(lobe) === migrate) hold.migrating.delete(lobe);
|
|
140
|
+
if (alarm !== null) gear.timer.cancel(alarm);
|
|
141
|
+
space.settled(() => done({ ...migrated, apart: space.spilled() }));
|
|
142
|
+
};
|
|
143
|
+
const joined = joining(hold, migrate, () => over);
|
|
144
|
+
const input = {
|
|
145
|
+
method: 'migrate',
|
|
146
|
+
args,
|
|
147
|
+
stamp: stampOf(BRAIN, gear.time, gear.chance, gear.configuration.lobeMemory),
|
|
148
|
+
};
|
|
149
|
+
const launching = {
|
|
150
|
+
lobe,
|
|
151
|
+
digest,
|
|
152
|
+
input,
|
|
153
|
+
budget: gear.limit?.('longestBudget', lobe) ?? Math.min(budget, gear.configuration.longestBudget),
|
|
154
|
+
cells: space.cells,
|
|
155
|
+
kind: 'writing',
|
|
156
|
+
deadline,
|
|
157
|
+
asks: deadline,
|
|
158
|
+
join: joined.join,
|
|
159
|
+
idle: () => waits(migrate),
|
|
160
|
+
};
|
|
161
|
+
const running = flightFor(hold, launching, carry, (ending) => {
|
|
162
|
+
const full = 'answered' in ending ? (gear.refused?.(lobe, space.cells.batch(), space.spent()) ?? null) : null;
|
|
163
|
+
const judged = full === null ? ending : { busy: full };
|
|
164
|
+
end(migratedOf(hold, lobe, judged, () => joined.writes(space.spilled() ? space.left() : space.cells.batch())));
|
|
165
|
+
});
|
|
166
|
+
flight = running;
|
|
167
|
+
const watch = () => {
|
|
168
|
+
alarm = gear.timer.at(launching.deadline, () => {
|
|
169
|
+
alarm = null;
|
|
170
|
+
if (gear.time.steady() < launching.deadline) return watch();
|
|
171
|
+
running.cut();
|
|
172
|
+
const answer = error('timeout', 'migrate passed its timeout');
|
|
173
|
+
tallied(hold.tally, lobe, 'timeout', answer);
|
|
174
|
+
end({ answer, writes: [], landed: [] });
|
|
175
|
+
});
|
|
176
|
+
};
|
|
177
|
+
watch();
|
|
178
|
+
running.start();
|
|
179
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type Answer, type Data } from '#standard';
|
|
2
|
+
import { type Durable } from './durable.js';
|
|
3
|
+
import type { Flushing } from './flush.js';
|
|
4
|
+
import type { CarryGear, Join, Organ } from './gear.js';
|
|
5
|
+
import type { Reached } from './wire.js';
|
|
6
|
+
import type { Waiter } from './waits.js';
|
|
7
|
+
export type Post = {
|
|
8
|
+
readonly from: string;
|
|
9
|
+
readonly placeholder: string;
|
|
10
|
+
readonly method: string | null;
|
|
11
|
+
readonly args: Data;
|
|
12
|
+
readonly timeout: number;
|
|
13
|
+
readonly done: (answer: Answer) => void;
|
|
14
|
+
readonly share?: string;
|
|
15
|
+
readonly keeps?: number;
|
|
16
|
+
readonly sentAt?: number;
|
|
17
|
+
readonly still?: true;
|
|
18
|
+
readonly waiter?: Waiter;
|
|
19
|
+
};
|
|
20
|
+
export declare const shareOf: (post: Post) => string;
|
|
21
|
+
export declare const askOrgan: (gear: Pick<CarryGear, 'timer' | 'time' | 'configuration' | 'limit'>, organ: Organ, id: string, budget: number | undefined, post: Post, join?: Join | null) => void;
|
|
22
|
+
export declare const durableOf: (id: string, post: Post, method: string, timeout: number) => Durable;
|
|
23
|
+
export declare const carriedToOrgan: (gear: CarryGear, held: Flushing, reach: Reached, post: Post, durable: {
|
|
24
|
+
readonly timeout: number;
|
|
25
|
+
} | null, join?: Join | null) => void;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// SPDX-License-Identifier: FSL-1.1-ALv2
|
|
2
|
+
import { error, } from '#standard';
|
|
3
|
+
import { BRAIN } from '../ids/index.js';
|
|
4
|
+
|
|
5
|
+
import { keepDurable, } from './durable.js';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
import { spanOf } from './span.js';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
export const shareOf = (post ) => post.share ?? post.from;
|
|
32
|
+
|
|
33
|
+
export const askOrgan = (
|
|
34
|
+
gear ,
|
|
35
|
+
organ ,
|
|
36
|
+
id ,
|
|
37
|
+
budget ,
|
|
38
|
+
post ,
|
|
39
|
+
join = null,
|
|
40
|
+
) => {
|
|
41
|
+
const { timer, time, configuration } = gear;
|
|
42
|
+
const longest = gear.limit?.('longestTimeout', post.from) ?? configuration.longestTimeout;
|
|
43
|
+
const span = spanOf(Math.min(post.timeout, gear.limit?.('longestBudget', post.from) ?? budget ?? Infinity), longest);
|
|
44
|
+
const message = `the ask passed ${span} ms, the least of its timeout, its budget and the longest timeout`;
|
|
45
|
+
if (span === 0) return post.done(error('timeout', message));
|
|
46
|
+
let alarm = null;
|
|
47
|
+
let over = false;
|
|
48
|
+
const finish = (answer ) => {
|
|
49
|
+
if (over) return;
|
|
50
|
+
over = true;
|
|
51
|
+
if (alarm !== null) timer.cancel(alarm);
|
|
52
|
+
post.done(answer);
|
|
53
|
+
};
|
|
54
|
+
organ.answer(post.from, post.placeholder, post.method, post.args, finish, span, join);
|
|
55
|
+
if (!over) {
|
|
56
|
+
alarm = timer.at(time.steady() + span, () => {
|
|
57
|
+
alarm = null;
|
|
58
|
+
finish(error('timeout', `the organ ${id}: ${message}`));
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export const durableOf = (id , post , method , timeout ) => ({
|
|
64
|
+
organ: id,
|
|
65
|
+
asker: post.from,
|
|
66
|
+
method,
|
|
67
|
+
placeholder: post.placeholder,
|
|
68
|
+
args: post.args,
|
|
69
|
+
timeout,
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
export const carriedToOrgan = (
|
|
73
|
+
gear ,
|
|
74
|
+
held ,
|
|
75
|
+
reach ,
|
|
76
|
+
post ,
|
|
77
|
+
durable ,
|
|
78
|
+
join = null,
|
|
79
|
+
) => {
|
|
80
|
+
const { node, organ } = reach;
|
|
81
|
+
const declared = post.method === null ? undefined : gear.declared(node, post.method);
|
|
82
|
+
if (node.id !== BRAIN && declared?.askers !== undefined && !declared.askers.includes(post.from))
|
|
83
|
+
return post.done(
|
|
84
|
+
error('refused', `${post.method ?? ''} is the ${declared.askers.join(' or ')}'s alone, and ${post.from} asks it`),
|
|
85
|
+
);
|
|
86
|
+
const budget = node.id === BRAIN ? undefined : declared?.budget;
|
|
87
|
+
if (durable === null) return askOrgan(gear, organ, node.id, budget, post, join);
|
|
88
|
+
if (post.method === null || declared?.durable !== true)
|
|
89
|
+
return post.done(error('refused', `${post.method ?? 'a describe'} of ${node.id} is not marked durable`));
|
|
90
|
+
const sent = gear.time.steady();
|
|
91
|
+
const kept = durableOf(node.id, post, post.method, durable.timeout);
|
|
92
|
+
keepDurable(gear, held, kept, (refusal) => {
|
|
93
|
+
if (refusal !== null) return post.done(refusal);
|
|
94
|
+
const waited = gear.time.steady() - sent;
|
|
95
|
+
askOrgan(gear, organ, node.id, budget, { ...post, timeout: post.timeout - waited });
|
|
96
|
+
});
|
|
97
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// SPDX-License-Identifier: FSL-1.1-ALv2
|
|
2
|
+
|
|
3
|
+
import { BEFORE, STAGED, stepAt } from './before.js';
|
|
4
|
+
import { deadFrom } from './dead.js';
|
|
5
|
+
import { durableFrom } from './durable.js';
|
|
6
|
+
import { letterFrom, postedIn } from './letters.js';
|
|
7
|
+
|
|
8
|
+
const rolled = (_cells, key) => {
|
|
9
|
+
if (key.length < 3 || typeof key[1] !== 'string' || typeof key[2] !== 'string')
|
|
10
|
+
throw new Error(`brain: the row ${JSON.stringify(key)} of a move is not as the brain wrote it.`);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const CARRY_ROWS = {
|
|
14
|
+
durable: (_cells, key, value) => void durableFrom(key, value),
|
|
15
|
+
letter: (_cells, key, value) => void letterFrom(key, value),
|
|
16
|
+
dead: (_cells, key, value) => void deadFrom(key, value),
|
|
17
|
+
posted: (cells) => void postedIn(cells),
|
|
18
|
+
'way-back': (cells, key) => {
|
|
19
|
+
if (key.length !== 2 || typeof key[1] !== 'string' || stepAt(cells, key[1]) === undefined)
|
|
20
|
+
throw new Error(`brain: the row ${JSON.stringify(key)} is no step a lobe holds.`);
|
|
21
|
+
},
|
|
22
|
+
[BEFORE]: rolled,
|
|
23
|
+
[STAGED]: rolled,
|
|
24
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Batch } from '#cage';
|
|
2
|
+
import type { Alarm } from '../timer/index.js';
|
|
3
|
+
import type { Hold } from './held.js';
|
|
4
|
+
import { type Post } from './organ.js';
|
|
5
|
+
import type { Sent } from './flight.js';
|
|
6
|
+
import { type Waiter } from './waits.js';
|
|
7
|
+
export type Waiting = {
|
|
8
|
+
readonly node: string;
|
|
9
|
+
readonly post: Post;
|
|
10
|
+
readonly joined: Batch;
|
|
11
|
+
readonly durable: {
|
|
12
|
+
readonly timeout: number;
|
|
13
|
+
} | null;
|
|
14
|
+
readonly deadline: number;
|
|
15
|
+
alarm: Alarm | null;
|
|
16
|
+
readonly waiter: Waiter | null;
|
|
17
|
+
};
|
|
18
|
+
export type HeldFor = Sent & {
|
|
19
|
+
readonly one: Waiting;
|
|
20
|
+
};
|
|
21
|
+
export declare const heldBy: (hold: Hold, node: string, asker: string) => number;
|
|
22
|
+
export declare const holdAsk: (hold: Hold, node: string, post: Post, joined: Batch, durable: {
|
|
23
|
+
readonly timeout: number;
|
|
24
|
+
} | null, expire: (one: Waiting) => void) => HeldFor;
|
|
25
|
+
export declare const letGo: (hold: Hold, one: Waiting) => void;
|
|
26
|
+
export declare const releaseHeld: (hold: Hold, lobe: string) => readonly Waiting[];
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// SPDX-License-Identifier: FSL-1.1-ALv2
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
import { shareOf, } from './organ.js';
|
|
6
|
+
|
|
7
|
+
import { spanOf } from './span.js';
|
|
8
|
+
import { waitedOn, waitedOut, } from './waits.js';
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
const shareKey = (node , asker ) => JSON.stringify([node, asker]);
|
|
24
|
+
|
|
25
|
+
export const heldBy = (hold , node , asker ) => hold.shares.get(shareKey(node, asker)) ?? 0;
|
|
26
|
+
|
|
27
|
+
const counted = (hold , one , by ) => {
|
|
28
|
+
const key = shareKey(one.node, shareOf(one.post));
|
|
29
|
+
const count = (hold.shares.get(key) ?? 0) + by;
|
|
30
|
+
if (count === 0) hold.shares.delete(key);
|
|
31
|
+
else hold.shares.set(key, count);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const unhold = (hold , one ) => {
|
|
35
|
+
const list = hold.waiting.get(one.node);
|
|
36
|
+
if (list === undefined) return;
|
|
37
|
+
const at = list.indexOf(one);
|
|
38
|
+
if (at < 0) return;
|
|
39
|
+
list.splice(at, 1);
|
|
40
|
+
waitedOut(one);
|
|
41
|
+
counted(hold, one, -1);
|
|
42
|
+
if (list.length === 0) hold.waiting.delete(one.node);
|
|
43
|
+
if (one.alarm !== null) hold.gear.timer.cancel(one.alarm);
|
|
44
|
+
one.alarm = null;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const holdAsk = (
|
|
48
|
+
hold ,
|
|
49
|
+
node ,
|
|
50
|
+
post ,
|
|
51
|
+
joined ,
|
|
52
|
+
durable ,
|
|
53
|
+
expire ,
|
|
54
|
+
) => {
|
|
55
|
+
const { timer, time, configuration, limit } = hold.gear;
|
|
56
|
+
const span = spanOf(post.timeout, limit?.('longestTimeout', node) ?? configuration.longestTimeout);
|
|
57
|
+
const deadline = time.steady() + span;
|
|
58
|
+
const one = { node, post, joined, durable, deadline, alarm: null, waiter: post.waiter ?? null };
|
|
59
|
+
const list = hold.waiting.get(node) ?? [];
|
|
60
|
+
list.push(one);
|
|
61
|
+
hold.waiting.set(node, list);
|
|
62
|
+
waitedOn(one);
|
|
63
|
+
counted(hold, one, 1);
|
|
64
|
+
one.alarm = timer.at(one.deadline, () => {
|
|
65
|
+
one.alarm = null;
|
|
66
|
+
unhold(hold, one);
|
|
67
|
+
expire(one);
|
|
68
|
+
});
|
|
69
|
+
return { one, end: () => unhold(hold, one) };
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const letGo = (hold , one ) => unhold(hold, one);
|
|
73
|
+
|
|
74
|
+
export const releaseHeld = (hold , lobe ) => {
|
|
75
|
+
const list = [...(hold.waiting.get(lobe) ?? [])];
|
|
76
|
+
for (const one of list) unhold(hold, one);
|
|
77
|
+
return list;
|
|
78
|
+
};
|