paracosm 0.9.1113 → 0.9.1114
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/README.md +1 -1
- package/dist/cli/verdict-scores.d.ts +2 -1
- package/dist/cli/verdict-scores.d.ts.map +1 -1
- package/dist/cli/verdict-scores.js +2 -1
- package/dist/cli/verdict-scores.js.map +1 -1
- package/dist/dashboard/dist/assets/{index-G-Q1siQW.js → index-D3_eknIb.js} +27 -27
- package/dist/dashboard/dist/assets/index-DrZBEElm.css +1 -0
- package/dist/dashboard/dist/index.html +2 -2
- package/dist/engine/compiler/compile-from-seed.d.ts +32 -8
- package/dist/engine/compiler/compile-from-seed.d.ts.map +1 -1
- package/dist/engine/compiler/compile-from-seed.js +98 -14
- package/dist/engine/compiler/compile-from-seed.js.map +1 -1
- package/dist/engine/compiler/seed-draft-world.d.ts +127 -0
- package/dist/engine/compiler/seed-draft-world.d.ts.map +1 -0
- package/dist/engine/compiler/seed-draft-world.js +479 -0
- package/dist/engine/compiler/seed-draft-world.js.map +1 -0
- package/dist/engine/compiler/state-shape-block.d.ts.map +1 -1
- package/dist/engine/compiler/state-shape-block.js +25 -1
- package/dist/engine/compiler/state-shape-block.js.map +1 -1
- package/dist/engine/compiler/validate.d.ts +27 -2
- package/dist/engine/compiler/validate.d.ts.map +1 -1
- package/dist/engine/compiler/validate.js +121 -2
- package/dist/engine/compiler/validate.js.map +1 -1
- package/dist/engine/types.d.ts +3 -3
- package/package.json +1 -1
- package/dist/dashboard/dist/assets/index-DwkQQHCH.css +0 -1
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
/** Where a metric starts when its draft gives no start and no ceiling, by format. */
|
|
2
|
+
export const DEFAULT_STARTS = { number: 100, percent: 50, currency: 1_000_000 };
|
|
3
|
+
/** The kernel's own starting morale, for a declared `morale` with no usable start. */
|
|
4
|
+
export const MORALE_START = 0.85;
|
|
5
|
+
/**
|
|
6
|
+
* The largest size a start, a floor or a ceiling is held to, and an entry
|
|
7
|
+
* on a count that starts empty, which has no scale to hold it.
|
|
8
|
+
*/
|
|
9
|
+
export const MAX_MAGNITUDE = 1e15;
|
|
10
|
+
/** A default table entry is this share of its score's scale: a twentieth. */
|
|
11
|
+
export const DEFAULT_ENTRY_SHARE = 1 / 20;
|
|
12
|
+
/** No table entry is more than this share of its score's scale: a twelfth. */
|
|
13
|
+
export const MOST_ENTRY_SHARE = 1 / 12;
|
|
14
|
+
/** No table entry is less than this share of its score's scale: a hundredth. */
|
|
15
|
+
export const LEAST_ENTRY_SHARE = 1 / 100;
|
|
16
|
+
/** The smallest entry of any size: the outcome step rounds a change to two decimals. */
|
|
17
|
+
export const SMALLEST_ENTRY = 0.01;
|
|
18
|
+
/** The default entry of a count that starts empty, which has no scale. */
|
|
19
|
+
export const COUNT_FROM_ZERO_ENTRY = 1;
|
|
20
|
+
/** A compiled scenario has at least this many category tables. */
|
|
21
|
+
export const MIN_TABLES = 3;
|
|
22
|
+
/** At most this many of a draft's tables are kept. */
|
|
23
|
+
export const MAX_TABLES = 8;
|
|
24
|
+
/** At most this many of a draft table's entries are kept. */
|
|
25
|
+
export const MAX_DRAFT_ENTRIES = 4;
|
|
26
|
+
/**
|
|
27
|
+
* The categories added, with the default table, while a draft has fewer
|
|
28
|
+
* than {@link MIN_TABLES}: the categories of the Event Director's own
|
|
29
|
+
* canned events, so a director call that fails still lands on a table.
|
|
30
|
+
*/
|
|
31
|
+
export const DEFAULT_CATEGORIES = ['infrastructure', 'resource', 'psychological'];
|
|
32
|
+
/** How many declared scores the header shows. */
|
|
33
|
+
export const HEADER_METRICS = 4;
|
|
34
|
+
const LABEL_MAX = 48;
|
|
35
|
+
const UNIT_MAX = 16;
|
|
36
|
+
const CATEGORY_MAX = 32;
|
|
37
|
+
const DEPARTMENT_ID_MAX = 48;
|
|
38
|
+
/** A number the normalizer computed, held to six decimals. */
|
|
39
|
+
const round6 = (value) => Math.round(value * 1e6) / 1e6;
|
|
40
|
+
const isNumber = (value) => typeof value === 'number' && Number.isFinite(value);
|
|
41
|
+
/**
|
|
42
|
+
* The distance a score can move before something stops it.
|
|
43
|
+
*
|
|
44
|
+
* `morale` has its range, 1. Any other score has the smallest of: its start
|
|
45
|
+
* less its floor (when it starts above one), its ceiling less its start
|
|
46
|
+
* (when it starts under one), and the size of its start (when that is not
|
|
47
|
+
* 0). A count that starts empty (a start of 0, no ceiling) has none.
|
|
48
|
+
*/
|
|
49
|
+
export function scoreScale(id, field) {
|
|
50
|
+
if (id === 'morale')
|
|
51
|
+
return 1;
|
|
52
|
+
const distances = [];
|
|
53
|
+
if (isNumber(field.min) && field.initial > field.min)
|
|
54
|
+
distances.push(field.initial - field.min);
|
|
55
|
+
if (isNumber(field.max) && field.initial < field.max)
|
|
56
|
+
distances.push(field.max - field.initial);
|
|
57
|
+
if (field.initial !== 0)
|
|
58
|
+
distances.push(Math.abs(field.initial));
|
|
59
|
+
return distances.length > 0 ? Math.min(...distances) : undefined;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* What a category table's entry on a score is held to: between a hundredth
|
|
63
|
+
* and a twelfth of the score's scale, with a twentieth as its default, and
|
|
64
|
+
* never under 0.01. A count that starts empty has no scale: its entry is
|
|
65
|
+
* 0.01 or more, 1 by default, and the normalizer holds it to 1e15 in
|
|
66
|
+
* size, as it holds a start.
|
|
67
|
+
*
|
|
68
|
+
* One decision moves a score by its event's outcome and by the department
|
|
69
|
+
* effects the leader adopts. The outcome multiplies a cost by at most 4.81
|
|
70
|
+
* (a bold failure with every modifier against it), and the adopted effects
|
|
71
|
+
* add at most the score's largest entry, so at a twelfth the worst decision
|
|
72
|
+
* moves a score 5.81 twelfths of its scale: under half of it.
|
|
73
|
+
*/
|
|
74
|
+
export function entryBounds(id, field) {
|
|
75
|
+
const scale = scoreScale(id, field);
|
|
76
|
+
if (scale === undefined)
|
|
77
|
+
return { least: SMALLEST_ENTRY, standard: COUNT_FROM_ZERO_ENTRY };
|
|
78
|
+
return {
|
|
79
|
+
least: round6(Math.max(scale * LEAST_ENTRY_SHARE, SMALLEST_ENTRY)),
|
|
80
|
+
most: round6(Math.max(scale * MOST_ENTRY_SHARE, SMALLEST_ENTRY)),
|
|
81
|
+
standard: round6(Math.max(scale * DEFAULT_ENTRY_SHARE, SMALLEST_ENTRY)),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
/** `population` is a head count and `morale` a share, whatever a draft says. */
|
|
85
|
+
function formatOf(metric) {
|
|
86
|
+
if (metric.id === 'population')
|
|
87
|
+
return 'number';
|
|
88
|
+
if (metric.id === 'morale')
|
|
89
|
+
return 'percent';
|
|
90
|
+
return metric.format ?? 'number';
|
|
91
|
+
}
|
|
92
|
+
/** The first of `base`, `base-2`, `base-3`, ... that `taken` does not hold, cut to `max` characters. */
|
|
93
|
+
function firstFree(base, taken, max, startAt) {
|
|
94
|
+
for (let n = startAt;; n++) {
|
|
95
|
+
const suffix = n === 1 ? '' : `-${n}`;
|
|
96
|
+
const candidate = `${base.slice(0, max - suffix.length)}${suffix}`;
|
|
97
|
+
if (!taken.has(candidate))
|
|
98
|
+
return candidate;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
/** A category as a table key: lower case, every run of other characters one hyphen, trimmed, cut to 32. */
|
|
102
|
+
function categoryKey(category) {
|
|
103
|
+
return category
|
|
104
|
+
.toLowerCase()
|
|
105
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
106
|
+
.replace(/^-+|-+$/g, '')
|
|
107
|
+
.slice(0, CATEGORY_MAX)
|
|
108
|
+
.replace(/-+$/, '');
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Turn a draft the draft schema accepted into the scenario JSON
|
|
112
|
+
* `compileScenario` takes, with a note for each default and repair.
|
|
113
|
+
*/
|
|
114
|
+
export function seedDraftToScenarioJson(draft) {
|
|
115
|
+
const notes = [];
|
|
116
|
+
const note = (path, rule, message) => { notes.push({ path, rule, message }); };
|
|
117
|
+
// ---- Ids ------------------------------------------------------------------
|
|
118
|
+
// `constructor` is the one name every object inherits that the id pattern
|
|
119
|
+
// allows; a table keyed by it would read the inherited function. The
|
|
120
|
+
// rename runs first, so a renamed id cannot land on one another metric holds.
|
|
121
|
+
const writtenIds = new Set(draft.metrics.map(m => m.id));
|
|
122
|
+
const renamed = new Map();
|
|
123
|
+
const seenIds = new Set();
|
|
124
|
+
const metrics = [];
|
|
125
|
+
draft.metrics.forEach((metric, index) => {
|
|
126
|
+
let id = metric.id;
|
|
127
|
+
if (id === 'constructor') {
|
|
128
|
+
id = renamed.get('constructor') ?? firstFree('constructor-score', writtenIds, 32, 1);
|
|
129
|
+
if (!renamed.has('constructor')) {
|
|
130
|
+
renamed.set('constructor', id);
|
|
131
|
+
note(`metrics[${index}].id`, 'id-renamed', `metric "constructor" is renamed "${id}": the name is one every object inherits`);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
if (seenIds.has(id)) {
|
|
135
|
+
note(`metrics[${index}].id`, 'id-duplicate', `metric "${metric.id}" is declared twice; the second is dropped`);
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
seenIds.add(id);
|
|
139
|
+
metrics.push({ metric, id, index });
|
|
140
|
+
});
|
|
141
|
+
// A run keys its per-department state by id, so a second department under
|
|
142
|
+
// one id is renamed, which keeps the count the draft gave.
|
|
143
|
+
const departmentIds = new Set(draft.departments.map(d => d.id));
|
|
144
|
+
const usedDepartmentIds = new Set();
|
|
145
|
+
const departments = draft.departments.map((department, index) => {
|
|
146
|
+
let id = department.id;
|
|
147
|
+
if (usedDepartmentIds.has(id)) {
|
|
148
|
+
id = firstFree(department.id, new Set([...departmentIds, ...usedDepartmentIds]), DEPARTMENT_ID_MAX, 2);
|
|
149
|
+
note(`departments[${index}].id`, 'id-renamed', `department "${department.id}" is declared twice; the second is renamed "${id}"`);
|
|
150
|
+
}
|
|
151
|
+
usedDepartmentIds.add(id);
|
|
152
|
+
return { ...department, id };
|
|
153
|
+
});
|
|
154
|
+
// ---- A draft written in fractions -------------------------------------------
|
|
155
|
+
// Decided once, before any start is defaulted: two or more percent metrics
|
|
156
|
+
// other than morale, a start on at least one, and every start given above
|
|
157
|
+
// 0 and under 1. A model that wrote fractions is far likelier than a
|
|
158
|
+
// scenario whose every percentage is under 1 percent.
|
|
159
|
+
const percents = metrics.filter(m => m.id !== 'morale' && formatOf({ id: m.id, format: m.metric.format }) === 'percent');
|
|
160
|
+
const percentStarts = percents.map(m => m.metric.initial).filter(isNumber);
|
|
161
|
+
const fractions = percents.length >= 2 && percentStarts.length >= 1 && percentStarts.every(v => v > 0 && v < 1);
|
|
162
|
+
const percentIds = new Set(percents.map(m => m.id));
|
|
163
|
+
if (fractions) {
|
|
164
|
+
note('metrics', 'fractions', 'every percent start given lies between 0 and 1, so the draft is read as fractions: each percent start and each table entry on a percent metric is multiplied by 100');
|
|
165
|
+
}
|
|
166
|
+
// ---- Each metric's fields ---------------------------------------------------
|
|
167
|
+
const fields = {};
|
|
168
|
+
const definitions = [];
|
|
169
|
+
const lowerIsBetter = new Set();
|
|
170
|
+
for (const { metric, id, index } of metrics) {
|
|
171
|
+
const path = `metrics[${index}]`;
|
|
172
|
+
const format = formatOf({ id, format: metric.format });
|
|
173
|
+
const givenLabel = typeof metric.label === 'string' ? metric.label.trim() : '';
|
|
174
|
+
let label = givenLabel.slice(0, LABEL_MAX).trim();
|
|
175
|
+
if (givenLabel.length < 2) {
|
|
176
|
+
const words = id.replace(/-+/g, ' ').trim();
|
|
177
|
+
label = (words ? words.charAt(0).toUpperCase() + words.slice(1) : id).slice(0, LABEL_MAX).trim();
|
|
178
|
+
note(`${path}.label`, 'default-label', `${id}: no label given; it reads "${label}"`);
|
|
179
|
+
}
|
|
180
|
+
/** A start, a floor or a ceiling, held to 1e15 in size. */
|
|
181
|
+
const held = (value, what) => {
|
|
182
|
+
if (!isNumber(value))
|
|
183
|
+
return undefined;
|
|
184
|
+
if (Math.abs(value) <= MAX_MAGNITUDE)
|
|
185
|
+
return value;
|
|
186
|
+
const moved = Math.sign(value) * MAX_MAGNITUDE;
|
|
187
|
+
note(`${path}.${what}`, 'size-over-limit', `${id}: ${what} ${value} is larger than ${MAX_MAGNITUDE} in size and is moved to ${moved}`);
|
|
188
|
+
return moved;
|
|
189
|
+
};
|
|
190
|
+
let initial = held(metric.initial, 'initial');
|
|
191
|
+
let min = held(metric.min, 'min');
|
|
192
|
+
let max = held(metric.max, 'max');
|
|
193
|
+
let unit = (typeof metric.unit === 'string' ? metric.unit.trim() : '').slice(0, UNIT_MAX).trim();
|
|
194
|
+
if (id === 'population') {
|
|
195
|
+
// The roster is the head count whatever a scenario declares, and a
|
|
196
|
+
// declared ceiling would cap hires.
|
|
197
|
+
if (initial !== undefined || min !== undefined || max !== undefined) {
|
|
198
|
+
note(path, 'population-own', 'population: the head count is the roster, so the draft\'s start and range for it are not kept');
|
|
199
|
+
}
|
|
200
|
+
if (unit === '%' || unit === 'frac')
|
|
201
|
+
unit = '';
|
|
202
|
+
fields[id] = { id, label, unit, type: 'number', initial: draft.setup.defaultPopulation, min: 0, category: 'metric' };
|
|
203
|
+
}
|
|
204
|
+
else if (id === 'morale') {
|
|
205
|
+
// The kernel holds morale from 0 to 1.
|
|
206
|
+
let start = MORALE_START;
|
|
207
|
+
if (initial === undefined) {
|
|
208
|
+
note(`${path}.initial`, 'default-start', `morale: no start given; it starts at ${MORALE_START}`);
|
|
209
|
+
}
|
|
210
|
+
else if (initial >= 0 && initial <= 1) {
|
|
211
|
+
start = initial;
|
|
212
|
+
}
|
|
213
|
+
else if (initial > 1 && initial <= 100) {
|
|
214
|
+
start = round6(initial / 100);
|
|
215
|
+
note(`${path}.initial`, 'morale-in-points', `morale: a start of ${initial} is read as a percentage and held as ${start}`);
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
note(`${path}.initial`, 'start-outside-bounds', `morale: a start of ${initial} is outside 0 to 100; it starts at ${MORALE_START}`);
|
|
219
|
+
}
|
|
220
|
+
fields[id] = { id, label, unit: '%', type: 'number', initial: start, min: 0, max: 1, category: 'metric' };
|
|
221
|
+
}
|
|
222
|
+
else if (format === 'percent') {
|
|
223
|
+
// A percent is held in points, 0 to 100: the outcome step rounds a
|
|
224
|
+
// change to two decimals, which on a 0 to 1 fraction is a whole point.
|
|
225
|
+
if ((min !== undefined && min !== 0) || (max !== undefined && max !== 100)) {
|
|
226
|
+
note(path, 'percent-bounds', `${id}: a percent is held from 0 to 100; the draft's range for it is not kept`);
|
|
227
|
+
}
|
|
228
|
+
if (initial !== undefined && fractions)
|
|
229
|
+
initial = round6(initial * 100);
|
|
230
|
+
if (initial === undefined) {
|
|
231
|
+
initial = DEFAULT_STARTS.percent;
|
|
232
|
+
note(`${path}.initial`, 'default-start', `${id}: no start given; it starts at ${initial}`);
|
|
233
|
+
}
|
|
234
|
+
else if (initial < 0 || initial > 100) {
|
|
235
|
+
const moved = initial < 0 ? 0 : 100;
|
|
236
|
+
note(`${path}.initial`, 'start-outside-bounds', `${id}: a start of ${initial} is outside 0 to 100 and is moved to ${moved}`);
|
|
237
|
+
initial = moved;
|
|
238
|
+
}
|
|
239
|
+
fields[id] = { id, label, unit: '%', type: 'number', initial, min: 0, max: 100, category: 'metric' };
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
// A number or a currency. The format is what the verdict and the
|
|
243
|
+
// header read, so a unit that says percent is dropped.
|
|
244
|
+
if (unit === '%' || unit === 'frac') {
|
|
245
|
+
note(`${path}.unit`, 'unit-dropped', `${id}: unit "${unit}" on a ${format} is dropped`);
|
|
246
|
+
unit = '';
|
|
247
|
+
}
|
|
248
|
+
if (unit === '' && format === 'currency')
|
|
249
|
+
unit = (draft.labels.currency ?? '').trim().slice(0, UNIT_MAX);
|
|
250
|
+
if (min !== undefined && max !== undefined) {
|
|
251
|
+
if (min > max) {
|
|
252
|
+
note(path, 'bounds-swapped', `${id}: floor ${min} is above ceiling ${max}; the two are swapped`);
|
|
253
|
+
[min, max] = [max, min];
|
|
254
|
+
}
|
|
255
|
+
else if (min === max) {
|
|
256
|
+
note(`${path}.max`, 'ceiling-dropped', `${id}: floor and ceiling are both ${min}; the ceiling is dropped`);
|
|
257
|
+
max = undefined;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
if (initial === undefined) {
|
|
261
|
+
if (max !== undefined) {
|
|
262
|
+
// The midpoint of the floor and the ceiling, the floor being 0
|
|
263
|
+
// when none is given; at a ceiling of 0 or under with no floor,
|
|
264
|
+
// the ceiling itself. Between bounds less than a millionth apart
|
|
265
|
+
// the rounded midpoint can fall outside them, so it is held
|
|
266
|
+
// inside.
|
|
267
|
+
if (min !== undefined)
|
|
268
|
+
initial = Math.min(max, Math.max(min, round6((min + max) / 2)));
|
|
269
|
+
else
|
|
270
|
+
initial = max > 0 ? round6(max / 2) : max;
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
const fallback = DEFAULT_STARTS[format];
|
|
274
|
+
initial = min !== undefined && min > fallback ? min : fallback;
|
|
275
|
+
}
|
|
276
|
+
note(`${path}.initial`, 'default-start', `${id}: no start given; it starts at ${initial}`);
|
|
277
|
+
}
|
|
278
|
+
else if (min !== undefined && initial < min) {
|
|
279
|
+
note(`${path}.initial`, 'start-outside-bounds', `${id}: a start of ${initial} is under its floor and is moved to ${min}`);
|
|
280
|
+
initial = min;
|
|
281
|
+
}
|
|
282
|
+
else if (max !== undefined && initial > max) {
|
|
283
|
+
note(`${path}.initial`, 'start-outside-bounds', `${id}: a start of ${initial} is over its ceiling and is moved to ${max}`);
|
|
284
|
+
initial = max;
|
|
285
|
+
}
|
|
286
|
+
// No floor given: 0 for a score that starts at 0 or more. A ceiling of
|
|
287
|
+
// 0 with that floor would pin the score, so it keeps no floor there.
|
|
288
|
+
if (min === undefined && initial >= 0 && (max === undefined || max > 0))
|
|
289
|
+
min = 0;
|
|
290
|
+
fields[id] = {
|
|
291
|
+
id, label, unit, type: 'number', initial,
|
|
292
|
+
...(min !== undefined ? { min } : {}),
|
|
293
|
+
...(max !== undefined ? { max } : {}),
|
|
294
|
+
category: 'metric',
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
if (metric.better === 'lower')
|
|
298
|
+
lowerIsBetter.add(id);
|
|
299
|
+
definitions.push({ id, label, source: `metrics.${id}`, format, ...(metric.better ? { better: metric.better } : {}) });
|
|
300
|
+
}
|
|
301
|
+
// ---- Category tables ----------------------------------------------------------
|
|
302
|
+
/** The declared scores a table may name and must cover: all but the head count. */
|
|
303
|
+
const scored = metrics.map(m => m.id).filter(id => id !== 'population');
|
|
304
|
+
const mayName = new Set([...scored, 'morale']);
|
|
305
|
+
const boundsOf = (id) => entryBounds(id, fields[id] ?? { initial: MORALE_START, min: 0, max: 1 });
|
|
306
|
+
/** A twentieth of the score's scale, in its better direction. */
|
|
307
|
+
const defaultEntry = (id) => (lowerIsBetter.has(id) ? -boundsOf(id).standard : boundsOf(id).standard);
|
|
308
|
+
/** Every declared score but the head count, each at its default entry; morale alone when there is none. */
|
|
309
|
+
const defaultTable = () => {
|
|
310
|
+
const table = {};
|
|
311
|
+
for (const id of scored)
|
|
312
|
+
table[id] = defaultEntry(id);
|
|
313
|
+
if (scored.length === 0)
|
|
314
|
+
table.morale = boundsOf('morale').standard;
|
|
315
|
+
return table;
|
|
316
|
+
};
|
|
317
|
+
// 1. The draft's tables in order, by key; a second table under a key merges into the first.
|
|
318
|
+
const drafted = new Map();
|
|
319
|
+
(draft.effects ?? []).forEach((table, index) => {
|
|
320
|
+
const path = `effects[${index}]`;
|
|
321
|
+
if (!table) {
|
|
322
|
+
note(path, 'table-dropped', `category table ${index + 1} is malformed and is dropped`);
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
let key = categoryKey(table.category) || `category-${index + 1}`;
|
|
326
|
+
if (key === 'constructor')
|
|
327
|
+
key = 'constructor-events';
|
|
328
|
+
if (key !== table.category)
|
|
329
|
+
note(`${path}.category`, 'category-renamed', `category "${table.category}" is keyed "${key}"`);
|
|
330
|
+
if (drafted.has(key))
|
|
331
|
+
note(path, 'tables-merged', `a second table under "${key}" is merged into the first; the first entry for a metric stays`);
|
|
332
|
+
const entries = drafted.get(key) ?? [];
|
|
333
|
+
table.entries.forEach((entry, j) => entries.push({ entry, path: `${path}.entries[${j}]` }));
|
|
334
|
+
drafted.set(key, entries);
|
|
335
|
+
});
|
|
336
|
+
// 2. Each entry: on a declared metric other than the head count, or on morale; not 0; one a metric; inside its bounds; four a table.
|
|
337
|
+
const tables = [];
|
|
338
|
+
for (const [key, entries] of drafted) {
|
|
339
|
+
const table = {};
|
|
340
|
+
const named = new Set();
|
|
341
|
+
for (const { entry, path } of entries) {
|
|
342
|
+
if (!entry) {
|
|
343
|
+
note(path, 'entry-dropped', `an entry of "${key}" is malformed and is dropped`);
|
|
344
|
+
continue;
|
|
345
|
+
}
|
|
346
|
+
const metric = renamed.get(entry.metric) ?? entry.metric;
|
|
347
|
+
if (!mayName.has(metric)) {
|
|
348
|
+
note(path, 'entry-dropped', metric === 'population'
|
|
349
|
+
? `"${key}" names population, which no table moves; the entry is dropped`
|
|
350
|
+
: `"${key}" names "${entry.metric}", which is not a declared metric; the entry is dropped`);
|
|
351
|
+
continue;
|
|
352
|
+
}
|
|
353
|
+
if (!isNumber(entry.change) || entry.change === 0) {
|
|
354
|
+
note(path, 'entry-dropped', `"${key}" changes ${metric} by 0; the entry is dropped`);
|
|
355
|
+
continue;
|
|
356
|
+
}
|
|
357
|
+
if (named.has(metric)) {
|
|
358
|
+
note(path, 'entry-dropped', `"${key}" names ${metric} twice; the second entry is dropped`);
|
|
359
|
+
continue;
|
|
360
|
+
}
|
|
361
|
+
if (named.size >= MAX_DRAFT_ENTRIES) {
|
|
362
|
+
note(path, 'entry-dropped', `"${key}" has more than ${MAX_DRAFT_ENTRIES} entries; the entry on ${metric} is dropped`);
|
|
363
|
+
continue;
|
|
364
|
+
}
|
|
365
|
+
// The sign is the entry's as written: a conversion below can round a
|
|
366
|
+
// small change to 0, and the entry still points the way the draft said.
|
|
367
|
+
const sign = Math.sign(entry.change);
|
|
368
|
+
let size = Math.abs(entry.change);
|
|
369
|
+
if (fractions && percentIds.has(metric))
|
|
370
|
+
size = round6(size * 100);
|
|
371
|
+
if (metric === 'morale' && size > 1 && size <= 100) {
|
|
372
|
+
// The kernel holds morale from 0 to 1, and the draft is asked for a
|
|
373
|
+
// percent's change in points: a change above 1 is read as points,
|
|
374
|
+
// as a morale start is.
|
|
375
|
+
const points = size;
|
|
376
|
+
size = round6(size / 100);
|
|
377
|
+
note(path, 'morale-in-points', `"${key}" changes morale by ${sign * points}, which is read as points and held as ${sign * size}`);
|
|
378
|
+
}
|
|
379
|
+
const { least, most } = boundsOf(metric);
|
|
380
|
+
if (most !== undefined && size > most) {
|
|
381
|
+
note(path, 'entry-above-most', `"${key}" changes ${metric} by ${sign * size}, more than a twelfth of its scale; it is cut to ${sign * most}`);
|
|
382
|
+
size = most;
|
|
383
|
+
}
|
|
384
|
+
else if (most === undefined && size > MAX_MAGNITUDE) {
|
|
385
|
+
// A count that starts empty has no scale to cut an entry to. Held
|
|
386
|
+
// to the size a start is held to, its outcome stays finite.
|
|
387
|
+
note(path, 'size-over-limit', `"${key}" changes ${metric} by ${sign * size}, larger than ${MAX_MAGNITUDE} in size; it is cut to ${sign * MAX_MAGNITUDE}`);
|
|
388
|
+
size = MAX_MAGNITUDE;
|
|
389
|
+
}
|
|
390
|
+
else if (size < least) {
|
|
391
|
+
note(path, 'entry-under-least', `"${key}" changes ${metric} by ${sign * size}, less than a hundredth of its scale; it is raised to ${sign * least}`);
|
|
392
|
+
size = least;
|
|
393
|
+
}
|
|
394
|
+
named.add(metric);
|
|
395
|
+
table[metric] = sign * size;
|
|
396
|
+
}
|
|
397
|
+
tables.push([key, table]);
|
|
398
|
+
}
|
|
399
|
+
// 3. A table left with no entry takes the default table; the first eight tables stay.
|
|
400
|
+
for (const pair of tables) {
|
|
401
|
+
if (Object.keys(pair[1]).length > 0)
|
|
402
|
+
continue;
|
|
403
|
+
pair[1] = defaultTable();
|
|
404
|
+
note('effects', 'table-defaulted', `"${pair[0]}" is left with no entry and takes the default table`);
|
|
405
|
+
}
|
|
406
|
+
for (const [key] of tables.splice(MAX_TABLES)) {
|
|
407
|
+
note('effects', 'table-dropped', `the draft lists more than ${MAX_TABLES} category tables; "${key}" is dropped`);
|
|
408
|
+
}
|
|
409
|
+
// 4. Three tables at least: a turn's two events can then differ from each
|
|
410
|
+
// other and from the category used last turn.
|
|
411
|
+
const drafts = tables.length;
|
|
412
|
+
const added = [];
|
|
413
|
+
for (const category of DEFAULT_CATEGORIES) {
|
|
414
|
+
if (tables.length >= MIN_TABLES)
|
|
415
|
+
break;
|
|
416
|
+
if (tables.some(([key]) => key === category))
|
|
417
|
+
continue;
|
|
418
|
+
tables.push([category, defaultTable()]);
|
|
419
|
+
added.push(category);
|
|
420
|
+
}
|
|
421
|
+
if (added.length > 0) {
|
|
422
|
+
note('effects', drafts === 0 ? 'default-tables' : 'tables-added', drafts === 0
|
|
423
|
+
? `the draft lists no category table; it gets ${added.join(', ')}, each moving every declared score a twentieth of its scale`
|
|
424
|
+
: `the draft lists ${drafts} category table${drafts === 1 ? '' : 's'}; ${added.join(', ')} ${added.length === 1 ? 'is' : 'are'} added with the default table`);
|
|
425
|
+
}
|
|
426
|
+
// The object form, as the bundled scenarios write it. An object lists
|
|
427
|
+
// keys that read as whole numbers first, so the first and the last table
|
|
428
|
+
// are read from the object, which is what a run reads.
|
|
429
|
+
const effects = {};
|
|
430
|
+
for (const [key, table] of tables)
|
|
431
|
+
effects[key] = table;
|
|
432
|
+
const keys = Object.keys(effects);
|
|
433
|
+
const names = (key, id) => Object.prototype.hasOwnProperty.call(effects[key], id);
|
|
434
|
+
// 5. A declared score no table names goes into every table.
|
|
435
|
+
for (const id of scored) {
|
|
436
|
+
if (keys.some(key => names(key, id)))
|
|
437
|
+
continue;
|
|
438
|
+
for (const key of keys)
|
|
439
|
+
effects[key][id] = defaultEntry(id);
|
|
440
|
+
note('effects', 'score-added-to-every-table', `no category table names ${id}; it is added to every table at ${defaultEntry(id)}`);
|
|
441
|
+
}
|
|
442
|
+
// 6. A milestone takes the first table on turn 1 and the last on the
|
|
443
|
+
// final turn, so in a run of two turns those are the only tables
|
|
444
|
+
// applied: between them they name every declared score.
|
|
445
|
+
const first = keys[0];
|
|
446
|
+
const last = keys[keys.length - 1];
|
|
447
|
+
for (const id of scored) {
|
|
448
|
+
if (names(first, id) || names(last, id))
|
|
449
|
+
continue;
|
|
450
|
+
effects[last][id] = defaultEntry(id);
|
|
451
|
+
note('effects', 'score-added-to-last-table', `neither the first table ("${first}") nor the last ("${last}") names ${id}; it is added to "${last}" at ${defaultEntry(id)}`);
|
|
452
|
+
}
|
|
453
|
+
const worldMetrics = {};
|
|
454
|
+
for (const { id } of metrics)
|
|
455
|
+
worldMetrics[id] = fields[id];
|
|
456
|
+
// A fixed key order: the hook cache hashes this JSON's text.
|
|
457
|
+
const scenario = {
|
|
458
|
+
id: draft.id,
|
|
459
|
+
labels: { ...draft.labels },
|
|
460
|
+
...(draft.theme !== undefined ? { theme: draft.theme } : {}),
|
|
461
|
+
setup: { ...draft.setup },
|
|
462
|
+
world: { metrics: worldMetrics, capacities: {}, statuses: {}, politics: {}, environment: {} },
|
|
463
|
+
departments,
|
|
464
|
+
metrics: definitions,
|
|
465
|
+
effects,
|
|
466
|
+
ui: {
|
|
467
|
+
headerMetrics: definitions
|
|
468
|
+
.filter(d => d.id !== 'population' && d.id !== 'morale')
|
|
469
|
+
.slice(0, HEADER_METRICS)
|
|
470
|
+
.map(d => ({ id: d.id, format: d.format })),
|
|
471
|
+
},
|
|
472
|
+
knowledge: {
|
|
473
|
+
topics: {},
|
|
474
|
+
categoryMapping: Object.fromEntries(keys.map(key => [key, []])),
|
|
475
|
+
},
|
|
476
|
+
};
|
|
477
|
+
return { scenario, notes };
|
|
478
|
+
}
|
|
479
|
+
//# sourceMappingURL=seed-draft-world.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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
{"version":3,"file":"state-shape-block.d.ts","sourceRoot":"","sources":["../../../src/engine/compiler/state-shape-block.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAgCH,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAmClF"}
|
|
@@ -18,6 +18,25 @@ function keys(bag) {
|
|
|
18
18
|
function listOrNone(ks) {
|
|
19
19
|
return ks.length ? ks.join(', ') : '(none declared)';
|
|
20
20
|
}
|
|
21
|
+
/** A key a hook can read as `state.<bag>.<key>`. */
|
|
22
|
+
const IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
|
|
23
|
+
/**
|
|
24
|
+
* One more rule, only for a scenario that declares a key that is not a
|
|
25
|
+
* JavaScript identifier (a scenario compiled from a prompt declares
|
|
26
|
+
* kebab-case keys): `state.metrics.soil-health` is a subtraction that
|
|
27
|
+
* throws. Its example is the first such key, in its own bag. A scenario
|
|
28
|
+
* whose keys are all identifiers gets no line, so its block is unchanged.
|
|
29
|
+
*/
|
|
30
|
+
function bracketRule(bags) {
|
|
31
|
+
for (const [bag, ks] of bags) {
|
|
32
|
+
const key = ks.find(k => !IDENTIFIER.test(k));
|
|
33
|
+
if (key === undefined)
|
|
34
|
+
continue;
|
|
35
|
+
const quoted = key.replace(/\\/g, '\\\\').replace(/'/g, "\\'");
|
|
36
|
+
return `\n- A key that is not a plain identifier is read with brackets: state.${bag}['${quoted}'].`;
|
|
37
|
+
}
|
|
38
|
+
return '';
|
|
39
|
+
}
|
|
21
40
|
export function buildStateShapeBlock(scenarioJson) {
|
|
22
41
|
const world = (scenarioJson.world ?? {});
|
|
23
42
|
const labels = (scenarioJson.labels ?? {});
|
|
@@ -43,7 +62,12 @@ state.agents = Array<{ core, health, career, social, narrative, hexaco, promotio
|
|
|
43
62
|
state.metadata = { simulationId, leaderId, seed, startTime, currentTime, currentTurn }
|
|
44
63
|
|
|
45
64
|
RULES:
|
|
46
|
-
- Access pattern is state.<bag>.<key> — flat, never nested. state.metrics.<key> is always a number
|
|
65
|
+
- Access pattern is state.<bag>.<key> — flat, never nested. state.metrics.<key> is always a number.${bracketRule([
|
|
66
|
+
['metrics', systemsKeys],
|
|
67
|
+
['politics', politicsKeys],
|
|
68
|
+
['statuses', statusesKeys],
|
|
69
|
+
['environment', environmentKeys],
|
|
70
|
+
])}
|
|
47
71
|
- Only reference keys in the declared lists above. Unknown keys are undefined and will throw on .toFixed() / nested property access. Defensive access like \`(state.metrics.foo ?? 0)\` is safer than bare \`state.metrics.foo\`.
|
|
48
72
|
- Time is measured in ${timeUnit} units (plural: ${timeUnitPlural}). Use that vocabulary in any user-visible strings.`;
|
|
49
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-shape-block.js","sourceRoot":"","sources":["../../../src/engine/compiler/state-shape-block.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,SAAS,IAAI,CAAC,GAA0C;IACtD,OAAO,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACrC,CAAC;AAED,SAAS,UAAU,CAAC,EAAY;IAC9B,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,YAAqC;IACxE,MAAM,KAAK,GAAG,CAAC,YAAY,CAAC,KAAK,IAAI,EAAE,CAA0D,CAAC;IAClG,MAAM,MAAM,GAAG,CAAC,YAAY,CAAC,MAAM,IAAI,EAAE,CAA2D,CAAC;IACrG,MAAM,QAAQ,GAAG,MAAM,CAAC,YAAY,IAAI,MAAM,CAAC;IAC/C,MAAM,cAAc,GAAG,MAAM,CAAC,kBAAkB,IAAI,OAAO,CAAC;IAE5D,iFAAiF;IACjF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EAAE,YAAY,CAAC;QAC1B,CAAC,UAAU,EAAE,YAAY,CAAC;QAC1B,CAAC,aAAa,EAAE,eAAe,CAAC;KACjC,CAAC;;wBAEoB,QAAQ,mBAAmB,cAAc,qDAAqD,CAAC;AACvH,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Validation harness for generated scenario hooks
|
|
3
|
-
*
|
|
2
|
+
* Validation harness for generated scenario hooks, and the check a
|
|
3
|
+
* scenario compiled from a seed draft is held to.
|
|
4
|
+
* Each hook validator tests a generated hook against synthetic fixtures
|
|
4
5
|
* to verify it produces correct output shapes and does not throw.
|
|
5
6
|
*/
|
|
6
7
|
import type { ScenarioHooks } from '../types.js';
|
|
@@ -34,4 +35,28 @@ export declare function validateReactionContext(fn: ScenarioHooks['reactionConte
|
|
|
34
35
|
ok: boolean;
|
|
35
36
|
error?: string;
|
|
36
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* Hold a scenario to the rules of a scenario compiled from a seed draft
|
|
40
|
+
* (`seedDraftToScenarioJson`): every declared score has a world field with
|
|
41
|
+
* a finite start inside its bounds; no start, floor or ceiling is larger
|
|
42
|
+
* than 1e15 in size; there are three category tables or more, with the
|
|
43
|
+
* same keys as `knowledge.categoryMapping`; every declared score other than
|
|
44
|
+
* the head count is named by a table, and by the first table or the last
|
|
45
|
+
* (a milestone takes those two, so a run of two turns applies no other);
|
|
46
|
+
* every entry is on a declared score or on `morale`, never on the head
|
|
47
|
+
* count, is not 0, is no larger than 1e15 in size and lies inside its
|
|
48
|
+
* score's bounds; and the header names declared scores.
|
|
49
|
+
*
|
|
50
|
+
* It reads `effects` in either form: the object form a draft JSON carries,
|
|
51
|
+
* or the array form of a compiled package, whose first element is the one
|
|
52
|
+
* a run applies. It changes nothing. `compileFromSeed` prints what it
|
|
53
|
+
* reports and compiles on: an error here is a fault in the normalizer, and
|
|
54
|
+
* a compile never fails for one. It is not for a hand-written scenario,
|
|
55
|
+
* which follows its author's rules: Mars Genesis adds 2 habitat modules to
|
|
56
|
+
* a start of 3.
|
|
57
|
+
*/
|
|
58
|
+
export declare function validateSeedWorld(scenarioJson: Record<string, unknown>): {
|
|
59
|
+
ok: boolean;
|
|
60
|
+
errors: string[];
|
|
61
|
+
};
|
|
37
62
|
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/engine/compiler/validate.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/engine/compiler/validate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAA0B,aAAa,EAAE,MAAM,aAAa,CAAC;AAezE,2FAA2F;AAC3F,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,aAAa,CAAC,iBAAiB,CAAC,GAAG;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAsB/G;AAED,gFAAgF;AAChF,wBAAgB,4BAA4B,CAAC,EAAE,EAAE,aAAa,CAAC,sBAAsB,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAa9I;AAED,wEAAwE;AACxE,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,aAAa,CAAC,mBAAmB,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAoB5H;AAED,sEAAsE;AACtE,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,aAAa,CAAC,iBAAiB,CAAC,GAAG;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAsBzG;AAED,sGAAsG;AACtG,wBAAgB,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