@tracecode/harness 0.16.5 → 0.16.7

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.
Files changed (31) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/{browser-runtime-provider-POTAJULA.js → browser-runtime-provider-BMDGQ3KS.js} +4 -4
  3. package/dist/{chunk-OXFBZTWZ.js → chunk-6FC562KX.js} +12 -12
  4. package/dist/{chunk-I2JLGVMT.js → chunk-EL32HALA.js} +5 -3
  5. package/dist/{chunk-JPDVJCVS.js → chunk-ERYCOWPS.js} +2 -2
  6. package/dist/{chunk-NHGF353L.js → chunk-GLWDM276.js} +9 -9
  7. package/dist/{chunk-GX4SGR3L.js → chunk-KYRVBA6G.js} +8 -7
  8. package/dist/{chunk-P5FQOYM4.js → chunk-ZX2AEA6Q.js} +2 -2
  9. package/dist/core.cjs +8 -8
  10. package/dist/core.js +1 -1
  11. package/dist/{cpp-worker-client-SKBOLX5Q.js → cpp-worker-client-GUABNYCC.js} +3 -3
  12. package/dist/{csharp-worker-client-GAUCDYVS.js → csharp-worker-client-3X7TM35A.js} +3 -3
  13. package/dist/internal/tracekernel-workspace.cjs +8 -8
  14. package/dist/internal/tracekernel-workspace.js +1 -1
  15. package/dist/{java-project-ASCLR77F.js → java-project-HKJVRSGW.js} +2 -2
  16. package/dist/judge.cjs +18 -14
  17. package/dist/judge.d.cts +2 -0
  18. package/dist/judge.d.ts +2 -0
  19. package/dist/judge.js +7 -6
  20. package/dist/{project-browser-VSLHVOH4.js → project-browser-MVPRY3P4.js} +2 -2
  21. package/dist/{project-browser-XKQ2MNK3.js → project-browser-OESLR46C.js} +2 -2
  22. package/dist/{project-browser-DKMZFGCJ.js → project-browser-UQPBIF52.js} +2 -2
  23. package/dist/{project-browser-YUBOA2Q4.js → project-browser-VA4JO24R.js} +2 -2
  24. package/dist/{project-browser-7MVLDAHN.js → project-browser-YM4F7OYW.js} +2 -2
  25. package/dist/{python-worker-client-R7K7HDO7.js → python-worker-client-FD6RJKAT.js} +3 -3
  26. package/dist/tracekernel.cjs +17 -14
  27. package/dist/tracekernel.js +3 -3
  28. package/package.json +3 -3
  29. package/runtime-assets.lock.json +14 -14
  30. package/workers/java/java-worker.js +30 -9
  31. package/workers/javascript/javascript-project-worker.js +7 -7
package/CHANGELOG.md CHANGED
@@ -6,6 +6,27 @@ This repo uses Git tags as release boundaries. Version notes below summarize wha
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.16.7] - 2026-08-14
10
+
11
+ ### Fixed
12
+
13
+ - Made Java's trusted init-time external-compiler authority control compile
14
+ requests instead of requiring an untrusted per-execution flag, and separated
15
+ browser/external artifact-cache identities.
16
+ - Forwarded the public C++ external-compiler endpoint into the prepared browser
17
+ provider without warming the unused in-browser TraceCC compiler.
18
+ - Failed Java external-compiler initialization closed when the runtime bridge
19
+ cannot install compiled class manifests, preventing silent browser-compiler
20
+ fallback.
21
+
22
+ ## [0.16.6] - 2026-08-14
23
+
24
+ ### Fixed
25
+
26
+ - Exposed the Java external-compiler endpoint through the public browser Judge
27
+ options, preserving a warm trusted compiler alongside disposable learner
28
+ runners in server-hosted browser authorities.
29
+
9
30
  ## [0.16.5] - 2026-08-12
10
31
 
11
32
  ### Added
@@ -2,9 +2,9 @@ var define = undefined;
2
2
  import {
3
3
  createCppBrowserRuntimeProvider,
4
4
  createTraceCCBrowserCompilerService
5
- } from "./chunk-GX4SGR3L.js";
6
- import "./chunk-I2JLGVMT.js";
7
- import "./chunk-NHGF353L.js";
5
+ } from "./chunk-KYRVBA6G.js";
6
+ import "./chunk-EL32HALA.js";
7
+ import "./chunk-GLWDM276.js";
8
8
  import "./chunk-5KH5ABPQ.js";
9
9
  import "./chunk-C2RUZCIL.js";
10
10
  import "./chunk-756Z7C6D.js";
@@ -12,4 +12,4 @@ export {
12
12
  createCppBrowserRuntimeProvider,
13
13
  createTraceCCBrowserCompilerService
14
14
  };
15
- //# sourceMappingURL=browser-runtime-provider-POTAJULA.js.map
15
+ //# sourceMappingURL=browser-runtime-provider-BMDGQ3KS.js.map
@@ -1,7 +1,7 @@
1
1
  var define = undefined;
2
2
  import {
3
3
  normalizeRuntimeProjectPath
4
- } from "./chunk-NHGF353L.js";
4
+ } from "./chunk-GLWDM276.js";
5
5
  import {
6
6
  _await,
7
7
  bounded,
@@ -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-7MVLDAHN.js"),
11516
- import("./python-worker-client-R7K7HDO7.js")
11515
+ import("./project-browser-YM4F7OYW.js"),
11516
+ import("./python-worker-client-FD6RJKAT.js")
11517
11517
  ]) : void 0,
11518
- hasProvider("javascript") || hasProvider("typescript") ? import("./project-browser-YUBOA2Q4.js") : void 0,
11518
+ hasProvider("javascript") || hasProvider("typescript") ? import("./project-browser-VA4JO24R.js") : void 0,
11519
11519
  hasProvider("java") ? Promise.all([
11520
- import("./project-browser-XKQ2MNK3.js"),
11521
- import("./java-project-ASCLR77F.js"),
11520
+ import("./project-browser-OESLR46C.js"),
11521
+ import("./java-project-HKJVRSGW.js"),
11522
11522
  import("./java-project-client-PEQKFTH6.js")
11523
11523
  ]) : void 0,
11524
11524
  hasProvider("csharp") ? Promise.all([
11525
- import("./project-browser-VSLHVOH4.js"),
11526
- import("./csharp-worker-client-GAUCDYVS.js")
11525
+ import("./project-browser-MVPRY3P4.js"),
11526
+ import("./csharp-worker-client-3X7TM35A.js")
11527
11527
  ]) : void 0,
11528
11528
  hasProvider("cpp") ? Promise.all([
11529
- import("./project-browser-DKMZFGCJ.js"),
11530
- import("./cpp-worker-client-SKBOLX5Q.js"),
11531
- import("./browser-runtime-provider-POTAJULA.js"),
11529
+ import("./project-browser-UQPBIF52.js"),
11530
+ import("./cpp-worker-client-GUABNYCC.js"),
11531
+ import("./browser-runtime-provider-BMDGQ3KS.js"),
11532
11532
  import("./tracecc-runtime-assets-G3BFH7LY.js")
11533
11533
  ]) : void 0
11534
11534
  ]);
@@ -12165,4 +12165,4 @@ export {
12165
12165
  createBrowserProjectWorkspace,
12166
12166
  createBrowserRuntimeEnvironment
12167
12167
  };
