@tracecode/harness 0.16.6 → 0.16.8
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 +26 -0
- package/dist/{browser-runtime-provider-KPQBQ4EG.js → browser-runtime-provider-X6OLUZSN.js} +4 -4
- package/dist/{chunk-46XZQOHV.js → chunk-32OZHBX6.js} +5 -3
- package/dist/{chunk-GXTDL2ML.js → chunk-B4XMQTD7.js} +10 -9
- package/dist/{chunk-4PN5YD6J.js → chunk-BZNOMJSC.js} +2 -2
- package/dist/{chunk-J2KGF5PU.js → chunk-DLRTNTVJ.js} +8 -7
- package/dist/{chunk-EPBHRROK.js → chunk-GQSM4APD.js} +2 -2
- package/dist/{chunk-B2EM2SZ2.js → chunk-IRI2XDVR.js} +12 -12
- package/dist/core.cjs +9 -8
- package/dist/core.js +1 -1
- package/dist/{cpp-worker-client-UWGDH6HR.js → cpp-worker-client-7NLJ7RKG.js} +3 -3
- package/dist/{csharp-worker-client-4QP2ZBSA.js → csharp-worker-client-LAIK4IXZ.js} +3 -3
- package/dist/internal/tracekernel-workspace.cjs +9 -8
- package/dist/internal/tracekernel-workspace.js +1 -1
- package/dist/{java-project-AEQEVBDA.js → java-project-WQNHWOFV.js} +2 -2
- package/dist/judge.cjs +27 -16
- package/dist/judge.js +15 -8
- package/dist/{project-browser-L3A2G2MA.js → project-browser-2OSJRVDB.js} +2 -2
- package/dist/{project-browser-P2H222D7.js → project-browser-CWX4AY24.js} +2 -2
- package/dist/{project-browser-WCSIJY6I.js → project-browser-JWQZTSDF.js} +2 -2
- package/dist/{project-browser-HFNQEALT.js → project-browser-OPSZJVFS.js} +2 -2
- package/dist/{project-browser-OVE7V464.js → project-browser-YF7EUUTQ.js} +2 -2
- package/dist/{python-worker-client-UCOMTSMU.js → python-worker-client-ON4LFEJD.js} +3 -3
- package/dist/tracekernel.cjs +18 -14
- package/dist/tracekernel.js +3 -3
- package/package.json +4 -3
- package/runtime-assets.lock.json +29 -21
- package/workers/java/java-worker.js +30 -9
- package/workers/javascript/javascript-project-worker.js +8 -7
- package/workers/python/pyodide-0.29.3/snapshots/provenance.json +36 -0
- package/workers/python/pyodide-0.29.3/snapshots/webkit.bin +0 -0
|
@@ -175,6 +175,7 @@ let activeJavaProjectIo = null;
|
|
|
175
175
|
let javaCompileIsolationCounter = 0;
|
|
176
176
|
let javaProjectBridgeRunCounter = 0;
|
|
177
177
|
let javaCompileCacheLimit = DEFAULT_JAVA_COMPILE_CACHE_LIMIT;
|
|
178
|
+
let externalJavaCompilerConfigured = false;
|
|
178
179
|
const javaCompileCache = new Map();
|
|
179
180
|
const preparedJavaRuntimePrograms = new Map();
|
|
180
181
|
const activeProtocolTokens = new Map();
|
|
@@ -930,7 +931,10 @@ function resetIdleTimer() {
|
|
|
930
931
|
}, idleTimeoutMs);
|
|
931
932
|
}
|
|
932
933
|
|
|
933
|
-
function applyWorkerOptions(payload) {
|
|
934
|
+
function applyWorkerOptions(payload, allowCompilerAuthorityChange = false) {
|
|
935
|
+
if (allowCompilerAuthorityChange) {
|
|
936
|
+
externalJavaCompilerConfigured = payload?.externalCompilerEnabled === true;
|
|
937
|
+
}
|
|
934
938
|
const nextIdleTimeoutMs = Number(payload?.idleTimeoutMs);
|
|
935
939
|
if (Number.isFinite(nextIdleTimeoutMs) && nextIdleTimeoutMs > 0) {
|
|
936
940
|
idleTimeoutMs = Math.max(1_000, Math.floor(nextIdleTimeoutMs));
|
|
@@ -4779,6 +4783,7 @@ function classicJavaCompileCacheKey(mode, stableCompileId) {
|
|
|
4779
4783
|
return stableHash({
|
|
4780
4784
|
version: JAVA_COMPILE_CACHE_VERSION,
|
|
4781
4785
|
mode,
|
|
4786
|
+
compilerAuthority: externalJavaCompilerEnabled() ? 'external' : 'browser',
|
|
4782
4787
|
stableCompileId,
|
|
4783
4788
|
helperJar: HELPER_JAR_PATH,
|
|
4784
4789
|
compilerJar: JDK17_COMPILER_JAR_PATH,
|
|
@@ -5497,12 +5502,12 @@ function javaReportConsoleOutput(report, options = {}) {
|
|
|
5497
5502
|
);
|
|
5498
5503
|
}
|
|
5499
5504
|
|
|
5500
|
-
function externalJavaCompilerEnabled(
|
|
5501
|
-
return
|
|
5505
|
+
function externalJavaCompilerEnabled() {
|
|
5506
|
+
return externalJavaCompilerConfigured;
|
|
5502
5507
|
}
|
|
5503
5508
|
|
|
5504
|
-
function externalJavaCompilerAvailable(
|
|
5505
|
-
return externalJavaCompilerEnabled(
|
|
5509
|
+
function externalJavaCompilerAvailable(compileLibraryClass, methodName) {
|
|
5510
|
+
return externalJavaCompilerEnabled() && typeof compileLibraryClass?.[methodName] === 'function';
|
|
5506
5511
|
}
|
|
5507
5512
|
|
|
5508
5513
|
function normalizeExternalJavaCompileResult(value) {
|
|
@@ -7090,7 +7095,7 @@ async function runJavaTraceRequest(payload, requestId) {
|
|
|
7090
7095
|
'true',
|
|
7091
7096
|
String(resolveMaxStoredEvents(payload.options))
|
|
7092
7097
|
);
|
|
7093
|
-
} else if (externalJavaCompilerAvailable(
|
|
7098
|
+
} else if (externalJavaCompilerAvailable(compileLibraryClass, 'traceCompiledClassManifest')) {
|
|
7094
7099
|
const externalCompile = await compileJavaOutsideBrowser({
|
|
7095
7100
|
schema: 'tracecode.java.external-compile.v1',
|
|
7096
7101
|
mode: 'trace',
|
|
@@ -7277,7 +7282,7 @@ async function runJavaCodeRequest(payload, requestId) {
|
|
|
7277
7282
|
'',
|
|
7278
7283
|
'true'
|
|
7279
7284
|
);
|
|
7280
|
-
} else if (externalJavaCompilerAvailable(
|
|
7285
|
+
} else if (externalJavaCompilerAvailable(compileLibraryClass, 'runCompiledClassManifest')) {
|
|
7281
7286
|
const externalCompile = await compileJavaOutsideBrowser({
|
|
7282
7287
|
schema: 'tracecode.java.external-compile.v1',
|
|
7283
7288
|
mode: 'execute',
|
|
@@ -7650,7 +7655,7 @@ async function runJavaCodeBatchRequest(payload, requestId) {
|
|
|
7650
7655
|
'',
|
|
7651
7656
|
'true'
|
|
7652
7657
|
);
|
|
7653
|
-
} else if (externalJavaCompilerAvailable(
|
|
7658
|
+
} else if (externalJavaCompilerAvailable(compileLibraryClass, 'runCompiledClassManifestBatch')) {
|
|
7654
7659
|
const externalCompile = await compileJavaOutsideBrowser({
|
|
7655
7660
|
schema: 'tracecode.java.external-compile.v1',
|
|
7656
7661
|
mode: 'execute-batch',
|
|
@@ -8475,9 +8480,24 @@ self.onmessage = (event) => {
|
|
|
8475
8480
|
if (message.type === 'init') {
|
|
8476
8481
|
queue = queue.then(async () => {
|
|
8477
8482
|
try {
|
|
8478
|
-
applyWorkerOptions(message.payload);
|
|
8483
|
+
applyWorkerOptions(message.payload, true);
|
|
8479
8484
|
const startedAt = performance.now();
|
|
8480
8485
|
await ensureReady();
|
|
8486
|
+
if (externalJavaCompilerEnabled()) {
|
|
8487
|
+
const compileLibraryClass = await getCompileLibraryClass();
|
|
8488
|
+
const missingMethods = [
|
|
8489
|
+
'runCompiledClassManifest',
|
|
8490
|
+
'traceCompiledClassManifest',
|
|
8491
|
+
'runCompiledClassManifestBatch',
|
|
8492
|
+
].filter((methodName) =>
|
|
8493
|
+
typeof compileLibraryClass?.[methodName] !== 'function'
|
|
8494
|
+
);
|
|
8495
|
+
if (missingMethods.length > 0) {
|
|
8496
|
+
throw new Error(
|
|
8497
|
+
`Java external compiler bridge is missing: ${missingMethods.join(', ')}`
|
|
8498
|
+
);
|
|
8499
|
+
}
|
|
8500
|
+
}
|
|
8481
8501
|
const totalMs = performance.now() - startedAt;
|
|
8482
8502
|
postMessageResponse({
|
|
8483
8503
|
id: message.id,
|
|
@@ -8485,6 +8505,7 @@ self.onmessage = (event) => {
|
|
|
8485
8505
|
payload: {
|
|
8486
8506
|
success: true,
|
|
8487
8507
|
loadTimeMs: Math.round(totalMs),
|
|
8508
|
+
externalCompilerEnabled: externalJavaCompilerEnabled(),
|
|
8488
8509
|
timings: {
|
|
8489
8510
|
totalMs,
|
|
8490
8511
|
initMs: initLoadTimeMs ?? 0,
|
|
@@ -1621,7 +1621,7 @@ var TraceKernelRuntimeFileClient = class {
|
|
|
1621
1621
|
// package.json
|
|
1622
1622
|
var package_default = {
|
|
1623
1623
|
name: "@tracecode/harness",
|
|
1624
|
-
version: "0.16.
|
|
1624
|
+
version: "0.16.8",
|
|
1625
1625
|
license: "AGPL-3.0-only",
|
|
1626
1626
|
homepage: "https://tracecode.app",
|
|
1627
1627
|
repository: {
|
|
@@ -1700,6 +1700,7 @@ var package_default = {
|
|
|
1700
1700
|
"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",
|
|
1701
1701
|
"generate:runtime-open-source-info": "pnpm exec tsx --tsconfig tsconfig.base.json scripts/generate-runtime-open-source-info.ts",
|
|
1702
1702
|
"generate:python-harness": "pnpm exec tsx --tsconfig tsconfig.base.json scripts/generate-python-harness-artifacts.ts",
|
|
1703
|
+
"build:python-runtime-snapshot": "node --import tsx scripts/build-python-runtime-snapshot.ts",
|
|
1703
1704
|
"generate:runtime-assets-lock": "node --import tsx scripts/generate-runtime-assets-lock.mjs",
|
|
1704
1705
|
"generate:typescript-project-libs": "pnpm exec tsx --tsconfig tsconfig.base.json scripts/generate-typescript-project-libs.ts",
|
|
1705
1706
|
"generate:javascript-project-worker": "pnpm exec esbuild packages/runtime-javascript/src/project-browser-worker.ts --bundle --format=esm --platform=browser --target=es2022 --outfile=workers/javascript/javascript-project-worker.js && node scripts/normalize-generated-worker-paths.mjs workers/javascript/javascript-project-worker.js",
|
|
@@ -1887,7 +1888,7 @@ var LANGUAGE_RUNTIME_INFOS = Object.freeze(
|
|
|
1887
1888
|
"versionLabel": "Python 3.13.2",
|
|
1888
1889
|
"executionPlatform": {
|
|
1889
1890
|
"name": "TraceKernel",
|
|
1890
|
-
"version": "0.16.
|
|
1891
|
+
"version": "0.16.8"
|
|
1891
1892
|
},
|
|
1892
1893
|
"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.",
|
|
1893
1894
|
"runtime": {
|
|
@@ -1914,7 +1915,7 @@ var LANGUAGE_RUNTIME_INFOS = Object.freeze(
|
|
|
1914
1915
|
"versionLabel": "JavaScript (ECMAScript 2023)",
|
|
1915
1916
|
"executionPlatform": {
|
|
1916
1917
|
"name": "TraceKernel",
|
|
1917
|
-
"version": "0.16.
|
|
1918
|
+
"version": "0.16.8"
|
|
1918
1919
|
},
|
|
1919
1920
|
"runtime": {
|
|
1920
1921
|
"name": "TraceKernel JavaScript runtime",
|
|
@@ -2006,7 +2007,7 @@ Binary Search Tree, Trie, and Graph are bundled too, but are not exposed globall
|
|
|
2006
2007
|
"versionLabel": "TypeScript 5.9.3",
|
|
2007
2008
|
"executionPlatform": {
|
|
2008
2009
|
"name": "TraceKernel",
|
|
2009
|
-
"version": "0.16.
|
|
2010
|
+
"version": "0.16.8"
|
|
2010
2011
|
},
|
|
2011
2012
|
"description": `TypeScript 5.9.3 is compiled with the TypeScript compiler and executed by TraceKernel's JavaScript runtime.
|
|
2012
2013
|
|
|
@@ -2106,7 +2107,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
|
|
|
2106
2107
|
"versionLabel": "Java 23",
|
|
2107
2108
|
"executionPlatform": {
|
|
2108
2109
|
"name": "TraceKernel",
|
|
2109
|
-
"version": "0.16.
|
|
2110
|
+
"version": "0.16.8"
|
|
2110
2111
|
},
|
|
2111
2112
|
"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.",
|
|
2112
2113
|
"runtime": {
|
|
@@ -2143,7 +2144,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
|
|
|
2143
2144
|
"versionLabel": "C# 14",
|
|
2144
2145
|
"executionPlatform": {
|
|
2145
2146
|
"name": "TraceKernel",
|
|
2146
|
-
"version": "0.16.
|
|
2147
|
+
"version": "0.16.8"
|
|
2147
2148
|
},
|
|
2148
2149
|
"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.",
|
|
2149
2150
|
"runtime": {
|
|
@@ -2172,7 +2173,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
|
|
|
2172
2173
|
"versionLabel": "C++23",
|
|
2173
2174
|
"executionPlatform": {
|
|
2174
2175
|
"name": "TraceKernel",
|
|
2175
|
-
"version": "0.16.
|
|
2176
|
+
"version": "0.16.8"
|
|
2176
2177
|
},
|
|
2177
2178
|
"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.",
|
|
2178
2179
|
"runtime": {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "tracecode.python-runtime-snapshot-provenance.v1",
|
|
3
|
+
"pyodideVersion": "0.29.3",
|
|
4
|
+
"snapshots": {
|
|
5
|
+
"chromium": {
|
|
6
|
+
"builtAt": null,
|
|
7
|
+
"bytes": 20971936,
|
|
8
|
+
"engine": "chromium",
|
|
9
|
+
"provenance": "legacy-unrecorded",
|
|
10
|
+
"pythonHashSeed": "0",
|
|
11
|
+
"runner": "legacy-unrecorded",
|
|
12
|
+
"sha256": "f6e5a59006c18656d10b591681fe6bd009b7d1385ec395a3b0080d333bbb8151",
|
|
13
|
+
"userAgent": null
|
|
14
|
+
},
|
|
15
|
+
"firefox": {
|
|
16
|
+
"builtAt": null,
|
|
17
|
+
"bytes": 20971936,
|
|
18
|
+
"engine": "firefox",
|
|
19
|
+
"provenance": "legacy-unrecorded",
|
|
20
|
+
"pythonHashSeed": "0",
|
|
21
|
+
"runner": "legacy-unrecorded",
|
|
22
|
+
"sha256": "a334a4720d75dbc92c2062f41eb7cab2a1cd98192748ad09f43fd1ba5cce3ba9",
|
|
23
|
+
"userAgent": null
|
|
24
|
+
},
|
|
25
|
+
"webkit": {
|
|
26
|
+
"builtAt": "2026-08-23T18:31:40.932Z",
|
|
27
|
+
"bytes": 20971936,
|
|
28
|
+
"engine": "webkit",
|
|
29
|
+
"provenance": "built-and-verified",
|
|
30
|
+
"pythonHashSeed": "0",
|
|
31
|
+
"runner": "ios-simulator",
|
|
32
|
+
"sha256": "5f59c4ced21854a6bb92dd74fb95a44d165e371165a37e19b3ffdc229bde2207",
|
|
33
|
+
"userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5 Mobile/15E148 Safari/604.1"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
Binary file
|