@tracecode/harness 0.16.4 → 0.16.5
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/CHANGELOG.md +28 -0
- package/README.md +6 -4
- package/dist/{browser-runtime-provider-OGJQLGXU.js → browser-runtime-provider-POTAJULA.js} +5 -5
- package/dist/{chunk-DTLDQQHA.js → chunk-5KH5ABPQ.js} +72 -1
- package/dist/{chunk-RCOPAMVR.js → chunk-GX4SGR3L.js} +56 -36
- package/dist/{chunk-AAKNIYV6.js → chunk-I2JLGVMT.js} +3 -3
- package/dist/{chunk-M7SNEZDR.js → chunk-JPDVJCVS.js} +3 -3
- package/dist/{chunk-Y72C46GE.js → chunk-NHGF353L.js} +20 -11
- package/dist/{chunk-5RT5IT4I.js → chunk-OXFBZTWZ.js} +15 -31
- package/dist/{chunk-6LE4KEMZ.js → chunk-P5FQOYM4.js} +489 -3
- package/dist/core.cjs +19 -10
- package/dist/core.js +1 -1
- package/dist/cpp-worker-client-SKBOLX5Q.js +12 -0
- package/dist/{csharp-worker-client-ARGMOB3M.js → csharp-worker-client-GAUCDYVS.js} +4 -4
- package/dist/internal/browser.cjs +72 -0
- package/dist/internal/browser.d.cts +19 -1
- package/dist/internal/browser.d.ts +19 -1
- package/dist/internal/browser.js +3 -1
- package/dist/internal/tracekernel-workspace.cjs +19 -10
- package/dist/internal/tracekernel-workspace.js +1 -1
- package/dist/{java-project-JB5TUIFU.js → java-project-ASCLR77F.js} +2 -2
- package/dist/judge.cjs +884 -89
- package/dist/judge.d.cts +4 -0
- package/dist/judge.d.ts +4 -0
- package/dist/judge.js +236 -23
- package/dist/{project-browser-S4KLCZV7.js → project-browser-7MVLDAHN.js} +2 -2
- package/dist/{project-browser-3S2FWEAP.js → project-browser-DKMZFGCJ.js} +2 -2
- package/dist/{project-browser-HCQCXAYC.js → project-browser-VSLHVOH4.js} +2 -2
- package/dist/{project-browser-WDUWUGLZ.js → project-browser-XKQ2MNK3.js} +2 -2
- package/dist/{project-browser-QN7YOJQQ.js → project-browser-YUBOA2Q4.js} +2 -2
- package/dist/{python-worker-client-EX6Q2W4L.js → python-worker-client-R7K7HDO7.js} +4 -4
- package/dist/tracekernel.cjs +650 -68
- package/dist/tracekernel.js +4 -4
- package/package.json +14 -5
- package/runtime-assets.lock.json +77 -70
- package/workers/cpp/cpp-worker.js +53 -43
- package/workers/csharp/csharp-worker.js +150 -1
- package/workers/javascript/javascript-project-worker.js +18 -9
- package/workers/python/python-worker.js +121 -1
- package/workers/vendor/csharp/_framework/TraceCode.CSharpHost.wasm +0 -0
- package/workers/vendor/csharp/_framework/TraceCode.CSharpJudgeRuntime.wasm +0 -0
- package/workers/vendor/csharp/_framework/TraceCode.TraceClrWire.wasm +0 -0
- package/workers/vendor/csharp/_framework/dotnet.boot.js +11 -6
- package/workers/vendor/csharp/_framework/dotnet.native.wasm +0 -0
- package/workers/vendor/csharp/_framework/supportFiles/TraceCode.CSharpHost.dll +0 -0
- package/workers/vendor/csharp/_framework/supportFiles/TraceCode.CSharpJudgeRuntime.dll +0 -0
- package/workers/vendor/csharp-runner/_framework/assemblies-02.pack +0 -0
- package/workers/vendor/csharp-runner/_framework/assemblies-03.pack +0 -0
- package/workers/vendor/csharp-runner/_framework/dotnet.boot.js +65 -65
- package/dist/cpp-worker-client-HV7RO2P5.js +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,34 @@ This repo uses Git tags as release boundaries. Version notes below summarize wha
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.16.5] - 2026-08-12
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Added the in-repo TraceCLR algorithm profile, derived from the product C#
|
|
14
|
+
corpus, with deterministic compatibility checks, an explicit binary wire
|
|
15
|
+
boundary, and a trace-capable minimal runner used as evidence for the
|
|
16
|
+
optimized execution tier.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- C# prepared execution now selects either the optimized algorithm runner or
|
|
21
|
+
the broad compatibility runner before learner code starts. The selected
|
|
22
|
+
tier never falls through to the other runner after a learner failure, and
|
|
23
|
+
both tiers preserve the same output, tracing, limits, and isolation
|
|
24
|
+
contracts.
|
|
25
|
+
- Browser runtime prewarming now begins as promotable idle work. A foreground
|
|
26
|
+
compile promotes the same pending work instead of starting a second warmup.
|
|
27
|
+
- C++ toolchain asset loading, integrity validation, PCH registration, and
|
|
28
|
+
compiler initialization now stay inside the compiler Worker. Python runtime
|
|
29
|
+
image fetching and Wasm compilation likewise run in a short-lived bootstrap
|
|
30
|
+
Worker before the immutable image is retained at provider scope.
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- Prevented Python and C++ preflight from blocking the browser page thread
|
|
35
|
+
during Practice loading while preserving fast warmed first execution.
|
|
36
|
+
|
|
9
37
|
## [0.16.4] - 2026-08-11
|
|
10
38
|
|
|
11
39
|
### Fixed
|
package/README.md
CHANGED
|
@@ -246,10 +246,12 @@ collapsed runtime-information section; full transitive notices remain in the
|
|
|
246
246
|
versioned engine release.
|
|
247
247
|
|
|
248
248
|
The default Python Judge deployment is self-contained under `/workers` after
|
|
249
|
-
`sync-assets`.
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
249
|
+
`sync-assets`. A short-lived bootstrap Worker fetches and compiles the immutable
|
|
250
|
+
CPython startup image, then transfers it to provider scope without performing
|
|
251
|
+
runtime-image work on the page thread. The provider leases one clean Worker to
|
|
252
|
+
a submission for preparation plus its case batch, and then terminates that
|
|
253
|
+
Worker. A custom Python runtime manifest must include an engine-matched
|
|
254
|
+
`runtimeImage`; missing or cross-engine images fail closed.
|
|
253
255
|
Project Python processes continue to use the general TraceKernel process path
|
|
254
256
|
because their modules, filesystem, stdin, servers, and lifetime are
|
|
255
257
|
user-controlled.
|
|
@@ -2,14 +2,14 @@ var define = undefined;
|
|
|
2
2
|
import {
|
|
3
3
|
createCppBrowserRuntimeProvider,
|
|
4
4
|
createTraceCCBrowserCompilerService
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-GX4SGR3L.js";
|
|
6
|
+
import "./chunk-I2JLGVMT.js";
|
|
7
|
+
import "./chunk-NHGF353L.js";
|
|
8
|
+
import "./chunk-5KH5ABPQ.js";
|
|
9
9
|
import "./chunk-C2RUZCIL.js";
|
|
10
10
|
import "./chunk-756Z7C6D.js";
|
|
11
11
|
export {
|
|
12
12
|
createCppBrowserRuntimeProvider,
|
|
13
13
|
createTraceCCBrowserCompilerService
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=browser-runtime-provider-
|
|
15
|
+
//# sourceMappingURL=browser-runtime-provider-POTAJULA.js.map
|
|
@@ -49,6 +49,76 @@ function appendWorkerUrlQueryParameter(workerUrl, name, value) {
|
|
|
49
49
|
return `${beforeHash}${beforeHash.includes("?") ? "&" : "?"}${encodedName}=${encodedValue}${hash}`;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
// packages/runtime-browser/src/background-work-scheduler.ts
|
|
53
|
+
function createPromotableBrowserBackgroundTask(work) {
|
|
54
|
+
let permanentlyCancelled = false;
|
|
55
|
+
let task = null;
|
|
56
|
+
let idleHandle = null;
|
|
57
|
+
let backgroundController = null;
|
|
58
|
+
let resolveCompletion;
|
|
59
|
+
let rejectCompletion;
|
|
60
|
+
const completion = new Promise((resolve, reject) => {
|
|
61
|
+
resolveCompletion = resolve;
|
|
62
|
+
rejectCompletion = reject;
|
|
63
|
+
});
|
|
64
|
+
void completion.catch(() => void 0);
|
|
65
|
+
const start = () => {
|
|
66
|
+
if (permanentlyCancelled) return Promise.resolve();
|
|
67
|
+
if (!task) {
|
|
68
|
+
task = Promise.resolve().then(work);
|
|
69
|
+
task.then(resolveCompletion, rejectCompletion);
|
|
70
|
+
void task.catch(() => void 0);
|
|
71
|
+
}
|
|
72
|
+
return task;
|
|
73
|
+
};
|
|
74
|
+
const cancelPendingCallback = () => {
|
|
75
|
+
if (idleHandle !== null && typeof globalThis.cancelIdleCallback === "function") {
|
|
76
|
+
globalThis.cancelIdleCallback(idleHandle);
|
|
77
|
+
idleHandle = null;
|
|
78
|
+
}
|
|
79
|
+
backgroundController?.abort();
|
|
80
|
+
backgroundController = null;
|
|
81
|
+
};
|
|
82
|
+
if (typeof globalThis.requestIdleCallback === "function") {
|
|
83
|
+
idleHandle = globalThis.requestIdleCallback(() => {
|
|
84
|
+
idleHandle = null;
|
|
85
|
+
void start();
|
|
86
|
+
});
|
|
87
|
+
} else {
|
|
88
|
+
const scheduler = globalThis.scheduler;
|
|
89
|
+
if (scheduler?.postTask) {
|
|
90
|
+
backgroundController = new AbortController();
|
|
91
|
+
void scheduler.postTask(
|
|
92
|
+
() => {
|
|
93
|
+
backgroundController = null;
|
|
94
|
+
return start();
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
priority: "background",
|
|
98
|
+
signal: backgroundController.signal
|
|
99
|
+
}
|
|
100
|
+
).catch(() => void 0);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
promote: () => {
|
|
105
|
+
cancelPendingCallback();
|
|
106
|
+
return start();
|
|
107
|
+
},
|
|
108
|
+
wait: () => completion,
|
|
109
|
+
cancel: () => {
|
|
110
|
+
if (permanentlyCancelled) return;
|
|
111
|
+
permanentlyCancelled = true;
|
|
112
|
+
cancelPendingCallback();
|
|
113
|
+
if (!task) {
|
|
114
|
+
rejectCompletion(
|
|
115
|
+
new DOMException("Browser background work was cancelled.", "AbortError")
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
|
|
52
122
|
// packages/runtime-browser/src/execution-host.ts
|
|
53
123
|
var BROWSER_EXECUTION_HOST_PROTOCOL = "tracecode.browser-execution-host.v1";
|
|
54
124
|
function secureRandomToken() {
|
|
@@ -2474,6 +2544,7 @@ export {
|
|
|
2474
2544
|
installBrowserExecutionWorkerHost,
|
|
2475
2545
|
isDevEnvironment,
|
|
2476
2546
|
appendWorkerUrlQueryParameter,
|
|
2547
|
+
createPromotableBrowserBackgroundTask,
|
|
2477
2548
|
HostArtifactCache,
|
|
2478
2549
|
handleHostArtifactCacheRequest,
|
|
2479
2550
|
serializableKernelHttpRequest,
|
|
@@ -2534,4 +2605,4 @@ export {
|
|
|
2534
2605
|
createWorkerProtocolToken,
|
|
2535
2606
|
WorkerSessionCore
|
|
2536
2607
|
};
|
|
2537
|
-
//# sourceMappingURL=chunk-
|
|
2608
|
+
//# sourceMappingURL=chunk-5KH5ABPQ.js.map
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
var define = undefined;
|
|
2
2
|
import {
|
|
3
3
|
CppWorkerClient
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-I2JLGVMT.js";
|
|
5
5
|
import {
|
|
6
|
+
createPromotableBrowserBackgroundTask,
|
|
6
7
|
createWorkerProtocolToken
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5KH5ABPQ.js";
|
|
8
9
|
|
|
9
10
|
// packages/runtime-cpp/src/cpp-prepared-provider.ts
|
|
10
11
|
function createCppPreparedExecutionProvider(options) {
|
|
@@ -13,6 +14,7 @@ function createCppPreparedExecutionProvider(options) {
|
|
|
13
14
|
let terminated = false;
|
|
14
15
|
const ownedClients = /* @__PURE__ */ new Set();
|
|
15
16
|
const activePrograms = /* @__PURE__ */ new Set();
|
|
17
|
+
let scheduledCompilerPrewarm = null;
|
|
16
18
|
const createClient = () => {
|
|
17
19
|
const client = options.createWorkerClient();
|
|
18
20
|
ownedClients.add(client);
|
|
@@ -40,6 +42,21 @@ function createCppPreparedExecutionProvider(options) {
|
|
|
40
42
|
standbyClient = null;
|
|
41
43
|
return client;
|
|
42
44
|
};
|
|
45
|
+
const cancelScheduledCompilerPrewarm = () => {
|
|
46
|
+
scheduledCompilerPrewarm?.cancel();
|
|
47
|
+
scheduledCompilerPrewarm = null;
|
|
48
|
+
};
|
|
49
|
+
const scheduleCompilerPrewarm = () => {
|
|
50
|
+
if (terminated || scheduledCompilerPrewarm || !options.prewarmCompiler || !options.scheduleCompilerPrewarm) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const expectedGeneration = generation;
|
|
54
|
+
scheduledCompilerPrewarm = options.scheduleCompilerPrewarm(async () => {
|
|
55
|
+
assertGeneration(expectedGeneration);
|
|
56
|
+
await options.prewarmCompiler?.();
|
|
57
|
+
assertGeneration(expectedGeneration);
|
|
58
|
+
});
|
|
59
|
+
};
|
|
43
60
|
return {
|
|
44
61
|
async init() {
|
|
45
62
|
assertActive();
|
|
@@ -58,6 +75,7 @@ function createCppPreparedExecutionProvider(options) {
|
|
|
58
75
|
const result = await client.init();
|
|
59
76
|
assertGeneration(expectedGeneration);
|
|
60
77
|
standbyClient = client;
|
|
78
|
+
scheduleCompilerPrewarm();
|
|
61
79
|
return {
|
|
62
80
|
success: result.success,
|
|
63
81
|
loadTimeMs: result.loadTimeMs
|
|
@@ -69,6 +87,12 @@ function createCppPreparedExecutionProvider(options) {
|
|
|
69
87
|
},
|
|
70
88
|
async prepareProgram(call) {
|
|
71
89
|
const expectedGeneration = generation;
|
|
90
|
+
const compilerPrewarm = scheduledCompilerPrewarm;
|
|
91
|
+
scheduledCompilerPrewarm = null;
|
|
92
|
+
if (compilerPrewarm) {
|
|
93
|
+
await compilerPrewarm.promote().catch(() => void 0);
|
|
94
|
+
assertGeneration(expectedGeneration);
|
|
95
|
+
}
|
|
72
96
|
const client = acquireClient();
|
|
73
97
|
try {
|
|
74
98
|
await client.init();
|
|
@@ -199,6 +223,7 @@ function createCppPreparedExecutionProvider(options) {
|
|
|
199
223
|
},
|
|
200
224
|
reset() {
|
|
201
225
|
assertActive();
|
|
226
|
+
cancelScheduledCompilerPrewarm();
|
|
202
227
|
generation += 1;
|
|
203
228
|
for (const forceDispose of [...activePrograms]) forceDispose();
|
|
204
229
|
for (const client of [...ownedClients]) retireClient(client);
|
|
@@ -206,6 +231,7 @@ function createCppPreparedExecutionProvider(options) {
|
|
|
206
231
|
},
|
|
207
232
|
terminate() {
|
|
208
233
|
if (terminated) return;
|
|
234
|
+
cancelScheduledCompilerPrewarm();
|
|
209
235
|
generation += 1;
|
|
210
236
|
terminated = true;
|
|
211
237
|
for (const forceDispose of [...activePrograms]) forceDispose();
|
|
@@ -295,8 +321,30 @@ var TraceCCCompilerService = class {
|
|
|
295
321
|
requestTimeoutMs;
|
|
296
322
|
artifactCache = /* @__PURE__ */ new Map();
|
|
297
323
|
artifactCacheBytes = 0;
|
|
324
|
+
/**
|
|
325
|
+
* Fetch and verify the immutable compiler inputs inside the trusted compiler
|
|
326
|
+
* Worker without compiling or instantiating TraceCC. A foreground compile
|
|
327
|
+
* joins the Worker's immutable byte cache.
|
|
328
|
+
*/
|
|
329
|
+
async prewarmAssets(shard = "narrow") {
|
|
330
|
+
await this.ensureWorker();
|
|
331
|
+
const selected = this.options.shards[shard];
|
|
332
|
+
const result = await this.send("prewarm-trusted-tracecc-assets", {
|
|
333
|
+
...this.traceccAssets(
|
|
334
|
+
selected,
|
|
335
|
+
`/tracecc-assets/${shard}.pch`,
|
|
336
|
+
`/tracecc-assets/${shard}.o`
|
|
337
|
+
),
|
|
338
|
+
source: "tracecc-prewarm-assets-v1"
|
|
339
|
+
});
|
|
340
|
+
if (result.success !== true) {
|
|
341
|
+
throw new Error(
|
|
342
|
+
typeof result.error === "string" ? result.error : "TraceCC compiler asset prewarm failed."
|
|
343
|
+
);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
298
346
|
async warmup(shard = "narrow") {
|
|
299
|
-
await this.
|
|
347
|
+
await this.prewarmAssets(shard);
|
|
300
348
|
await this.ensureWorker();
|
|
301
349
|
const selected = this.options.shards[shard];
|
|
302
350
|
const pchPath = `/tracecc-assets/${shard}.pch`;
|
|
@@ -363,7 +411,6 @@ var TraceCCCompilerService = class {
|
|
|
363
411
|
""
|
|
364
412
|
);
|
|
365
413
|
const shard = traceccShardForDriver(strippedSource);
|
|
366
|
-
await this.options.assetPreflight?.(shard);
|
|
367
414
|
if (signal?.aborted || generation !== this.generation) {
|
|
368
415
|
throw Object.assign(
|
|
369
416
|
new Error("TraceCC compilation was cancelled."),
|
|
@@ -541,7 +588,6 @@ var TraceCCCompilerService = class {
|
|
|
541
588
|
error: "TraceCC trusted Project compilation only accepts compile requests."
|
|
542
589
|
};
|
|
543
590
|
}
|
|
544
|
-
await this.options.commonAssetPreflight?.();
|
|
545
591
|
if (signal?.aborted || generation !== this.generation) {
|
|
546
592
|
throw Object.assign(
|
|
547
593
|
new Error("TraceCC Project compilation was cancelled."),
|
|
@@ -751,36 +797,18 @@ function createTraceCCBrowserCompilerService(compiler, context) {
|
|
|
751
797
|
...DEFAULT_TRACECC_RESOURCE_NAMES,
|
|
752
798
|
...compiler.resourceNames ?? {}
|
|
753
799
|
};
|
|
754
|
-
const commonCompilerAssetNames = [
|
|
755
|
-
"runtimeHeader",
|
|
756
|
-
"compilerWasm",
|
|
757
|
-
"linkerWasm",
|
|
758
|
-
"sysroot"
|
|
759
|
-
];
|
|
760
|
-
const commonAssetPreflight = () => context.preflight(commonCompilerAssetNames);
|
|
761
800
|
const compilerIntegrity = context.assets.cppCompilerIntegrity;
|
|
762
801
|
if (!compilerIntegrity) {
|
|
763
802
|
throw new Error(
|
|
764
803
|
"TraceCC requires exact compiler integrity entries from a C++ runtime manifest."
|
|
765
804
|
);
|
|
766
805
|
}
|
|
767
|
-
const shardAssetPreflight = (shard) => {
|
|
768
|
-
const prefix = shard === "map" ? "map" : shard;
|
|
769
|
-
return context.preflight([
|
|
770
|
-
...commonCompilerAssetNames,
|
|
771
|
-
`compilerResources.${resourceNames[`${prefix}Pch`]}`,
|
|
772
|
-
`compilerResources.${resourceNames[`${prefix}PchSource`]}`,
|
|
773
|
-
`compilerResources.${resourceNames[`${prefix}RuntimeObject`]}`
|
|
774
|
-
]);
|
|
775
|
-
};
|
|
776
806
|
return new TraceCCCompilerService({
|
|
777
807
|
workerUrl: context.assets.cppWorker,
|
|
778
808
|
compilerUrl: context.assets.cppCompilerWasm,
|
|
779
809
|
resourcesUrl: context.assets.cppSysroot,
|
|
780
810
|
runtimeHeaderUrl: context.assets.cppRuntimeHeader,
|
|
781
811
|
compilerIntegrity,
|
|
782
|
-
commonAssetPreflight,
|
|
783
|
-
assetPreflight: shardAssetPreflight,
|
|
784
812
|
shards: {
|
|
785
813
|
narrow: traceccShardAssets(
|
|
786
814
|
traceccResources,
|
|
@@ -809,18 +837,9 @@ function createCppBrowserRuntimeProvider(options = {}) {
|
|
|
809
837
|
create(context) {
|
|
810
838
|
const workerFactory = context.workerFactoryFor("cpp");
|
|
811
839
|
const compiler = options.compiler ?? {};
|
|
812
|
-
const commonCompilerAssetNames = [
|
|
813
|
-
"runtimeHeader",
|
|
814
|
-
"compilerWasm",
|
|
815
|
-
"linkerWasm",
|
|
816
|
-
"sysroot"
|
|
817
|
-
];
|
|
818
|
-
const runtimeAssetPreflight = context.preflight("cpp", commonCompilerAssetNames);
|
|
819
840
|
const workerOptions = {
|
|
820
841
|
workerUrl: context.assets.cppWorker,
|
|
821
842
|
...workerFactory ? { workerFactory } : {},
|
|
822
|
-
assetPreflight: context.preflight("cpp", ["worker"]),
|
|
823
|
-
runtimeAssetPreflight,
|
|
824
843
|
compilerWasmUrl: context.assets.cppCompilerWasm,
|
|
825
844
|
linkerWasmUrl: context.assets.cppLinkerWasm,
|
|
826
845
|
sysrootUrl: context.assets.cppSysroot,
|
|
@@ -836,8 +855,7 @@ function createCppBrowserRuntimeProvider(options = {}) {
|
|
|
836
855
|
};
|
|
837
856
|
const compilerService = createTraceCCBrowserCompilerService(compiler, {
|
|
838
857
|
assets: context.assets,
|
|
839
|
-
...workerFactory ? { workerFactory } : {}
|
|
840
|
-
preflight: (assetNames) => context.preflight("cpp", assetNames)()
|
|
858
|
+
...workerFactory ? { workerFactory } : {}
|
|
841
859
|
});
|
|
842
860
|
const createWorkerClient = () => new CppWorkerClient({
|
|
843
861
|
...workerOptions,
|
|
@@ -845,7 +863,9 @@ function createCppBrowserRuntimeProvider(options = {}) {
|
|
|
845
863
|
});
|
|
846
864
|
const preparedProvider = createCppPreparedExecutionProvider({
|
|
847
865
|
createWorkerClient,
|
|
848
|
-
warmCompilerOnInit:
|
|
866
|
+
warmCompilerOnInit: false,
|
|
867
|
+
prewarmCompiler: () => compilerService.prewarmAssets(),
|
|
868
|
+
scheduleCompilerPrewarm: createPromotableBrowserBackgroundTask
|
|
849
869
|
});
|
|
850
870
|
const preparedProviders = /* @__PURE__ */ new Map([["cpp", preparedProvider]]);
|
|
851
871
|
const terminateCompiler = () => {
|
|
@@ -870,4 +890,4 @@ export {
|
|
|
870
890
|
createTraceCCBrowserCompilerService,
|
|
871
891
|
createCppBrowserRuntimeProvider
|
|
872
892
|
};
|
|
873
|
-
//# sourceMappingURL=chunk-
|
|
893
|
+
//# sourceMappingURL=chunk-GX4SGR3L.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
liftCodeBatchOutcome,
|
|
5
5
|
liftCodeOutcome,
|
|
6
6
|
liftTraceOutcome
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NHGF353L.js";
|
|
8
8
|
import {
|
|
9
9
|
WorkerCrashedError,
|
|
10
10
|
WorkerReadyTimeoutError,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
logRuntimeDiagnostic,
|
|
22
22
|
restoreTransferredTraceEvents,
|
|
23
23
|
traceEventTransferRequest
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-5KH5ABPQ.js";
|
|
25
25
|
import {
|
|
26
26
|
andThen,
|
|
27
27
|
catchIf,
|
|
@@ -1370,4 +1370,4 @@ var CppWorkerClient = class {
|
|
|
1370
1370
|
export {
|
|
1371
1371
|
CppWorkerClient
|
|
1372
1372
|
};
|
|
1373
|
-
//# sourceMappingURL=chunk-
|
|
1373
|
+
//# sourceMappingURL=chunk-I2JLGVMT.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
createEmptyRuntimeTrace,
|
|
4
4
|
liftCodeBatchOutcome,
|
|
5
5
|
liftCodeOutcome
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NHGF353L.js";
|
|
7
7
|
import {
|
|
8
8
|
WorkerCrashedError,
|
|
9
9
|
WorkerReadyTimeoutError,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
logRuntimeDiagnostic,
|
|
19
19
|
restoreTransferredTraceEvents,
|
|
20
20
|
traceEventTransferRequest
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-5KH5ABPQ.js";
|
|
22
22
|
import {
|
|
23
23
|
andThen,
|
|
24
24
|
catchIf,
|
|
@@ -559,4 +559,4 @@ export {
|
|
|
559
559
|
PythonWorkerClient,
|
|
560
560
|
isWorkerSupported
|
|
561
561
|
};
|
|
562
|
-
//# sourceMappingURL=chunk-
|
|
562
|
+
//# sourceMappingURL=chunk-JPDVJCVS.js.map
|
|
@@ -3,7 +3,7 @@ var define = undefined;
|
|
|
3
3
|
// package.json
|
|
4
4
|
var package_default = {
|
|
5
5
|
name: "@tracecode/harness",
|
|
6
|
-
version: "0.16.
|
|
6
|
+
version: "0.16.5",
|
|
7
7
|
license: "AGPL-3.0-only",
|
|
8
8
|
homepage: "https://tracecode.app",
|
|
9
9
|
repository: {
|
|
@@ -71,6 +71,15 @@ var package_default = {
|
|
|
71
71
|
"build:browser-host": "pnpm exec tsup --config tsup.browser-host.config.ts",
|
|
72
72
|
"build:tracekernel": "pnpm exec tsup --config tsup.tracekernel.config.ts",
|
|
73
73
|
"generate:runtime-info": "pnpm exec tsx --tsconfig tsconfig.base.json scripts/generate-runtime-language-info.ts",
|
|
74
|
+
"generate:traceclr-profile": "node scripts/generate-traceclr-algorithm-profile.mjs",
|
|
75
|
+
"audit:traceclr-corpus": "node scripts/audit-traceclr-corpus.mjs",
|
|
76
|
+
"build:traceclr-product-corpus": "node scripts/create-traceclr-product-corpus.mjs",
|
|
77
|
+
"check:traceclr-profile": "node --test tests/test-traceclr-algorithm-profile.mjs tests/test-traceclr-profile-policy.mjs && node --import tsx tests/test-traceclr-wire-codec.ts",
|
|
78
|
+
"check:traceclr-product-profile": "node scripts/generate-traceclr-algorithm-profile.mjs --check && pnpm check:traceclr-profile",
|
|
79
|
+
"build:traceclr-wire-probe": "dotnet build tools/TraceCode.TraceClrWireProbe/TraceCode.TraceClrWireProbe.csproj -c Release && dotnet build tools/TraceCode.TraceClrHostileProbe/TraceCode.TraceClrHostileProbe.csproj -c Release && dotnet publish packages/runtime-csharp/dotnet/TraceCode.CSharpAlgorithmRunner/TraceCode.CSharpAlgorithmRunner.csproj -c Release",
|
|
80
|
+
"test:traceclr-wire-browser": "pnpm build:traceclr-wire-probe && TRACECODE_TRACECLR_BROWSER_ENGINE=chromium node --import tsx tests/test-traceclr-wire-runner-browser.ts && TRACECODE_TRACECLR_BROWSER_ENGINE=firefox node --import tsx tests/test-traceclr-wire-runner-browser.ts && TRACECODE_TRACECLR_BROWSER_ENGINE=webkit node --import tsx tests/test-traceclr-wire-runner-browser.ts",
|
|
81
|
+
"bench:traceclr-tiers": "pnpm build:traceclr-wire-probe && pnpm materialize:csharp-role-assets && node --import tsx scripts/benchmark-traceclr-runtime-tiers.ts",
|
|
82
|
+
"bench:traceclr-tiers:matrix": "pnpm build:traceclr-wire-probe && pnpm materialize:csharp-role-assets && for engine in chromium firefox webkit; do TRACECODE_TRACECLR_BROWSER_ENGINE=$engine node --import tsx scripts/benchmark-traceclr-runtime-tiers.ts || exit; done",
|
|
74
83
|
"generate:runtime-open-source-info": "pnpm exec tsx --tsconfig tsconfig.base.json scripts/generate-runtime-open-source-info.ts",
|
|
75
84
|
"generate:python-harness": "pnpm exec tsx --tsconfig tsconfig.base.json scripts/generate-python-harness-artifacts.ts",
|
|
76
85
|
"generate:runtime-assets-lock": "node --import tsx scripts/generate-runtime-assets-lock.mjs",
|
|
@@ -134,10 +143,10 @@ var package_default = {
|
|
|
134
143
|
"test:java-runtime": "pnpm exec tsx --tsconfig tsconfig.base.json tests/test-java-runtime.ts && pnpm exec tsx --tsconfig tsconfig.base.json tests/test-java-project-filesystem.ts && node --import tsx --test tests/test-java-jar-manifest.ts && pnpm exec tsx --tsconfig tsconfig.base.json tests/test-java-project-provider.ts && TSX_TSCONFIG_PATH=tsconfig.base.json node --import tsx --test tests/test-java-prepared-provider.ts",
|
|
135
144
|
"test:java-prepared-provider": "TSX_TSCONFIG_PATH=tsconfig.base.json node --import tsx --test tests/test-java-prepared-provider.ts && pnpm exec tsx --tsconfig tsconfig.base.json tests/test-java-prepared-provider-browser.ts",
|
|
136
145
|
"test:tracejvm-semantic-trace": "node --import tsx tests/test-tracejvm-semantic-trace-matrix.ts",
|
|
137
|
-
"test:csharp-runtime": "pnpm exec tsx --tsconfig tsconfig.base.json scripts/validate-csharp-runtime-role-assets.ts && TSX_TSCONFIG_PATH=tsconfig.base.json node --import tsx --test tests/test-csharp-role-artifacts.ts tests/test-csharp-managed-assembly-packs.ts && pnpm exec tsx --tsconfig tsconfig.base.json tests/test-csharp-runtime.ts && TSX_TSCONFIG_PATH=tsconfig.base.json node --import tsx --test tests/test-csharp-prepared-provider.ts && pnpm exec tsx --tsconfig tsconfig.base.json tests/test-csharp-project-fs-parity.ts",
|
|
146
|
+
"test:csharp-runtime": "pnpm check:traceclr-profile && pnpm exec tsx --tsconfig tsconfig.base.json scripts/validate-csharp-runtime-role-assets.ts && TSX_TSCONFIG_PATH=tsconfig.base.json node --import tsx --test tests/test-csharp-role-artifacts.ts tests/test-csharp-managed-assembly-packs.ts && pnpm exec tsx --tsconfig tsconfig.base.json tests/test-csharp-runtime.ts && TSX_TSCONFIG_PATH=tsconfig.base.json node --import tsx --test tests/test-csharp-prepared-provider.ts && pnpm exec tsx --tsconfig tsconfig.base.json tests/test-csharp-project-fs-parity.ts",
|
|
138
147
|
"test:csharp-role-assets": "pnpm materialize:csharp-role-assets && TSX_TSCONFIG_PATH=tsconfig.base.json node --import tsx --test tests/test-csharp-role-artifacts.ts tests/test-csharp-managed-assembly-packs.ts && pnpm exec tsx --tsconfig tsconfig.base.json scripts/validate-csharp-runtime-role-assets.ts",
|
|
139
148
|
"test:csharp-worker-browser": "pnpm materialize:csharp-role-assets && pnpm exec tsx --tsconfig tsconfig.base.json tests/test-csharp-worker-client-http.ts && pnpm exec tsx --tsconfig tsconfig.base.json tests/test-csharp-worker-browser.ts && pnpm exec tsx --tsconfig tsconfig.base.json tests/test-csharp-worker-lifecycle-browser.ts && pnpm exec tsx --tsconfig tsconfig.base.json tests/test-csharp-prepared-boundary-browser.ts",
|
|
140
|
-
"test:csharp-worker-browser-matrix": "pnpm materialize:csharp-role-assets &&
|
|
149
|
+
"test:csharp-worker-browser-matrix": "pnpm materialize:csharp-role-assets && for engine in chromium firefox webkit; do TSX_TSCONFIG_PATH=tsconfig.base.json TRACECODE_CSHARP_BROWSER_SMOKE=1 TRACECODE_CSHARP_BROWSER_ENGINE=$engine node --import tsx tests/test-csharp-worker-browser.ts && TSX_TSCONFIG_PATH=tsconfig.base.json TRACECODE_CSHARP_BROWSER_ENGINE=$engine node --import tsx tests/test-csharp-prepared-boundary-browser.ts || exit; done",
|
|
141
150
|
"test:cpp-runtime": "pnpm exec tsx --tsconfig tsconfig.base.json tests/test-cpp-runtime.ts",
|
|
142
151
|
"test:cpp-conformance": "pnpm exec tsx --tsconfig tsconfig.base.json tests/test-cpp-conformance.ts",
|
|
143
152
|
"test:cpp-script-lambda-trace": "pnpm exec tsx --tsconfig tsconfig.base.json tests/test-cpp-script-lambda-trace.ts",
|
|
@@ -260,7 +269,7 @@ var LANGUAGE_RUNTIME_INFOS = Object.freeze(
|
|
|
260
269
|
"versionLabel": "Python 3.13.2",
|
|
261
270
|
"executionPlatform": {
|
|
262
271
|
"name": "TraceKernel",
|
|
263
|
-
"version": "0.16.
|
|
272
|
+
"version": "0.16.5"
|
|
264
273
|
},
|
|
265
274
|
"description": "Python 3.13.2 runs in TraceKernel's isolated Python runtime.\n\nCommon algorithm helpers are imported automatically, including array, bisect, collections, functools, heapq, itertools. Other standard-library modules can be imported normally.\n\nOptional third-party packages are consumer-owned runtime assets and are available only when declared by the TraceKernel runtime manifest.",
|
|
266
275
|
"runtime": {
|
|
@@ -287,7 +296,7 @@ var LANGUAGE_RUNTIME_INFOS = Object.freeze(
|
|
|
287
296
|
"versionLabel": "JavaScript (ECMAScript 2023)",
|
|
288
297
|
"executionPlatform": {
|
|
289
298
|
"name": "TraceKernel",
|
|
290
|
-
"version": "0.16.
|
|
299
|
+
"version": "0.16.5"
|
|
291
300
|
},
|
|
292
301
|
"runtime": {
|
|
293
302
|
"name": "TraceKernel JavaScript runtime",
|
|
@@ -379,7 +388,7 @@ Binary Search Tree, Trie, and Graph are bundled too, but are not exposed globall
|
|
|
379
388
|
"versionLabel": "TypeScript 5.9.3",
|
|
380
389
|
"executionPlatform": {
|
|
381
390
|
"name": "TraceKernel",
|
|
382
|
-
"version": "0.16.
|
|
391
|
+
"version": "0.16.5"
|
|
383
392
|
},
|
|
384
393
|
"description": `TypeScript 5.9.3 is compiled with the TypeScript compiler and executed by TraceKernel's JavaScript runtime.
|
|
385
394
|
|
|
@@ -479,7 +488,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
|
|
|
479
488
|
"versionLabel": "Java 23",
|
|
480
489
|
"executionPlatform": {
|
|
481
490
|
"name": "TraceKernel",
|
|
482
|
-
"version": "0.16.
|
|
491
|
+
"version": "0.16.5"
|
|
483
492
|
},
|
|
484
493
|
"description": "Java 23 is compiled with javac 23 and executed by the Java runtime on TraceKernel.\n\nCommon imports are added automatically: java.util.*, java.io.*, java.math.*, java.util.stream.*, javafx.util.Pair.",
|
|
485
494
|
"runtime": {
|
|
@@ -516,7 +525,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
|
|
|
516
525
|
"versionLabel": "C# 14",
|
|
517
526
|
"executionPlatform": {
|
|
518
527
|
"name": "TraceKernel",
|
|
519
|
-
"version": "0.16.
|
|
528
|
+
"version": "0.16.5"
|
|
520
529
|
},
|
|
521
530
|
"description": "C# 14 source is compiled and executed by TraceKernel's isolated C# runtime.\n\nCommon namespaces are imported automatically: System, System.Collections, System.Collections.Generic, System.IO, System.Linq, System.Numerics, System.Text, System.Text.RegularExpressions.",
|
|
522
531
|
"runtime": {
|
|
@@ -545,7 +554,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
|
|
|
545
554
|
"versionLabel": "C++23",
|
|
546
555
|
"executionPlatform": {
|
|
547
556
|
"name": "TraceKernel",
|
|
548
|
-
"version": "0.16.
|
|
557
|
+
"version": "0.16.5"
|
|
549
558
|
},
|
|
550
559
|
"description": "C++ source is compiled using the C++23 standard.\n\nSubmissions compile to WebAssembly and run in TraceKernel's WASI execution lane. The compiler currently uses -O0 and -fno-exceptions, with a fixed program stack size.\n\nCommon standard library headers are included automatically, including <algorithm>, <array>, <bitset>, <climits>, <cmath>, <cstdint>, <functional>, <limits>, <numeric>, <sstream>, <tuple>, <vector>, <unordered_map>, <unordered_set> and more.",
|
|
551
560
|
"runtime": {
|
|
@@ -697,7 +706,7 @@ var LANGUAGE_RUNTIME_OPEN_SOURCE_INFOS = Object.freeze(
|
|
|
697
706
|
{
|
|
698
707
|
"kind": "modifications",
|
|
699
708
|
"label": "Runtime modifications",
|
|
700
|
-
"url": "https://github.com/tracecodeapp/harness/tree/v0.16.
|
|
709
|
+
"url": "https://github.com/tracecodeapp/harness/tree/v0.16.5/workers/python/pyodide-0.29.3"
|
|
701
710
|
}
|
|
702
711
|
]
|
|
703
712
|
}
|
|
@@ -4424,4 +4433,4 @@ export {
|
|
|
4424
4433
|
normalizeJavaSerializedResult,
|
|
4425
4434
|
javaTraceHooksEventsToRuntimeTrace
|
|
4426
4435
|
};
|
|
4427
|
-
//# sourceMappingURL=chunk-
|
|
4436
|
+
//# sourceMappingURL=chunk-NHGF353L.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var define = undefined;
|
|
2
2
|
import {
|
|
3
3
|
normalizeRuntimeProjectPath
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NHGF353L.js";
|
|
5
5
|
import {
|
|
6
6
|
_await,
|
|
7
7
|
bounded,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
SUPPORTED_LANGUAGES,
|
|
22
22
|
createBrowserExecutionWorkerHost
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-5KH5ABPQ.js";
|
|
24
24
|
import {
|
|
25
25
|
TaggedError,
|
|
26
26
|
_await as _await2,
|
|
@@ -11512,23 +11512,23 @@ async function createBrowserProjectWorkspace(options = {}) {
|
|
|
11512
11512
|
const hasProvider = (provider) => providers.includes(provider);
|
|
11513
11513
|
const [pythonProvider, javascriptProvider, javaProvider, csharpProvider, cppProvider] = await Promise.all([
|
|
11514
11514
|
hasProvider("python") ? Promise.all([
|
|
11515
|
-
import("./project-browser-
|
|
11516
|
-
import("./python-worker-client-
|
|
11515
|
+
import("./project-browser-7MVLDAHN.js"),
|
|
11516
|
+
import("./python-worker-client-R7K7HDO7.js")
|
|
11517
11517
|
]) : void 0,
|
|
11518
|
-
hasProvider("javascript") || hasProvider("typescript") ? import("./project-browser-
|
|
11518
|
+
hasProvider("javascript") || hasProvider("typescript") ? import("./project-browser-YUBOA2Q4.js") : void 0,
|
|
11519
11519
|
hasProvider("java") ? Promise.all([
|
|
11520
|
-
import("./project-browser-
|
|
11521
|
-
import("./java-project-
|
|
11520
|
+
import("./project-browser-XKQ2MNK3.js"),
|
|
11521
|
+
import("./java-project-ASCLR77F.js"),
|
|
11522
11522
|
import("./java-project-client-PEQKFTH6.js")
|
|
11523
11523
|
]) : void 0,
|
|
11524
11524
|
hasProvider("csharp") ? Promise.all([
|
|
11525
|
-
import("./project-browser-
|
|
11526
|
-
import("./csharp-worker-client-
|
|
11525
|
+
import("./project-browser-VSLHVOH4.js"),
|
|
11526
|
+
import("./csharp-worker-client-GAUCDYVS.js")
|
|
11527
11527
|
]) : void 0,
|
|
11528
11528
|
hasProvider("cpp") ? Promise.all([
|
|
11529
|
-
import("./project-browser-
|
|
11530
|
-
import("./cpp-worker-client-
|
|
11531
|
-
import("./browser-runtime-provider-
|
|
11529
|
+
import("./project-browser-DKMZFGCJ.js"),
|
|
11530
|
+
import("./cpp-worker-client-SKBOLX5Q.js"),
|
|
11531
|
+
import("./browser-runtime-provider-POTAJULA.js"),
|
|
11532
11532
|
import("./tracecc-runtime-assets-G3BFH7LY.js")
|
|
11533
11533
|
]) : void 0
|
|
11534
11534
|
]);
|
|
@@ -11793,22 +11793,13 @@ async function createBrowserProjectWorkspace(options = {}) {
|
|
|
11793
11793
|
} : {}
|
|
11794
11794
|
};
|
|
11795
11795
|
const cppCompilerWorkerFactory = executionHost && isExecutionHosted("cpp") ? executionHost.workerFactory : void 0;
|
|
11796
|
-
const cppRuntimeAssetPreflight = () => runtimeAssetPreflight.preflight("cpp", [
|
|
11797
|
-
"runtimeHeader",
|
|
11798
|
-
"compilerWasm",
|
|
11799
|
-
"linkerWasm",
|
|
11800
|
-
"sysroot"
|
|
11801
|
-
]);
|
|
11802
11796
|
const traceccCompilerService = cppProvider && !injectedCppProvider ? cppProvider[2].createTraceCCBrowserCompilerService({}, {
|
|
11803
11797
|
assets,
|
|
11804
|
-
...cppCompilerWorkerFactory ? { workerFactory: cppCompilerWorkerFactory } : {}
|
|
11805
|
-
preflight: (assetNames) => runtimeAssetPreflight.preflight("cpp", assetNames)
|
|
11798
|
+
...cppCompilerWorkerFactory ? { workerFactory: cppCompilerWorkerFactory } : {}
|
|
11806
11799
|
}) : void 0;
|
|
11807
11800
|
const cppWorkerOptions = {
|
|
11808
11801
|
workerUrl: assets.cppWorker,
|
|
11809
11802
|
...cppCompilerWorkerFactory ? { workerFactory: cppCompilerWorkerFactory } : {},
|
|
11810
|
-
assetPreflight: () => runtimeAssetPreflight.preflight("cpp", ["worker"]),
|
|
11811
|
-
runtimeAssetPreflight: cppRuntimeAssetPreflight,
|
|
11812
11803
|
compilerWasmUrl: assets.cppCompilerWasm,
|
|
11813
11804
|
linkerWasmUrl: assets.cppLinkerWasm,
|
|
11814
11805
|
sysrootUrl: assets.cppSysroot,
|
|
@@ -11995,14 +11986,7 @@ function preflightAssets(language, surface, csharpPreparedAuthority) {
|
|
|
11995
11986
|
"runnerDependencies"
|
|
11996
11987
|
];
|
|
11997
11988
|
case "cpp":
|
|
11998
|
-
return [
|
|
11999
|
-
"worker",
|
|
12000
|
-
"runtimeHeader",
|
|
12001
|
-
"compilerWasm",
|
|
12002
|
-
"linkerWasm",
|
|
12003
|
-
"sysroot",
|
|
12004
|
-
"compilerResources"
|
|
12005
|
-
];
|
|
11989
|
+
return [];
|
|
12006
11990
|
}
|
|
12007
11991
|
}
|
|
12008
11992
|
function detectEngine(userAgent = globalThis.navigator?.userAgent ?? "") {
|
|
@@ -12181,4 +12165,4 @@ export {
|
|
|
12181
12165
|
createBrowserProjectWorkspace,
|
|
12182
12166
|
createBrowserRuntimeEnvironment
|
|
12183
12167
|
};
|
|
12184
|
-
//# sourceMappingURL=chunk-
|
|
12168
|
+
//# sourceMappingURL=chunk-OXFBZTWZ.js.map
|