paracosm 0.9.1109 → 0.9.1112
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/persisted-compiled-scenarios.d.ts +30 -4
- package/dist/cli/persisted-compiled-scenarios.d.ts.map +1 -1
- package/dist/cli/persisted-compiled-scenarios.js +63 -27
- package/dist/cli/persisted-compiled-scenarios.js.map +1 -1
- package/dist/dashboard/dist/assets/{index-DpBAMPda.js → index-LH3rSVns.js} +1 -1
- package/dist/dashboard/dist/index.html +1 -1
- package/dist/engine/compiler/cache.d.ts.map +1 -1
- package/dist/engine/compiler/cache.js +21 -2
- package/dist/engine/compiler/cache.js.map +1 -1
- package/dist/engine/compiler/generate-politics.d.ts.map +1 -1
- package/dist/engine/compiler/generate-politics.js +53 -5
- package/dist/engine/compiler/generate-politics.js.map +1 -1
- package/dist/engine/compiler/scenario-fixture.d.ts +4 -3
- package/dist/engine/compiler/scenario-fixture.d.ts.map +1 -1
- package/dist/engine/compiler/scenario-fixture.js +5 -7
- package/dist/engine/compiler/scenario-fixture.js.map +1 -1
- package/dist/runtime/orchestrator/commander-policy.d.ts +18 -1
- package/dist/runtime/orchestrator/commander-policy.d.ts.map +1 -1
- package/dist/runtime/orchestrator/commander-policy.js +24 -0
- package/dist/runtime/orchestrator/commander-policy.js.map +1 -1
- package/dist/runtime/orchestrator/index.d.ts.map +1 -1
- package/dist/runtime/orchestrator/index.js +2 -6
- package/dist/runtime/orchestrator/index.js.map +1 -1
- package/dist/server/server-app.d.ts.map +1 -1
- package/dist/server/server-app.js +41 -12
- package/dist/server/server-app.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -461,7 +461,7 @@ Programmatic surfaces: `paracosm` root (`run`, `runMany`, `WorldModel`, `compile
|
|
|
461
461
|
|
|
462
462
|
For non-SSE consumers there's `POST /simulate` (gated on `PARACOSM_ENABLE_SIMULATE_ENDPOINT=true`) and nine read-and-replay routes under `/api/v1/*`. Wire-level details: [`docs/HTTP_API.md`](docs/HTTP_API.md).
|
|
463
463
|
|
|
464
|
-
Storage: SQLite through `@framers/sql-storage-adapter` (better-sqlite3, or sql.js when the native module cannot load). Run history (Library) lives in `data/runs.db` under `APP_DIR`, the working directory when unset (`PARACOSM_RUN_HISTORY_DB_PATH` moves it), and saved sessions (Load menu) in `data/sessions.db`; `STORAGE_ADAPTER` and `DATABASE_URL` have no effect on either. Admin write routes (`/admin/sessions/save`, `/admin/data/wipe`) require both `ADMIN_WRITE=true` and an `ADMIN_TOKEN` bearer; off by default.
|
|
464
|
+
Storage: SQLite through `@framers/sql-storage-adapter` (better-sqlite3, or sql.js when the native module cannot load). Run history (Library) lives in `data/runs.db` under `APP_DIR`, the working directory when unset (`PARACOSM_RUN_HISTORY_DB_PATH` moves it), and saved sessions (Load menu) in `data/sessions.db`; `STORAGE_ADAPTER` and `DATABASE_URL` have no effect on either. Admin write routes (`/admin/sessions/save`, `/admin/data/wipe`, `DELETE /admin/scenarios/:id`) and the disk write of `POST /scenario/store` (`saveToDisk: true`) require both `ADMIN_WRITE=true` and an `ADMIN_TOKEN` bearer in the `X-Admin-Token` header; off by default.
|
|
465
465
|
|
|
466
466
|
---
|
|
467
467
|
|
|
@@ -36,6 +36,27 @@ export interface PersistedCompiledDraft {
|
|
|
36
36
|
draft: Record<string, unknown>;
|
|
37
37
|
meta: PersistedCompiledMeta;
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* The one pattern a scenario id must match to name a file: a letter or
|
|
41
|
+
* digit, then up to 127 letters, digits, hyphens or underscores. An id
|
|
42
|
+
* with a path separator, a dot, a percent sign, a null byte or anything
|
|
43
|
+
* else outside that set never names a file.
|
|
44
|
+
*/
|
|
45
|
+
export declare const SCENARIO_ID_PATTERN: RegExp;
|
|
46
|
+
/** {@link SCENARIO_ID_PATTERN} in words, for refusals. */
|
|
47
|
+
export declare const SCENARIO_ID_RULE = "a scenario id that names a file is 1 to 128 letters, digits, hyphens or underscores, starting with a letter or digit";
|
|
48
|
+
/**
|
|
49
|
+
* Whether a value is a scenario id that may name a file. The persist and
|
|
50
|
+
* delete paths here, the boot loader and the scenario store's disk write
|
|
51
|
+
* all run this gate before touching the file system.
|
|
52
|
+
*/
|
|
53
|
+
export declare function isSafeScenarioId(id: unknown): id is string;
|
|
54
|
+
/**
|
|
55
|
+
* The path of `<id>.json` directly inside `dir`, or `null` when the id
|
|
56
|
+
* fails {@link isSafeScenarioId} or the resolved path is anything other
|
|
57
|
+
* than that one file name inside `dir`.
|
|
58
|
+
*/
|
|
59
|
+
export declare function scenarioJsonPath(dir: string, id: unknown): string | null;
|
|
39
60
|
/**
|
|
40
61
|
* Result of a successful persist. The on-disk value of `compiledAt`
|
|
41
62
|
* is the canonical source of truth; in-memory callers reflect it back
|
|
@@ -61,11 +82,16 @@ export interface PersistResult {
|
|
|
61
82
|
*/
|
|
62
83
|
export declare function persistCompiledScenario(scenarioDir: string, scenario: ScenarioPackage, seedText: string | null): PersistResult | null;
|
|
63
84
|
/**
|
|
64
|
-
* Read
|
|
65
|
-
*
|
|
66
|
-
*
|
|
85
|
+
* Read the compiled-draft JSON files in the persistence dir, newest
|
|
86
|
+
* first by mtime, and return at most `cap` of them
|
|
87
|
+
* ({@link COMPILED_SCENARIOS_CAP} by default, the number
|
|
88
|
+
* {@link persistCompiledScenario} keeps), since the server compiles
|
|
89
|
+
* every draft returned. Once `cap` drafts are read the rest are left
|
|
90
|
+
* unread, in one log line. Malformed files and files whose id fails
|
|
91
|
+
* {@link isSafeScenarioId} are skipped with a line naming the file;
|
|
92
|
+
* one bad entry never blocks the rest of the catalog from loading.
|
|
67
93
|
*/
|
|
68
|
-
export declare function loadPersistedCompiledDrafts(scenarioDir: string): PersistedCompiledDraft[];
|
|
94
|
+
export declare function loadPersistedCompiledDrafts(scenarioDir: string, cap?: number): PersistedCompiledDraft[];
|
|
69
95
|
/**
|
|
70
96
|
* Remove a persisted draft by id. Returns true when a file was actually
|
|
71
97
|
* deleted, false when no matching file existed or the id failed
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persisted-compiled-scenarios.d.ts","sourceRoot":"","sources":["../../src/cli/persisted-compiled-scenarios.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,aAAa,CAAC;AAE1C;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB;+DAC2D;IAC3D,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,iEAAiE;AACjE,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX;6DACyD;IACzD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,IAAI,EAAE,qBAAqB,CAAC;CAC7B;
|
|
1
|
+
{"version":3,"file":"persisted-compiled-scenarios.d.ts","sourceRoot":"","sources":["../../src/cli/persisted-compiled-scenarios.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,aAAa,CAAC;AAE1C;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB;+DAC2D;IAC3D,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,iEAAiE;AACjE,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX;6DACyD;IACzD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,IAAI,EAAE,qBAAqB,CAAC;CAC7B;AAoBD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,QAAsC,CAAC;AAEvE,0DAA0D;AAC1D,eAAO,MAAM,gBAAgB,yHAC2F,CAAC;AAEzH;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,OAAO,GAAG,EAAE,IAAI,MAAM,CAE1D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAKxE;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,qBAAqB,CAAC;CAC7B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,aAAa,GAAG,IAAI,CAwBtB;AAED;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,MAAM,EACnB,GAAG,GAAE,MAA+B,GACnC,sBAAsB,EAAE,CAgD1B;AA4BD;;;;;;;;;;;GAWG;AACH,wBAAgB,+BAA+B,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAkBxF"}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* @module paracosm/cli/persisted-compiled-scenarios
|
|
19
19
|
*/
|
|
20
20
|
import { readdirSync, readFileSync, writeFileSync, mkdirSync, existsSync, unlinkSync, statSync, } from 'node:fs';
|
|
21
|
-
import { resolve, sep } from 'node:path';
|
|
21
|
+
import { relative, resolve, sep } from 'node:path';
|
|
22
22
|
/**
|
|
23
23
|
* Subdirectory under `scenarios/` where compile-from-seed scenarios
|
|
24
24
|
* get auto-persisted. Kept separate from `scenarios/` proper so
|
|
@@ -52,14 +52,33 @@ function stripHooks(scenario) {
|
|
|
52
52
|
return rest;
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* path
|
|
58
|
-
*
|
|
59
|
-
* persist + delete paths run this gate before touching the filesystem.
|
|
55
|
+
* The one pattern a scenario id must match to name a file: a letter or
|
|
56
|
+
* digit, then up to 127 letters, digits, hyphens or underscores. An id
|
|
57
|
+
* with a path separator, a dot, a percent sign, a null byte or anything
|
|
58
|
+
* else outside that set never names a file.
|
|
60
59
|
*/
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
export const SCENARIO_ID_PATTERN = /^[a-zA-Z0-9][a-zA-Z0-9_-]{0,127}$/;
|
|
61
|
+
/** {@link SCENARIO_ID_PATTERN} in words, for refusals. */
|
|
62
|
+
export const SCENARIO_ID_RULE = 'a scenario id that names a file is 1 to 128 letters, digits, hyphens or underscores, starting with a letter or digit';
|
|
63
|
+
/**
|
|
64
|
+
* Whether a value is a scenario id that may name a file. The persist and
|
|
65
|
+
* delete paths here, the boot loader and the scenario store's disk write
|
|
66
|
+
* all run this gate before touching the file system.
|
|
67
|
+
*/
|
|
68
|
+
export function isSafeScenarioId(id) {
|
|
69
|
+
return typeof id === 'string' && SCENARIO_ID_PATTERN.test(id);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* The path of `<id>.json` directly inside `dir`, or `null` when the id
|
|
73
|
+
* fails {@link isSafeScenarioId} or the resolved path is anything other
|
|
74
|
+
* than that one file name inside `dir`.
|
|
75
|
+
*/
|
|
76
|
+
export function scenarioJsonPath(dir, id) {
|
|
77
|
+
if (!isSafeScenarioId(id))
|
|
78
|
+
return null;
|
|
79
|
+
const root = resolve(dir);
|
|
80
|
+
const filePath = resolve(root, `${id}.json`);
|
|
81
|
+
return relative(root, filePath) === `${id}.json` ? filePath : null;
|
|
63
82
|
}
|
|
64
83
|
/**
|
|
65
84
|
* Save a compile-from-seed scenario to disk. Caller passes the fully-
|
|
@@ -100,36 +119,53 @@ export function persistCompiledScenario(scenarioDir, scenario, seedText) {
|
|
|
100
119
|
}
|
|
101
120
|
}
|
|
102
121
|
/**
|
|
103
|
-
* Read
|
|
104
|
-
*
|
|
105
|
-
*
|
|
122
|
+
* Read the compiled-draft JSON files in the persistence dir, newest
|
|
123
|
+
* first by mtime, and return at most `cap` of them
|
|
124
|
+
* ({@link COMPILED_SCENARIOS_CAP} by default, the number
|
|
125
|
+
* {@link persistCompiledScenario} keeps), since the server compiles
|
|
126
|
+
* every draft returned. Once `cap` drafts are read the rest are left
|
|
127
|
+
* unread, in one log line. Malformed files and files whose id fails
|
|
128
|
+
* {@link isSafeScenarioId} are skipped with a line naming the file;
|
|
129
|
+
* one bad entry never blocks the rest of the catalog from loading.
|
|
106
130
|
*/
|
|
107
|
-
export function loadPersistedCompiledDrafts(scenarioDir) {
|
|
131
|
+
export function loadPersistedCompiledDrafts(scenarioDir, cap = COMPILED_SCENARIOS_CAP) {
|
|
108
132
|
const dir = compiledDir(scenarioDir);
|
|
109
133
|
if (!existsSync(dir))
|
|
110
134
|
return [];
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
continue;
|
|
135
|
+
const files = readdirSync(dir, { withFileTypes: true })
|
|
136
|
+
.filter((entry) => entry.isFile() && entry.name.endsWith('.json'))
|
|
137
|
+
.map((entry) => {
|
|
115
138
|
const filePath = resolve(dir, entry.name);
|
|
139
|
+
let mtimeMs = 0;
|
|
140
|
+
try {
|
|
141
|
+
mtimeMs = statSync(filePath).mtimeMs;
|
|
142
|
+
}
|
|
143
|
+
catch { /* sorts last; the read below reports it */ }
|
|
144
|
+
return { name: entry.name, filePath, mtimeMs };
|
|
145
|
+
})
|
|
146
|
+
.sort((a, b) => b.mtimeMs - a.mtimeMs);
|
|
147
|
+
const out = [];
|
|
148
|
+
for (let index = 0; index < files.length; index += 1) {
|
|
149
|
+
const { name, filePath, mtimeMs } = files[index];
|
|
150
|
+
if (out.length >= cap) {
|
|
151
|
+
console.warn(`[scenarios] stopped loading persisted compiled drafts at the cap of ${cap}; ` +
|
|
152
|
+
`${files.length - index} older draft file(s) left unread`);
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
116
155
|
try {
|
|
117
156
|
const raw = JSON.parse(readFileSync(filePath, 'utf-8'));
|
|
118
|
-
const id =
|
|
119
|
-
if (
|
|
157
|
+
const id = raw.id;
|
|
158
|
+
if (id === undefined || id === null || id === '')
|
|
159
|
+
continue;
|
|
160
|
+
if (!isSafeScenarioId(id)) {
|
|
161
|
+
console.warn(`[scenarios] skipping persisted draft ${JSON.stringify(name)}: its id is not a plain scenario id`);
|
|
120
162
|
continue;
|
|
163
|
+
}
|
|
121
164
|
const persistMeta = (raw._persistMeta ?? {});
|
|
122
165
|
// Fall back to file mtime when the on-disk metadata predates the
|
|
123
166
|
// _persistMeta field (e.g. user manually dropped a JSON in this
|
|
124
167
|
// dir without going through persistCompiledScenario).
|
|
125
|
-
const fallbackCompiledAt = (()
|
|
126
|
-
try {
|
|
127
|
-
return new Date(statSync(filePath).mtimeMs).toISOString();
|
|
128
|
-
}
|
|
129
|
-
catch {
|
|
130
|
-
return new Date(0).toISOString();
|
|
131
|
-
}
|
|
132
|
-
})();
|
|
168
|
+
const fallbackCompiledAt = new Date(mtimeMs).toISOString();
|
|
133
169
|
const meta = {
|
|
134
170
|
compiledAt: typeof persistMeta.compiledAt === 'string' ? persistMeta.compiledAt : fallbackCompiledAt,
|
|
135
171
|
seedText: typeof persistMeta.seedText === 'string' ? persistMeta.seedText : null,
|
|
@@ -140,7 +176,7 @@ export function loadPersistedCompiledDrafts(scenarioDir) {
|
|
|
140
176
|
out.push({ id, draft, meta });
|
|
141
177
|
}
|
|
142
178
|
catch (err) {
|
|
143
|
-
console.warn(`[scenarios] skipping unreadable draft ${
|
|
179
|
+
console.warn(`[scenarios] skipping unreadable draft ${name}:`, err);
|
|
144
180
|
}
|
|
145
181
|
}
|
|
146
182
|
return out;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persisted-compiled-scenarios.js","sourceRoot":"","sources":["../../src/cli/persisted-compiled-scenarios.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EACL,WAAW,EACX,YAAY,EACZ,aAAa,EACb,SAAS,EACT,UAAU,EACV,UAAU,EACV,QAAQ,GACT,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"persisted-compiled-scenarios.js","sourceRoot":"","sources":["../../src/cli/persisted-compiled-scenarios.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EACL,WAAW,EACX,YAAY,EACZ,aAAa,EACb,SAAS,EACT,UAAU,EACV,UAAU,EACV,QAAQ,GACT,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAGnD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC;AAE1C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAyBzC,iEAAiE;AACjE,SAAS,WAAW,CAAC,WAAmB;IACtC,OAAO,OAAO,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;AAC/C,CAAC;AAED;;;;;;GAMG;AACH,SAAS,UAAU,CAAC,QAAyB;IAC3C,MAAM,GAAG,GAAG,QAA8C,CAAC;IAC3D,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,GAAG,CAAC;IACvC,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,mCAAmC,CAAC;AAEvE,0DAA0D;AAC1D,MAAM,CAAC,MAAM,gBAAgB,GAC3B,sHAAsH,CAAC;AAEzH;;;;GAIG;AAC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