paracosm 0.9.1122 → 0.9.1124
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/pair-runner.d.ts +6 -2
- package/dist/cli/pair-runner.d.ts.map +1 -1
- package/dist/cli/pair-runner.js +12 -7
- package/dist/cli/pair-runner.js.map +1 -1
- package/dist/cli/sim-config.d.ts +10 -0
- package/dist/cli/sim-config.d.ts.map +1 -1
- package/dist/cli/sim-config.js +16 -1
- package/dist/cli/sim-config.js.map +1 -1
- package/dist/dashboard/landing.html +1 -0
- package/dist/engine/compiler/cache.d.ts +5 -0
- package/dist/engine/compiler/cache.d.ts.map +1 -1
- package/dist/engine/compiler/cache.js +5 -0
- package/dist/engine/compiler/cache.js.map +1 -1
- package/dist/engine/compiler/index.d.ts.map +1 -1
- package/dist/engine/compiler/index.js +34 -1
- package/dist/engine/compiler/index.js.map +1 -1
- package/dist/engine/compiler/own-context.d.ts +71 -0
- package/dist/engine/compiler/own-context.d.ts.map +1 -0
- package/dist/engine/compiler/own-context.js +280 -0
- package/dist/engine/compiler/own-context.js.map +1 -0
- package/dist/engine/compiler/sandbox-runner.d.ts +15 -11
- package/dist/engine/compiler/sandbox-runner.d.ts.map +1 -1
- package/dist/engine/compiler/sandbox-runner.js +66 -179
- package/dist/engine/compiler/sandbox-runner.js.map +1 -1
- package/dist/runtime/orchestrator/emergent-setup.d.ts.map +1 -1
- package/dist/runtime/orchestrator/emergent-setup.js +8 -1
- package/dist/runtime/orchestrator/emergent-setup.js.map +1 -1
- package/dist/runtime/orchestrator/forge-guidance.js +1 -1
- package/dist/runtime/orchestrator/forged-code-executor.d.ts +53 -0
- package/dist/runtime/orchestrator/forged-code-executor.d.ts.map +1 -0
- package/dist/runtime/orchestrator/forged-code-executor.js +85 -0
- package/dist/runtime/orchestrator/forged-code-executor.js.map +1 -0
- package/dist/runtime/orchestrator/index.d.ts +5 -0
- package/dist/runtime/orchestrator/index.d.ts.map +1 -1
- package/dist/runtime/orchestrator/index.js +15 -13
- package/dist/runtime/orchestrator/index.js.map +1 -1
- package/dist/runtime/world-model/index.d.ts +4 -2
- package/dist/runtime/world-model/index.d.ts.map +1 -1
- package/dist/runtime/world-model/index.js +4 -2
- package/dist/runtime/world-model/index.js.map +1 -1
- package/dist/server/live-runs.d.ts.map +1 -1
- package/dist/server/live-runs.js +2 -1
- package/dist/server/live-runs.js.map +1 -1
- package/dist/server/rate-limiter.d.ts.map +1 -1
- package/dist/server/rate-limiter.js +5 -0
- package/dist/server/rate-limiter.js.map +1 -1
- package/dist/server/routes/bundle.d.ts +1 -1
- package/dist/server/routes/bundle.d.ts.map +1 -1
- package/dist/server/routes/bundle.js +2 -1
- package/dist/server/routes/bundle.js.map +1 -1
- package/dist/server/routes/library-import.js +1 -9
- package/dist/server/routes/library-import.js.map +1 -1
- package/dist/server/routes/platform-api.d.ts.map +1 -1
- package/dist/server/routes/platform-api.js +6 -6
- package/dist/server/routes/platform-api.js.map +1 -1
- package/dist/server/routes/quickstart.d.ts.map +1 -1
- package/dist/server/routes/quickstart.js +3 -1
- package/dist/server/routes/quickstart.js.map +1 -1
- package/dist/server/routes/simulate.d.ts.map +1 -1
- package/dist/server/routes/simulate.js +2 -1
- package/dist/server/routes/simulate.js.map +1 -1
- package/dist/server/server-app.d.ts.map +1 -1
- package/dist/server/server-app.js +25 -16
- package/dist/server/server-app.js.map +1 -1
- package/dist/server/services/run-record.d.ts +7 -0
- package/dist/server/services/run-record.d.ts.map +1 -1
- package/dist/server/services/run-record.js +33 -0
- package/dist/server/services/run-record.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RunArtifact } from '../../engine/schema/index.js';
|
|
1
2
|
import type { ParacosmServerMode } from '../server-mode.js';
|
|
2
3
|
export interface RunRecord {
|
|
3
4
|
runId: string;
|
|
@@ -47,4 +48,10 @@ export interface RunRecord {
|
|
|
47
48
|
}
|
|
48
49
|
export declare function createRunRecord(input: Omit<RunRecord, 'runId' | 'createdAt'>): RunRecord;
|
|
49
50
|
export declare function hashActorConfig(input: unknown): string;
|
|
51
|
+
/** Returns a public copy of a run record without its server file path. */
|
|
52
|
+
export declare function publicRunRecord(record: RunRecord): Omit<RunRecord, 'artifactPath'>;
|
|
53
|
+
/** Returns an artifact copy without its output path, preserving the original for recording. */
|
|
54
|
+
export declare function withoutOutputPath(artifact: RunArtifact): RunArtifact;
|
|
55
|
+
/** Projects the artifact in a stored result frame before it is sent to a caller. */
|
|
56
|
+
export declare function publicResultFrame(frame: string): string;
|
|
50
57
|
//# sourceMappingURL=run-record.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-record.d.ts","sourceRoot":"","sources":["../../../src/server/services/run-record.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,kBAAkB,CAAC;IAC/B,SAAS,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS,CAAC;IAC5C;4EACwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,WAAW,GAAG,kBAAkB,GAAG,aAAa,CAAC;IACxD,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;gCAI4B;IAC5B,QAAQ,CA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,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,GAAG,WAAW,CAAC,GAAG,SAAS,CAMxF;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEtD;AAED,0EAA0E;AAC1E,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,CAIlF;AAED,+FAA+F;AAC/F,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,WAAW,GAAG,WAAW,CAMpE;AAED,oFAAoF;AACpF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAYvD"}
|
|
@@ -9,4 +9,37 @@ export function createRunRecord(input) {
|
|
|
9
9
|
export function hashActorConfig(input) {
|
|
10
10
|
return `leaders:${createHash('sha256').update(JSON.stringify(input)).digest('hex').slice(0, 12)}`;
|
|
11
11
|
}
|
|
12
|
+
/** Returns a public copy of a run record without its server file path. */
|
|
13
|
+
export function publicRunRecord(record) {
|
|
14
|
+
const { artifactPath, ...publicRecord } = record;
|
|
15
|
+
void artifactPath;
|
|
16
|
+
return publicRecord;
|
|
17
|
+
}
|
|
18
|
+
/** Returns an artifact copy without its output path, preserving the original for recording. */
|
|
19
|
+
export function withoutOutputPath(artifact) {
|
|
20
|
+
const ext = artifact.scenarioExtensions;
|
|
21
|
+
if (!ext || typeof ext !== 'object')
|
|
22
|
+
return { ...artifact };
|
|
23
|
+
const { outputPath, ...rest } = ext;
|
|
24
|
+
void outputPath;
|
|
25
|
+
return { ...artifact, scenarioExtensions: rest };
|
|
26
|
+
}
|
|
27
|
+
/** Projects the artifact in a stored result frame before it is sent to a caller. */
|
|
28
|
+
export function publicResultFrame(frame) {
|
|
29
|
+
if (!frame.startsWith('event: result\n'))
|
|
30
|
+
return frame;
|
|
31
|
+
return frame.split('\n').map(line => {
|
|
32
|
+
if (!line.startsWith('data: '))
|
|
33
|
+
return line;
|
|
34
|
+
try {
|
|
35
|
+
const data = JSON.parse(line.slice(6));
|
|
36
|
+
if (!data?.artifact || typeof data.artifact !== 'object')
|
|
37
|
+
return line;
|
|
38
|
+
return `data: ${JSON.stringify({ ...data, artifact: withoutOutputPath(data.artifact) })}`;
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
return line;
|
|
42
|
+
}
|
|
43
|
+
}).join('\n');
|
|
44
|
+
}
|
|
12
45
|
//# sourceMappingURL=run-record.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-record.js","sourceRoot":"","sources":["../../../src/server/services/run-record.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"run-record.js","sourceRoot":"","sources":["../../../src/server/services/run-record.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAmDrD,MAAM,UAAU,eAAe,CAAC,KAA6C;IAC3E,OAAO;QACL,KAAK,EAAE,OAAO,UAAU,EAAE,EAAE;QAC5B,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACnC,GAAG,KAAK;KACT,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,OAAO,WAAW,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;AACpG,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,eAAe,CAAC,MAAiB;IAC/C,MAAM,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,G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AAC;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "paracosm",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1124",
|
|
4
4
|
"description": "Agent swarm simulation for structured world modeling with LLMs. Multi-agent worlds with HEXACO personalities, deterministic kernels, runtime tool forging, and reproducible forkable RunArtifacts. Built on AgentOS.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|