12168
- //# sourceMappingURL=chunk-OXFBZTWZ.js.map
12168
+ //# sourceMappingURL=chunk-6FC562KX.js.map
@@ -4,7 +4,7 @@ import {
4
4
  liftCodeBatchOutcome,
5
5
  liftCodeOutcome,
6
6
  liftTraceOutcome
7
- } from "./chunk-NHGF353L.js";
7
+ } from "./chunk-GLWDM276.js";
8
8
  import {
9
9
  WorkerCrashedError,
10
10
  WorkerReadyTimeoutError,
@@ -470,7 +470,9 @@ var CppWorkerClient = class {
470
470
  lldWasmUrl: this.options.linkerWasmUrl,
471
471
  sysrootUrl: this.options.sysrootUrl,
472
472
  runtimeHeaderUrl: this.options.runtimeHeaderUrl,
473
- traceccCompilerEnabled: Boolean(this.options.trustedCompilerService),
473
+ traceccCompilerEnabled: Boolean(
474
+ this.options.trustedCompilerService || this.externalCompilerUrl
475
+ ),
474
476
  compilerFrameUrl: this.compilerFrameUrl,
475
477
  compilerWorkerUrl: this.options.compilerWorkerUrl,
476
478
  toolchainIntegrity: this.options.compilerIntegrity
@@ -1370,4 +1372,4 @@ var CppWorkerClient = class {
1370
1372
  export {
1371
1373
  CppWorkerClient
1372
1374
  };
1373
- //# sourceMappingURL=chunk-I2JLGVMT.js.map
1375
+ //# sourceMappingURL=chunk-EL32HALA.js.map
@@ -3,7 +3,7 @@ import {
3
3
  createEmptyRuntimeTrace,
4
4
  liftCodeBatchOutcome,
5
5
  liftCodeOutcome
6
- } from "./chunk-NHGF353L.js";
6
+ } from "./chunk-GLWDM276.js";
7
7
  import {
8
8
  WorkerCrashedError,
9
9
  WorkerReadyTimeoutError,
@@ -559,4 +559,4 @@ export {
559
559
  PythonWorkerClient,
560
560
  isWorkerSupported
561
561
  };
562
- //# sourceMappingURL=chunk-JPDVJCVS.js.map
562
+ //# sourceMappingURL=chunk-ERYCOWPS.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.5",
6
+ version: "0.16.7",
7
7
  license: "AGPL-3.0-only",
8
8
  homepage: "https://tracecode.app",
9
9
  repository: {
@@ -269,7 +269,7 @@ var LANGUAGE_RUNTIME_INFOS = Object.freeze(
269
269
  "versionLabel": "Python 3.13.2",
270
270
  "executionPlatform": {
271
271
  "name": "TraceKernel",
272
- "version": "0.16.5"
272
+ "version": "0.16.7"
273
273
  },
274
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.",
275
275
  "runtime": {
@@ -296,7 +296,7 @@ var LANGUAGE_RUNTIME_INFOS = Object.freeze(
296
296
  "versionLabel": "JavaScript (ECMAScript 2023)",
297
297
  "executionPlatform": {
298
298
  "name": "TraceKernel",
299
- "version": "0.16.5"
299
+ "version": "0.16.7"
300
300
  },
301
301
  "runtime": {
302
302
  "name": "TraceKernel JavaScript runtime",
@@ -388,7 +388,7 @@ Binary Search Tree, Trie, and Graph are bundled too, but are not exposed globall
388
388
  "versionLabel": "TypeScript 5.9.3",
389
389
  "executionPlatform": {
390
390
  "name": "TraceKernel",
391
- "version": "0.16.5"
391
+ "version": "0.16.7"
392
392
  },
393
393
  "description": `TypeScript 5.9.3 is compiled with the TypeScript compiler and executed by TraceKernel's JavaScript runtime.
394
394
 
@@ -488,7 +488,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
488
488
  "versionLabel": "Java 23",
489
489
  "executionPlatform": {
490
490
  "name": "TraceKernel",
491
- "version": "0.16.5"
491
+ "version": "0.16.7"
492
492
  },
493
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.",
494
494
  "runtime": {
@@ -525,7 +525,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
525
525
  "versionLabel": "C# 14",
526
526
  "executionPlatform": {
527
527
  "name": "TraceKernel",
528
- "version": "0.16.5"
528
+ "version": "0.16.7"
529
529
  },
530
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.",
531
531
  "runtime": {
@@ -554,7 +554,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
554
554
  "versionLabel": "C++23",
555
555
  "executionPlatform": {
556
556
  "name": "TraceKernel",
557
- "version": "0.16.5"
557
+ "version": "0.16.7"
558
558
  },
559
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.",
560
560
  "runtime": {
@@ -706,7 +706,7 @@ var LANGUAGE_RUNTIME_OPEN_SOURCE_INFOS = Object.freeze(
706
706
  {
707
707
  "kind": "modifications",
708
708
  "label": "Runtime modifications",
709
- "url": "https://github.com/tracecodeapp/harness/tree/v0.16.5/workers/python/pyodide-0.29.3"
709
+ "url": "https://github.com/tracecodeapp/harness/tree/v0.16.7/workers/python/pyodide-0.29.3"
710
710
  }
711
711
  ]
712
712
  }
@@ -4433,4 +4433,4 @@ export {
4433
4433
  normalizeJavaSerializedResult,
4434
4434
  javaTraceHooksEventsToRuntimeTrace
4435
4435
  };
4436
- //# sourceMappingURL=chunk-NHGF353L.js.map
4436
+ //# sourceMappingURL=chunk-GLWDM276.js.map
@@ -1,7 +1,7 @@
1
1
  var define = undefined;
2
2
  import {
3
3
  CppWorkerClient
4
- } from "./chunk-I2JLGVMT.js";
4
+ } from "./chunk-EL32HALA.js";
5
5
  import {
6
6
  createPromotableBrowserBackgroundTask,
7
7
  createWorkerProtocolToken
@@ -851,25 +851,26 @@ function createCppBrowserRuntimeProvider(options = {}) {
851
851
  tracingTimeoutMs: options.tracingTimeoutMs,
852
852
  workerIdleTimeoutMs: options.workerIdleTimeoutMs,
853
853
  programCacheLimit: options.programCacheLimit,
854
- usePrecompiledHeader: options.usePrecompiledHeader
854
+ usePrecompiledHeader: options.usePrecompiledHeader,
855
+ externalCompilerUrl: options.externalCompilerUrl
855
856
  };
856
- const compilerService = createTraceCCBrowserCompilerService(compiler, {
857
+ const compilerService = options.externalCompilerUrl ? void 0 : createTraceCCBrowserCompilerService(compiler, {
857
858
  assets: context.assets,
858
859
  ...workerFactory ? { workerFactory } : {}
859
860
  });
860
861
  const createWorkerClient = () => new CppWorkerClient({
861
862
  ...workerOptions,
862
- trustedCompilerService: compilerService
863
+ ...compilerService ? { trustedCompilerService: compilerService } : {}
863
864
  });
864
865
  const preparedProvider = createCppPreparedExecutionProvider({
865
866
  createWorkerClient,
866
867
  warmCompilerOnInit: false,
867
- prewarmCompiler: () => compilerService.prewarmAssets(),
868
+ prewarmCompiler: () => compilerService?.prewarmAssets() ?? Promise.resolve(),
868
869
  scheduleCompilerPrewarm: createPromotableBrowserBackgroundTask
869
870
  });
870
871
  const preparedProviders = /* @__PURE__ */ new Map([["cpp", preparedProvider]]);
871
872
  const terminateCompiler = () => {
872
- compilerService.terminate();
873
+ compilerService?.terminate();
873
874
  };
874
875
  return {
875
876
  preparedProviders,
@@ -890,4 +891,4 @@ export {
890
891
  createTraceCCBrowserCompilerService,
891
892
  createCppBrowserRuntimeProvider
892
893
  };
893
- //# sourceMappingURL=chunk-GX4SGR3L.js.map
894
+ //# sourceMappingURL=chunk-KYRVBA6G.js.map
@@ -4,7 +4,7 @@ import {
4
4
  liftCodeBatchOutcome,
5
5
  liftTraceOutcome,
6
6
  withRuntimeTraceOptions
7
- } from "./chunk-NHGF353L.js";
7
+ } from "./chunk-GLWDM276.js";
8
8
  import {
9
9
  HostArtifactCache,
10
10
  WorkerCrashedError,
@@ -1124,4 +1124,4 @@ var CSharpWorkerClient = class {
1124
1124
  export {
1125
1125
  CSharpWorkerClient
1126
1126
  };
1127
- //# sourceMappingURL=chunk-P5FQOYM4.js.map
1127
+ //# sourceMappingURL=chunk-ZX2AEA6Q.js.map
package/dist/core.cjs CHANGED
@@ -189,7 +189,7 @@ module.exports = __toCommonJS(src_exports);
189
189
  // package.json
190
190
  var package_default = {
191
191
  name: "@tracecode/harness",
192
- version: "0.16.5",
192
+ version: "0.16.7",
193
193
  license: "AGPL-3.0-only",
194
194
  homepage: "https://tracecode.app",
195
195
  repository: {
@@ -455,7 +455,7 @@ var LANGUAGE_RUNTIME_INFOS = Object.freeze(
455
455
  "versionLabel": "Python 3.13.2",
456
456
  "executionPlatform": {
457
457
  "name": "TraceKernel",
458
- "version": "0.16.5"
458
+ "version": "0.16.7"
459
459
  },
460
460
  "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.",
461
461
  "runtime": {
@@ -482,7 +482,7 @@ var LANGUAGE_RUNTIME_INFOS = Object.freeze(
482
482
  "versionLabel": "JavaScript (ECMAScript 2023)",
483
483
  "executionPlatform": {
484
484
  "name": "TraceKernel",
485
- "version": "0.16.5"
485
+ "version": "0.16.7"
486
486
  },
487
487
  "runtime": {
488
488
  "name": "TraceKernel JavaScript runtime",
@@ -574,7 +574,7 @@ Binary Search Tree, Trie, and Graph are bundled too, but are not exposed globall
574
574
  "versionLabel": "TypeScript 5.9.3",
575
575
  "executionPlatform": {
576
576
  "name": "TraceKernel",
577
- "version": "0.16.5"
577
+ "version": "0.16.7"
578
578
  },
579
579
  "description": `TypeScript 5.9.3 is compiled with the TypeScript compiler and executed by TraceKernel's JavaScript runtime.
580
580
 
@@ -674,7 +674,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
674
674
  "versionLabel": "Java 23",
675
675
  "executionPlatform": {
676
676
  "name": "TraceKernel",
677
- "version": "0.16.5"
677
+ "version": "0.16.7"
678
678
  },
679
679
  "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.",
680
680
  "runtime": {
@@ -711,7 +711,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
711
711
  "versionLabel": "C# 14",
712
712
  "executionPlatform": {
713
713
  "name": "TraceKernel",
714
- "version": "0.16.5"
714
+ "version": "0.16.7"
715
715
  },
716
716
  "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.",
717
717
  "runtime": {
@@ -740,7 +740,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
740
740
  "versionLabel": "C++23",
741
741
  "executionPlatform": {
742
742
  "name": "TraceKernel",
743
- "version": "0.16.5"
743
+ "version": "0.16.7"
744
744
  },
745
745
  "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.",
746
746
  "runtime": {
@@ -892,7 +892,7 @@ var LANGUAGE_RUNTIME_OPEN_SOURCE_INFOS = Object.freeze(
892
892
  {
893
893
  "kind": "modifications",
894
894
  "label": "Runtime modifications",
895
- "url": "https://github.com/tracecodeapp/harness/tree/v0.16.5/workers/python/pyodide-0.29.3"
895
+ "url": "https://github.com/tracecodeapp/harness/tree/v0.16.7/workers/python/pyodide-0.29.3"
896
896
  }
897
897
  ]
898
898
  }
package/dist/core.js CHANGED
@@ -162,7 +162,7 @@ import {
162
162
  withRuntimeProjectCommandRunnerCapabilities,
163
163
  withRuntimeTraceOptions,
164
164
  writeRuntimeCommandStdinPipeBytes
165
- } from "./chunk-NHGF353L.js";
165
+ } from "./chunk-GLWDM276.js";
166
166
  import "./chunk-756Z7C6D.js";
167
167
  export {
168
168
  LANGUAGE_RUNTIME_INFOS,
@@ -1,12 +1,12 @@
1
1
  var define = undefined;
2
2
  import {
3
3
  CppWorkerClient
4
- } from "./chunk-I2JLGVMT.js";
5
- import "./chunk-NHGF353L.js";
4
+ } from "./chunk-EL32HALA.js";
5
+ import "./chunk-GLWDM276.js";
6
6
  import "./chunk-5KH5ABPQ.js";
7
7
  import "./chunk-C2RUZCIL.js";
8
8
  import "./chunk-756Z7C6D.js";
9
9
  export {
10
10
  CppWorkerClient
11
11
  };
12
- //# sourceMappingURL=cpp-worker-client-SKBOLX5Q.js.map
12
+ //# sourceMappingURL=cpp-worker-client-GUABNYCC.js.map
@@ -1,12 +1,12 @@
1
1
  var define = undefined;
2
2
  import {
3
3
  CSharpWorkerClient
4
- } from "./chunk-P5FQOYM4.js";
5
- import "./chunk-NHGF353L.js";
4
+ } from "./chunk-ZX2AEA6Q.js";
5
+ import "./chunk-GLWDM276.js";
6
6
  import "./chunk-5KH5ABPQ.js";
7
7
  import "./chunk-C2RUZCIL.js";
8
8
  import "./chunk-756Z7C6D.js";
9
9
  export {
10
10
  CSharpWorkerClient
11
11
  };
12
- //# sourceMappingURL=csharp-worker-client-GAUCDYVS.js.map
12
+ //# sourceMappingURL=csharp-worker-client-3X7TM35A.js.map
@@ -17081,7 +17081,7 @@ module.exports = __toCommonJS(workspace_exports);
17081
17081
  // package.json
17082
17082
  var package_default = {
17083
17083
  name: "@tracecode/harness",
17084
- version: "0.16.5",
17084
+ version: "0.16.7",
17085
17085
  license: "AGPL-3.0-only",
17086
17086
  homepage: "https://tracecode.app",
17087
17087
  repository: {
@@ -17347,7 +17347,7 @@ var LANGUAGE_RUNTIME_INFOS = Object.freeze(
17347
17347
  "versionLabel": "Python 3.13.2",
17348
17348
  "executionPlatform": {
17349
17349
  "name": "TraceKernel",
17350
- "version": "0.16.5"
17350
+ "version": "0.16.7"
17351
17351
  },
17352
17352
  "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.",
17353
17353
  "runtime": {
@@ -17374,7 +17374,7 @@ var LANGUAGE_RUNTIME_INFOS = Object.freeze(
17374
17374
  "versionLabel": "JavaScript (ECMAScript 2023)",
17375
17375
  "executionPlatform": {
17376
17376
  "name": "TraceKernel",
17377
- "version": "0.16.5"
17377
+ "version": "0.16.7"
17378
17378
  },
17379
17379
  "runtime": {
17380
17380
  "name": "TraceKernel JavaScript runtime",
@@ -17466,7 +17466,7 @@ Binary Search Tree, Trie, and Graph are bundled too, but are not exposed globall
17466
17466
  "versionLabel": "TypeScript 5.9.3",
17467
17467
  "executionPlatform": {
17468
17468
  "name": "TraceKernel",
17469
- "version": "0.16.5"
17469
+ "version": "0.16.7"
17470
17470
  },
17471
17471
  "description": `TypeScript 5.9.3 is compiled with the TypeScript compiler and executed by TraceKernel's JavaScript runtime.
17472
17472
 
@@ -17566,7 +17566,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
17566
17566
  "versionLabel": "Java 23",
17567
17567
  "executionPlatform": {
17568
17568
  "name": "TraceKernel",
17569
- "version": "0.16.5"
17569
+ "version": "0.16.7"
17570
17570
  },
17571
17571
  "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.",
17572
17572
  "runtime": {
@@ -17603,7 +17603,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
17603
17603
  "versionLabel": "C# 14",
17604
17604
  "executionPlatform": {
17605
17605
  "name": "TraceKernel",
17606
- "version": "0.16.5"
17606
+ "version": "0.16.7"
17607
17607
  },
17608
17608
  "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.",
17609
17609
  "runtime": {
@@ -17632,7 +17632,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
17632
17632
  "versionLabel": "C++23",
17633
17633
  "executionPlatform": {
17634
17634
  "name": "TraceKernel",
17635
- "version": "0.16.5"
17635
+ "version": "0.16.7"
17636
17636
  },
17637
17637
  "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.",
17638
17638
  "runtime": {
@@ -17784,7 +17784,7 @@ var LANGUAGE_RUNTIME_OPEN_SOURCE_INFOS = Object.freeze(
17784
17784
  {
17785
17785
  "kind": "modifications",
17786
17786
  "label": "Runtime modifications",
17787
- "url": "https://github.com/tracecodeapp/harness/tree/v0.16.5/workers/python/pyodide-0.29.3"
17787
+ "url": "https://github.com/tracecodeapp/harness/tree/v0.16.7/workers/python/pyodide-0.29.3"
17788
17788
  }
17789
17789
  ]
17790
17790
  }
@@ -162,7 +162,7 @@ import {
162
162
  withRuntimeProjectCommandRunnerCapabilities,
163
163
  withRuntimeTraceOptions,
164
164
  writeRuntimeCommandStdinPipeBytes
165
- } from "../chunk-NHGF353L.js";
165
+ } from "../chunk-GLWDM276.js";
166
166
  import {
167
167
  TraceKernelChildProcessError,
168
168
  TraceKernelControlledRuntime,
@@ -4,7 +4,7 @@ import {
4
4
  runtimeAbortSignalName,
5
5
  runtimeSignalExitCode,
6
6
  withRuntimeProjectCommandRunnerCapabilities
7
- } from "./chunk-NHGF353L.js";
7
+ } from "./chunk-GLWDM276.js";
8
8
  import "./chunk-756Z7C6D.js";
9
9
 
10
10
  // packages/runtime-java/src/java-project.ts
@@ -484,4 +484,4 @@ export {
484
484
  JAVA_PROJECT_CAPABILITIES,
485
485
  createJavaProjectRunner
486
486
  };
487
- //# sourceMappingURL=java-project-ASCLR77F.js.map
487
+ //# sourceMappingURL=java-project-HKJVRSGW.js.map
package/dist/judge.cjs CHANGED
@@ -13074,7 +13074,7 @@ var init_runtime_language_info_data = __esm({
13074
13074
  "versionLabel": "Python 3.13.2",
13075
13075
  "executionPlatform": {
13076
13076
  "name": "TraceKernel",
13077
- "version": "0.16.5"
13077
+ "version": "0.16.7"
13078
13078
  },
13079
13079
  "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.",
13080
13080
  "runtime": {
@@ -13101,7 +13101,7 @@ var init_runtime_language_info_data = __esm({
13101
13101
  "versionLabel": "JavaScript (ECMAScript 2023)",
13102
13102
  "executionPlatform": {
13103
13103
  "name": "TraceKernel",
13104
- "version": "0.16.5"
13104
+ "version": "0.16.7"
13105
13105
  },
13106
13106
  "runtime": {
13107
13107
  "name": "TraceKernel JavaScript runtime",
@@ -13193,7 +13193,7 @@ Binary Search Tree, Trie, and Graph are bundled too, but are not exposed globall
13193
13193
  "versionLabel": "TypeScript 5.9.3",
13194
13194
  "executionPlatform": {
13195
13195
  "name": "TraceKernel",
13196
- "version": "0.16.5"
13196
+ "version": "0.16.7"
13197
13197
  },
13198
13198
  "description": `TypeScript 5.9.3 is compiled with the TypeScript compiler and executed by TraceKernel's JavaScript runtime.
13199
13199
 
@@ -13293,7 +13293,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
13293
13293
  "versionLabel": "Java 23",
13294
13294
  "executionPlatform": {
13295
13295
  "name": "TraceKernel",
13296
- "version": "0.16.5"
13296
+ "version": "0.16.7"
13297
13297
  },
13298
13298
  "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.",
13299
13299
  "runtime": {
@@ -13330,7 +13330,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
13330
13330
  "versionLabel": "C# 14",
13331
13331
  "executionPlatform": {
13332
13332
  "name": "TraceKernel",
13333
- "version": "0.16.5"
13333
+ "version": "0.16.7"
13334
13334
  },
13335
13335
  "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.",
13336
13336
  "runtime": {
@@ -13359,7 +13359,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
13359
13359
  "versionLabel": "C++23",
13360
13360
  "executionPlatform": {
13361
13361
  "name": "TraceKernel",
13362
- "version": "0.16.5"
13362
+ "version": "0.16.7"
13363
13363
  },
13364
13364
  "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.",
13365
13365
  "runtime": {
@@ -13524,7 +13524,7 @@ var init_runtime_open_source_info_data = __esm({
13524
13524
  {
13525
13525
  "kind": "modifications",
13526
13526
  "label": "Runtime modifications",
13527
- "url": "https://github.com/tracecodeapp/harness/tree/v0.16.5/workers/python/pyodide-0.29.3"
13527
+ "url": "https://github.com/tracecodeapp/harness/tree/v0.16.7/workers/python/pyodide-0.29.3"
13528
13528
  }
13529
13529
  ]
13530
13530
  }
@@ -15213,7 +15213,7 @@ var init_package = __esm({
15213
15213
  "package.json"() {
15214
15214
  package_default = {
15215
15215
  name: "@tracecode/harness",
15216
- version: "0.16.5",
15216
+ version: "0.16.7",
15217
15217
  license: "AGPL-3.0-only",
15218
15218
  homepage: "https://tracecode.app",
15219
15219
  repository: {
@@ -31172,7 +31172,9 @@ var init_cpp_worker_client = __esm({
31172
31172
  lldWasmUrl: this.options.linkerWasmUrl,
31173
31173
  sysrootUrl: this.options.sysrootUrl,
31174
31174
  runtimeHeaderUrl: this.options.runtimeHeaderUrl,
31175
- traceccCompilerEnabled: Boolean(this.options.trustedCompilerService),
31175
+ traceccCompilerEnabled: Boolean(
31176
+ this.options.trustedCompilerService || this.externalCompilerUrl
31177
+ ),
31176
31178
  compilerFrameUrl: this.compilerFrameUrl,
31177
31179
  compilerWorkerUrl: this.options.compilerWorkerUrl,
31178
31180
  toolchainIntegrity: this.options.compilerIntegrity
@@ -32682,25 +32684,26 @@ function createCppBrowserRuntimeProvider(options = {}) {
32682
32684
  tracingTimeoutMs: options.tracingTimeoutMs,
32683
32685
  workerIdleTimeoutMs: options.workerIdleTimeoutMs,
32684
32686
  programCacheLimit: options.programCacheLimit,
32685
- usePrecompiledHeader: options.usePrecompiledHeader
32687
+ usePrecompiledHeader: options.usePrecompiledHeader,
32688
+ externalCompilerUrl: options.externalCompilerUrl
32686
32689
  };
32687
- const compilerService = createTraceCCBrowserCompilerService(compiler, {
32690
+ const compilerService = options.externalCompilerUrl ? void 0 : createTraceCCBrowserCompilerService(compiler, {
32688
32691
  assets: context2.assets,
32689
32692
  ...workerFactory ? { workerFactory } : {}
32690
32693
  });
32691
32694
  const createWorkerClient = () => new CppWorkerClient({
32692
32695
  ...workerOptions,
32693
- trustedCompilerService: compilerService
32696
+ ...compilerService ? { trustedCompilerService: compilerService } : {}
32694
32697
  });
32695
32698
  const preparedProvider = createCppPreparedExecutionProvider({
32696
32699
  createWorkerClient,
32697
32700
  warmCompilerOnInit: false,
32698
- prewarmCompiler: () => compilerService.prewarmAssets(),
32701
+ prewarmCompiler: () => compilerService?.prewarmAssets() ?? Promise.resolve(),
32699
32702
  scheduleCompilerPrewarm: createPromotableBrowserBackgroundTask
32700
32703
  });
32701
32704
  const preparedProviders = /* @__PURE__ */ new Map([["cpp", preparedProvider]]);
32702
32705
  const terminateCompiler = () => {
32703
- compilerService.terminate();
32706
+ compilerService?.terminate();
32704
32707
  };
32705
32708
  return {
32706
32709
  preparedProviders,
@@ -130326,6 +130329,7 @@ function createJavaBrowserRuntimeProvider(options = {}) {
130326
130329
  debug: context2.debug,
130327
130330
  workerIdleTimeoutMs: options.workerIdleTimeoutMs,
130328
130331
  compileCacheLimit: options.compileCacheLimit,
130332
+ externalCompilerUrl: options.externalCompilerUrl,
130329
130333
  assetPreflight: context2.preflight("java", ["worker"])
130330
130334
  };
130331
130335
  const preparedProvider = createJavaBrowserPreparedExecutionProvider(workerOptions);
package/dist/judge.d.cts CHANGED
@@ -873,6 +873,8 @@ interface BrowserJudgePythonOptions {
873
873
  interface BrowserJudgeJavaOptions {
874
874
  readonly workerIdleTimeoutMs?: number;
875
875
  readonly compileCacheLimit?: number;
876
+ /** Same-origin trusted Java compiler endpoint. */
877
+ readonly externalCompilerUrl?: string;
876
878
  /** Immutable TraceJVM asset tree used by the Java worker. */
877
879
  readonly runtimeAssetBaseUrl?: string;
878
880
  }
package/dist/judge.d.ts CHANGED
@@ -873,6 +873,8 @@ interface BrowserJudgePythonOptions {
873
873
  interface BrowserJudgeJavaOptions {
874
874
  readonly workerIdleTimeoutMs?: number;
875
875
  readonly compileCacheLimit?: number;
876
+ /** Same-origin trusted Java compiler endpoint. */
877
+ readonly externalCompilerUrl?: string;
876
878
  /** Immutable TraceJVM asset tree used by the Java worker. */
877
879
  readonly runtimeAssetBaseUrl?: string;
878
880
  }
package/dist/judge.js CHANGED
@@ -1,8 +1,8 @@
1
1
  var define = undefined;
2
2
  import {
3
3
  createCppBrowserRuntimeProvider
4
- } from "./chunk-GX4SGR3L.js";
5
- import "./chunk-I2JLGVMT.js";
4
+ } from "./chunk-KYRVBA6G.js";
5
+ import "./chunk-EL32HALA.js";
6
6
  import {
7
7
  normalizeTraceJVMRuntimeAssetBaseUrl,
8
8
  preflightBuiltInTraceJVMRuntimeAssets,
@@ -10,20 +10,20 @@ import {
10
10
  } from "./chunk-FYDQ4ZKL.js";
11
11
  import {
12
12
  CSharpWorkerClient
13
- } from "./chunk-P5FQOYM4.js";
13
+ } from "./chunk-ZX2AEA6Q.js";
14
14
  import {
15
15
  PYTHON_RUNTIME_IMAGE_PROTOCOL_VERSION,
16
16
  createBrowserProjectWorkspace,
17
17
  createBrowserRuntimeAssetPreflight,
18
18
  createBrowserRuntimeEnvironment,
19
19
  makeTraceKernelHost
20
- } from "./chunk-OXFBZTWZ.js";
20
+ } from "./chunk-6FC562KX.js";
21
21
  import {
22
22
  resolveBuiltInTraceCCRuntimeManifest
23
23
  } from "./chunk-EJE2EJDI.js";
24
24
  import {
25
25
  PythonWorkerClient
26
- } from "./chunk-JPDVJCVS.js";
26
+ } from "./chunk-ERYCOWPS.js";
27
27
  import {
28
28
  RUNTIME_TRACE_SCHEMA_VERSION,
29
29
  createEmptyRuntimeTrace,
@@ -32,7 +32,7 @@ import {
32
32
  liftCodeOutcome,
33
33
  liftTraceOutcome,
34
34
  runtimeWorkspaceActorPreset
35
- } from "./chunk-NHGF353L.js";
35
+ } from "./chunk-GLWDM276.js";
36
36
  import {
37
37
  TraceKernelControlledRuntime,
38
38
  TraceKernelSharedSyscallServer,
@@ -4594,6 +4594,7 @@ function createJavaBrowserRuntimeProvider(options = {}) {
4594
4594
  debug: context.debug,
4595
4595
  workerIdleTimeoutMs: options.workerIdleTimeoutMs,
4596
4596
  compileCacheLimit: options.compileCacheLimit,
4597
+ externalCompilerUrl: options.externalCompilerUrl,
4597
4598
  assetPreflight: context.preflight("java", ["worker"])
4598
4599
  };
4599
4600
  const preparedProvider = createJavaBrowserPreparedExecutionProvider(workerOptions);
@@ -3,7 +3,7 @@ import {
3
3
  createRuntimeProjectIoBridge,
4
4
  runRuntimeProjectWorkerBridge,
5
5
  withRuntimeProjectCommandRunnerCapabilities
6
- } from "./chunk-NHGF353L.js";
6
+ } from "./chunk-GLWDM276.js";
7
7
  import "./chunk-756Z7C6D.js";
8
8
 
9
9
  // packages/runtime-csharp/src/project-browser.ts
@@ -79,4 +79,4 @@ function createBrowserCSharpProjectRunner(workerClient, options = {}) {
79
79
  export {
80
80
  createBrowserCSharpProjectRunner
81
81
  };
82
- //# sourceMappingURL=project-browser-VSLHVOH4.js.map
82
+ //# sourceMappingURL=project-browser-MVPRY3P4.js.map
@@ -3,7 +3,7 @@ import {
3
3
  createRuntimeProjectIoBridge,
4
4
  runRuntimeProjectWorkerBridge,
5
5
  withRuntimeProjectCommandRunnerCapabilities
6
- } from "./chunk-NHGF353L.js";
6
+ } from "./chunk-GLWDM276.js";
7
7
  import "./chunk-756Z7C6D.js";
8
8
 
9
9
  // packages/runtime-java/src/project-browser.ts
@@ -77,4 +77,4 @@ function createBrowserJavaProjectRunner(workerClient, options = {}) {
77
77
  export {
78
78
  createBrowserJavaProjectRunner
79
79
  };
80
- //# sourceMappingURL=project-browser-XKQ2MNK3.js.map
80
+ //# sourceMappingURL=project-browser-OESLR46C.js.map
@@ -2,7 +2,7 @@ var define = undefined;
2
2
  import {
3
3
  runRuntimeProjectWorkerBridge,
4
4
  withRuntimeProjectCommandRunnerCapabilities
5
- } from "./chunk-NHGF353L.js";
5
+ } from "./chunk-GLWDM276.js";
6
6
  import "./chunk-756Z7C6D.js";
7
7
 
8
8
  // packages/runtime-cpp/src/project-browser.ts
@@ -32,4 +32,4 @@ function createBrowserCppProjectRunner(workerClient, options = {}) {
32
32
  export {
33
33
  createBrowserCppProjectRunner
34
34
  };
35
- //# sourceMappingURL=project-browser-DKMZFGCJ.js.map
35
+ //# sourceMappingURL=project-browser-UQPBIF52.js.map
@@ -53,7 +53,7 @@ import {
53
53
  runtimeKernelWriteFsErrorMessage,
54
54
  runtimeKernelWriteTarget,
55
55
  runtimeProjectInfrastructureFailure
56
- } from "./chunk-NHGF353L.js";
56
+ } from "./chunk-GLWDM276.js";
57
57
  import {
58
58
  decodeTraceKernelWatchEvent
59
59
  } from "./chunk-LTRAP6OY.js";
@@ -10865,4 +10865,4 @@ export {
10865
10865
  createBrowserTypeScriptProjectRunner,
10866
10866
  runBrowserJavaScriptProjectRequest
10867
10867
  };
10868
- //# sourceMappingURL=project-browser-YUBOA2Q4.js.map
10868
+ //# sourceMappingURL=project-browser-VA4JO24R.js.map
@@ -2,7 +2,7 @@ var define = undefined;
2
2
  import {
3
3
  runRuntimeProjectWorkerBridge,
4
4
  withRuntimeProjectCommandRunnerCapabilities
5
- } from "./chunk-NHGF353L.js";
5
+ } from "./chunk-GLWDM276.js";
6
6
  import "./chunk-756Z7C6D.js";
7
7
 
8
8
  // packages/runtime-python/src/project-browser.ts
@@ -35,4 +35,4 @@ function createBrowserPythonProjectRunner(workerClient, options = {}) {
35
35
  export {
36
36
  createBrowserPythonProjectRunner
37
37
  };
38
- //# sourceMappingURL=project-browser-7MVLDAHN.js.map
38
+ //# sourceMappingURL=project-browser-YM4F7OYW.js.map
@@ -2,8 +2,8 @@ var define = undefined;
2
2
  import {
3
3
  PythonWorkerClient,
4
4
  isWorkerSupported
5
- } from "./chunk-JPDVJCVS.js";
6
- import "./chunk-NHGF353L.js";
5
+ } from "./chunk-ERYCOWPS.js";
6
+ import "./chunk-GLWDM276.js";
7
7
  import "./chunk-5KH5ABPQ.js";
8
8
  import "./chunk-C2RUZCIL.js";
9
9
  import "./chunk-756Z7C6D.js";
@@ -11,4 +11,4 @@ export {
11
11
  PythonWorkerClient,
12
12
  isWorkerSupported
13
13
  };
14
- //# sourceMappingURL=python-worker-client-R7K7HDO7.js.map
14
+ //# sourceMappingURL=python-worker-client-FD6RJKAT.js.map
@@ -13521,7 +13521,7 @@ var init_package = __esm({
13521
13521
  "package.json"() {
13522
13522
  package_default = {
13523
13523
  name: "@tracecode/harness",
13524
- version: "0.16.5",
13524
+ version: "0.16.7",
13525
13525
  license: "AGPL-3.0-only",
13526
13526
  homepage: "https://tracecode.app",
13527
13527
  repository: {
@@ -13800,7 +13800,7 @@ var init_runtime_language_info_data = __esm({
13800
13800
  "versionLabel": "Python 3.13.2",
13801
13801
  "executionPlatform": {
13802
13802
  "name": "TraceKernel",
13803
- "version": "0.16.5"
13803
+ "version": "0.16.7"
13804
13804
  },
13805
13805
  "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.",
13806
13806
  "runtime": {
@@ -13827,7 +13827,7 @@ var init_runtime_language_info_data = __esm({
13827
13827
  "versionLabel": "JavaScript (ECMAScript 2023)",
13828
13828
  "executionPlatform": {
13829
13829
  "name": "TraceKernel",
13830
- "version": "0.16.5"
13830
+ "version": "0.16.7"
13831
13831
  },
13832
13832
  "runtime": {
13833
13833
  "name": "TraceKernel JavaScript runtime",
@@ -13919,7 +13919,7 @@ Binary Search Tree, Trie, and Graph are bundled too, but are not exposed globall
13919
13919
  "versionLabel": "TypeScript 5.9.3",
13920
13920
  "executionPlatform": {
13921
13921
  "name": "TraceKernel",
13922
- "version": "0.16.5"
13922
+ "version": "0.16.7"
13923
13923
  },
13924
13924
  "description": `TypeScript 5.9.3 is compiled with the TypeScript compiler and executed by TraceKernel's JavaScript runtime.
13925
13925
 
@@ -14019,7 +14019,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
14019
14019
  "versionLabel": "Java 23",
14020
14020
  "executionPlatform": {
14021
14021
  "name": "TraceKernel",
14022
- "version": "0.16.5"
14022
+ "version": "0.16.7"
14023
14023
  },
14024
14024
  "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.",
14025
14025
  "runtime": {
@@ -14056,7 +14056,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
14056
14056
  "versionLabel": "C# 14",
14057
14057
  "executionPlatform": {
14058
14058
  "name": "TraceKernel",
14059
- "version": "0.16.5"
14059
+ "version": "0.16.7"
14060
14060
  },
14061
14061
  "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.",
14062
14062
  "runtime": {
@@ -14085,7 +14085,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
14085
14085
  "versionLabel": "C++23",
14086
14086
  "executionPlatform": {
14087
14087
  "name": "TraceKernel",
14088
- "version": "0.16.5"
14088
+ "version": "0.16.7"
14089
14089
  },
14090
14090
  "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.",
14091
14091
  "runtime": {
@@ -14250,7 +14250,7 @@ var init_runtime_open_source_info_data = __esm({
14250
14250
  {
14251
14251
  "kind": "modifications",
14252
14252
  "label": "Runtime modifications",
14253
- "url": "https://github.com/tracecodeapp/harness/tree/v0.16.5/workers/python/pyodide-0.29.3"
14253
+ "url": "https://github.com/tracecodeapp/harness/tree/v0.16.7/workers/python/pyodide-0.29.3"
14254
14254
  }
14255
14255
  ]
14256
14256
  }
@@ -122582,7 +122582,9 @@ var init_cpp_worker_client = __esm({
122582
122582
  lldWasmUrl: this.options.linkerWasmUrl,
122583
122583
  sysrootUrl: this.options.sysrootUrl,
122584
122584
  runtimeHeaderUrl: this.options.runtimeHeaderUrl,
122585
- traceccCompilerEnabled: Boolean(this.options.trustedCompilerService),
122585
+ traceccCompilerEnabled: Boolean(
122586
+ this.options.trustedCompilerService || this.externalCompilerUrl
122587
+ ),
122586
122588
  compilerFrameUrl: this.compilerFrameUrl,
122587
122589
  compilerWorkerUrl: this.options.compilerWorkerUrl,
122588
122590
  toolchainIntegrity: this.options.compilerIntegrity
@@ -124331,25 +124333,26 @@ function createCppBrowserRuntimeProvider(options = {}) {
124331
124333
  tracingTimeoutMs: options.tracingTimeoutMs,
124332
124334
  workerIdleTimeoutMs: options.workerIdleTimeoutMs,
124333
124335
  programCacheLimit: options.programCacheLimit,
124334
- usePrecompiledHeader: options.usePrecompiledHeader
124336
+ usePrecompiledHeader: options.usePrecompiledHeader,
124337
+ externalCompilerUrl: options.externalCompilerUrl
124335
124338
  };
124336
- const compilerService = createTraceCCBrowserCompilerService(compiler, {
124339
+ const compilerService = options.externalCompilerUrl ? void 0 : createTraceCCBrowserCompilerService(compiler, {
124337
124340
  assets: context2.assets,
124338
124341
  ...workerFactory ? { workerFactory } : {}
124339
124342
  });
124340
124343
  const createWorkerClient = () => new CppWorkerClient({
124341
124344
  ...workerOptions,
124342
- trustedCompilerService: compilerService
124345
+ ...compilerService ? { trustedCompilerService: compilerService } : {}
124343
124346
  });
124344
124347
  const preparedProvider = createCppPreparedExecutionProvider({
124345
124348
  createWorkerClient,
124346
124349
  warmCompilerOnInit: false,
124347
- prewarmCompiler: () => compilerService.prewarmAssets(),
124350
+ prewarmCompiler: () => compilerService?.prewarmAssets() ?? Promise.resolve(),
124348
124351
  scheduleCompilerPrewarm: createPromotableBrowserBackgroundTask
124349
124352
  });
124350
124353
  const preparedProviders = /* @__PURE__ */ new Map([["cpp", preparedProvider]]);
124351
124354
  const terminateCompiler = () => {
124352
- compilerService.terminate();
124355
+ compilerService?.terminate();
124353
124356
  };
124354
124357
  return {
124355
124358
  preparedProviders,
@@ -61,7 +61,7 @@ import {
61
61
  makeTraceKernelSharedSyscallChannel,
62
62
  resolveBrowserRuntimeAssetManifests,
63
63
  resolveBrowserRuntimeAssets
64
- } from "./chunk-OXFBZTWZ.js";
64
+ } from "./chunk-6FC562KX.js";
65
65
  import {
66
66
  TRACECC_RUNTIME_ASSET_RELATIVE_PATH,
67
67
  TRACECC_RUNTIME_CONTENT_HASH,
@@ -72,7 +72,7 @@ import {
72
72
  } from "./chunk-EJE2EJDI.js";
73
73
  import {
74
74
  PythonWorkerClient
75
- } from "./chunk-JPDVJCVS.js";
75
+ } from "./chunk-ERYCOWPS.js";
76
76
  import {
77
77
  LANGUAGE_RUNTIME_INFOS,
78
78
  LANGUAGE_RUNTIME_OPEN_SOURCE_INFOS,
@@ -236,7 +236,7 @@ import {
236
236
  withRuntimeProjectCommandRunnerCapabilities,
237
237
  withRuntimeTraceOptions,
238
238
  writeRuntimeCommandStdinPipeBytes
239
- } from "./chunk-NHGF353L.js";
239
+ } from "./chunk-GLWDM276.js";
240
240
  import {
241
241
  _await,
242
242
  bounded,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tracecode/harness",
3
- "version": "0.16.5",
3
+ "version": "0.16.7",
4
4
  "license": "AGPL-3.0-only",
5
5
  "homepage": "https://tracecode.app",
6
6
  "repository": {
@@ -65,8 +65,8 @@
65
65
  "tsup": "^8.5.0",
66
66
  "tsx": "^4.21.0",
67
67
  "typescript": "^5.0.0",
68
- "@tracecode/runtime-contracts": "^0.16.5",
69
- "@tracecode/tracekernel": "^0.16.5"
68
+ "@tracecode/runtime-contracts": "^0.16.7",
69
+ "@tracecode/tracekernel": "^0.16.7"
70
70
  },
71
71
  "dependencies": {
72
72
  "@datastructures-js/binary-search-tree": "5.4.0",
@@ -2,12 +2,12 @@
2
2
  "schema": "tracecode.runtime-assets-lock.v1",
3
3
  "harness": {
4
4
  "name": "@tracecode/harness",
5
- "version": "0.16.5",
6
- "releaseId": "@tracecode/harness@0.16.5+sha256.c6ee3755a6514784ec821e10964ab96aeee35c35139fe33fedd8eda248721524"
5
+ "version": "0.16.7",
6
+ "releaseId": "@tracecode/harness@0.16.7+sha256.cebbba0bbcd7b57102dcc49d825e507cd3153271308303a659551ad0b596ccc7"
7
7
  },
8
8
  "treeSha256Algorithm": "sha256-path-nul-bytes-nul-v1",
9
- "packageTreeSha256": "c6ee3755a6514784ec821e10964ab96aeee35c35139fe33fedd8eda248721524",
10
- "totalPackagedRuntimeBytes": 151720964,
9
+ "packageTreeSha256": "cebbba0bbcd7b57102dcc49d825e507cd3153271308303a659551ad0b596ccc7",
10
+ "totalPackagedRuntimeBytes": 151721849,
11
11
  "components": {
12
12
  "cpp": {
13
13
  "releaseId": "cpp+sha256.9340d58c47a65abceff7fa7a783b57d01550d697013c2b50782aec77e6b19816",
@@ -1809,9 +1809,9 @@
1809
1809
  ]
1810
1810
  },
1811
1811
  "java": {
1812
- "releaseId": "java+sha256.1e0f657b97aa9c772e22115fa78f3ef667dc17ff7c62dd9ffacabfdba8bf0d0c",
1813
- "treeSha256": "1e0f657b97aa9c772e22115fa78f3ef667dc17ff7c62dd9ffacabfdba8bf0d0c",
1814
- "totalBytes": 602441,
1812
+ "releaseId": "java+sha256.edb99c14d07da3ac4fb41a52ea6ddc23c060c98311584eb1193e4cbde1d8afd9",
1813
+ "treeSha256": "edb99c14d07da3ac4fb41a52ea6ddc23c060c98311584eb1193e4cbde1d8afd9",
1814
+ "totalBytes": 603326,
1815
1815
  "files": [
1816
1816
  {
1817
1817
  "path": "workers/java/java-runtime-worker.js",
@@ -1829,9 +1829,9 @@
1829
1829
  },
1830
1830
  {
1831
1831
  "path": "workers/java/java-worker.js",
1832
- "size": 317127,
1833
- "sha256": "331c9e9e090def0d026e3efcfc48620d8a1347fa5e6c8956c49bd37947c20dbe",
1834
- "integrity": "sha256-MxyengkN7w0Cbj78/EhiDYoTR/pebIlWxJvTeUfCDb4=",
1832
+ "size": 318012,
1833
+ "sha256": "391f3b6a6aecee419892d05e2123683edb21b042e80f5111678e635a8eb30e0d",
1834
+ "integrity": "sha256-OR87amrs7kGYktBeISNoPtshsELoD1ERZ45jWo6zDg0=",
1835
1835
  "mediaType": "text/javascript"
1836
1836
  },
1837
1837
  {
@@ -1844,15 +1844,15 @@
1844
1844
  ]
1845
1845
  },
1846
1846
  "javascript": {
1847
- "releaseId": "javascript+sha256.6fb50d48194799a2f66b59a9ec92ba64b210abaf3278765bde5bfd682cdfca0e",
1848
- "treeSha256": "6fb50d48194799a2f66b59a9ec92ba64b210abaf3278765bde5bfd682cdfca0e",
1847
+ "releaseId": "javascript+sha256.fe615a05e50b54db86c546edefde77975ad4c52a5e17c91c31bc81cd2707e252",
1848
+ "treeSha256": "fe615a05e50b54db86c546edefde77975ad4c52a5e17c91c31bc81cd2707e252",
1849
1849
  "totalBytes": 1204569,
1850
1850
  "files": [
1851
1851
  {
1852
1852
  "path": "workers/javascript/javascript-project-worker.js",
1853
1853
  "size": 562771,
1854
- "sha256": "e3e1635d322831f1e217b3f095ad437c16c8092c05bb600d4e5295c6da8119fe",
1855
- "integrity": "sha256-4+FjXTIoMfHiF7Pwla1DfBbICSwFu2ANTlKVxtqBGf4=",
1854
+ "sha256": "e0fde62145bbd56ff925b53570222fe5799bf51e4d21631e2dfb881537d5250c",
1855
+ "integrity": "sha256-4P3mIUW71W/5JbU1cCIv5Xmb9R5NIWMeLfuIFTfVJQw=",
1856
1856
  "mediaType": "text/javascript"
1857
1857
  },
1858
1858
  {
@@ -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(payload) {
5501
- return payload?.externalCompilerEnabled === true;
5505
+ function externalJavaCompilerEnabled() {
5506
+ return externalJavaCompilerConfigured;
5502
5507
  }
5503
5508
 
5504
- function externalJavaCompilerAvailable(payload, compileLibraryClass, methodName) {
5505
- return externalJavaCompilerEnabled(payload) && typeof compileLibraryClass?.[methodName] === 'function';
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(payload, compileLibraryClass, 'traceCompiledClassManifest')) {
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(payload, compileLibraryClass, 'runCompiledClassManifest')) {
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(payload, compileLibraryClass, 'runCompiledClassManifestBatch')) {
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.5",
1624
+ version: "0.16.7",
1625
1625
  license: "AGPL-3.0-only",
1626
1626
  homepage: "https://tracecode.app",
1627
1627
  repository: {
@@ -1887,7 +1887,7 @@ var LANGUAGE_RUNTIME_INFOS = Object.freeze(
1887
1887
  "versionLabel": "Python 3.13.2",
1888
1888
  "executionPlatform": {
1889
1889
  "name": "TraceKernel",
1890
- "version": "0.16.5"
1890
+ "version": "0.16.7"
1891
1891
  },
1892
1892
  "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
1893
  "runtime": {
@@ -1914,7 +1914,7 @@ var LANGUAGE_RUNTIME_INFOS = Object.freeze(
1914
1914
  "versionLabel": "JavaScript (ECMAScript 2023)",
1915
1915
  "executionPlatform": {
1916
1916
  "name": "TraceKernel",
1917
- "version": "0.16.5"
1917
+ "version": "0.16.7"
1918
1918
  },
1919
1919
  "runtime": {
1920
1920
  "name": "TraceKernel JavaScript runtime",
@@ -2006,7 +2006,7 @@ Binary Search Tree, Trie, and Graph are bundled too, but are not exposed globall
2006
2006
  "versionLabel": "TypeScript 5.9.3",
2007
2007
  "executionPlatform": {
2008
2008
  "name": "TraceKernel",
2009
- "version": "0.16.5"
2009
+ "version": "0.16.7"
2010
2010
  },
2011
2011
  "description": `TypeScript 5.9.3 is compiled with the TypeScript compiler and executed by TraceKernel's JavaScript runtime.
2012
2012
 
@@ -2106,7 +2106,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
2106
2106
  "versionLabel": "Java 23",
2107
2107
  "executionPlatform": {
2108
2108
  "name": "TraceKernel",
2109
- "version": "0.16.5"
2109
+ "version": "0.16.7"
2110
2110
  },
2111
2111
  "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
2112
  "runtime": {
@@ -2143,7 +2143,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
2143
2143
  "versionLabel": "C# 14",
2144
2144
  "executionPlatform": {
2145
2145
  "name": "TraceKernel",
2146
- "version": "0.16.5"
2146
+ "version": "0.16.7"
2147
2147
  },
2148
2148
  "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
2149
  "runtime": {
@@ -2172,7 +2172,7 @@ The compiled output runs on the same TraceKernel execution lane as JavaScript su
2172
2172
  "versionLabel": "C++23",
2173
2173
  "executionPlatform": {
2174
2174
  "name": "TraceKernel",
2175
- "version": "0.16.5"
2175
+ "version": "0.16.7"
2176
2176
  },
2177
2177
  "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
2178
  "runtime": {