@nervur.org/genome 0.37.7 → 0.37.9

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.
@@ -14,7 +14,16 @@ import { nobleCrypto } from '#quo';
14
14
  import { admits, isFields, } from '#standard';
15
15
  import { laidOf, withFaculties } from './laid.js';
16
16
  import { genomeCodec } from '../../cage/codec/index.js';
17
- import { BOOT_KEY, clockOf, configurationOf, passing, seeded, startedOn, } from '../core/index.js';
17
+ import {
18
+ BOOT_KEY,
19
+ clockOf,
20
+ configurationOf,
21
+ freshSeed,
22
+ passing,
23
+ seeded,
24
+ startedOn,
25
+
26
+ } from '../core/index.js';
18
27
  import { memoryPages, } from '../pages/index.js';
19
28
  import { puppetEngine, } from '../puppet/index.js';
20
29
  import { genomeQueues } from '../../genome/queues/index.js';
@@ -107,7 +116,7 @@ const fieldOf = (data , key ) => (isFields(data) ? (data[key]
107
116
 
108
117
 
109
118
 
110
-
119
+
111
120
 
112
121
 
113
122
 
@@ -205,7 +214,7 @@ const answered = (method , answer ) => {
205
214
  };
206
215
 
207
216
  export const rigOver = async (wasm , faculties , options = {}) => {
208
- const { seed = 1, memory = memoryPages(), init = { kind: 'first-install' } } = options;
217
+ const { seed = freshSeed(), memory = memoryPages(), init = { kind: 'first-install' } } = options;
209
218
  const clock = clockOf();
210
219
  if (options.wall !== undefined) clock.setWall(options.wall);
211
220
  const { carriers, door, vitals, hearing } = options;
@@ -8,7 +8,7 @@ import { CONSOLE, SCREEN, } from '../../genome/presence/index
8
8
  import { KIT_SKINS, } from './skins.js';
9
9
  import { consoleHalf, } from './console-half.js';
10
10
  import { screenHalf, } from './screen-half.js';
11
- import { BOOT_KEY, clockOf, configurationOf, passing, seeded, startedOn, WASM } from '../core/index.js';
11
+ import { BOOT_KEY, clockOf, configurationOf, freshSeed, passing, seeded, startedOn, WASM } from '../core/index.js';
12
12
  import { startOn, } from '../organism/forms.js';
13
13
  import { fillsOf, heldCarriers, startOf, } from '../organism/rig.js';
14
14
  import { memoryPages, } from '../pages/index.js';
@@ -98,15 +98,11 @@ export const DESKTOP = desktopOf(KIT_SKINS);
98
98
 
99
99
  const stood = new WeakMap ();
100
100
 
101
- const FIRST_SEED = 1000;
102
- let homes = 0;
103
-
104
101
  const chanceOn = (memory , seed ) => {
105
102
  const held = stood.get(memory);
106
103
  if (held !== undefined) return held;
107
104
  const draws = [];
108
- homes += 1;
109
- const drawn = seeded(seed ?? FIRST_SEED + homes);
105
+ const drawn = seeded(seed ?? freshSeed());
110
106
  const chance = {
111
107
  draw: (length) => {
112
108
  const bytes = drawn.draw(length);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nervur.org/genome",
3
- "version": "0.37.7",
3
+ "version": "0.37.9",
4
4
  "description": "What every Nervur organism is, on every host: the brain, the lobes and their engine, the store, Quo, and the seams a host fills. 0.x, unstable.",
5
5
  "keywords": [
6
6
  "agents",
@@ -1,2 +1,2 @@
1
1
  // SPDX-License-Identifier: FSL-1.1-ALv2
2
- export const GENOME_VERSION = '0.37.7';
2
+ export const GENOME_VERSION = '0.37.9';