@wasm-oj/core 0.2.0 → 0.2.2
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/THIRD_PARTY_NOTICES.md +57 -30
- package/dist/index.d.ts +36 -148
- package/dist/index.js +312 -451
- package/licenses/quickjs-node-stdlib-LICENSES.txt +259 -0
- package/package.json +2 -2
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -65,13 +65,39 @@ package. The generated dependency report covers every package in the pinned
|
|
|
65
65
|
normal Cargo dependency graph selected for `wasm32-unknown-unknown`; its compact
|
|
66
66
|
inventory binds all 332 package identities and the exact HTML report digest.
|
|
67
67
|
|
|
68
|
+
### QuickJS guest Node standard I/O libraries
|
|
69
|
+
|
|
70
|
+
The generated guest prelude in `src/runtime/quickjs/stdlib.generated.ts` bundles
|
|
71
|
+
the following exact npm releases. `scripts/build-quickjs-stdlib.mjs` builds this
|
|
72
|
+
prelude from the locked packages and the WASM-OJ standard I/O adapters.
|
|
73
|
+
|
|
74
|
+
| Component | Source release | License |
|
|
75
|
+
| --- | --- | --- |
|
|
76
|
+
| buffer 6.0.3 | <https://github.com/feross/buffer/tree/v6.0.3> | MIT |
|
|
77
|
+
| readable-stream 4.7.0 | <https://github.com/nodejs/readable-stream/tree/v4.7.0> | MIT |
|
|
78
|
+
| events 3.3.0 | <https://github.com/Gozala/events/tree/v3.3.0> | MIT |
|
|
79
|
+
| abort-controller 3.0.0 | <https://github.com/mysticatea/abort-controller/tree/v3.0.0> | MIT |
|
|
80
|
+
| event-target-shim 5.0.1 | <https://github.com/mysticatea/event-target-shim/tree/v5.0.1> | MIT |
|
|
81
|
+
| base64-js 1.5.1 | <https://github.com/beatgammit/base64-js/tree/v1.5.1> | MIT |
|
|
82
|
+
| ieee754 1.2.1 | <https://github.com/feross/ieee754/tree/v1.2.1> | BSD-3-Clause |
|
|
83
|
+
| string_decoder 1.3.0 | <https://github.com/nodejs/string_decoder/tree/v1.3.0> | MIT |
|
|
84
|
+
| safe-buffer 5.2.1 | <https://github.com/feross/safe-buffer/tree/v5.2.1> | MIT |
|
|
85
|
+
|
|
86
|
+
The complete upstream license texts, including the Node-derived stream and
|
|
87
|
+
decoder notices, are reproduced in `licenses/quickjs-node-stdlib-LICENSES.txt`
|
|
88
|
+
(SHA-256 `38e42dcb48e476e4e836552c814c911eb5464d80b56b970d87aa07b88c7b28f8`).
|
|
89
|
+
`licenses/components.json` binds each release to the generated bundle digest;
|
|
90
|
+
`pnpm-lock.yaml` pins all package integrity values. The Buffer declarations are
|
|
91
|
+
also copied from the same buffer 6.0.3 release. These guest libraries implement
|
|
92
|
+
the supported byte buffers and standard streams; they do not include Node.js.
|
|
93
|
+
|
|
68
94
|
## Distributed toolchain assets
|
|
69
95
|
|
|
70
96
|
### TypeScript-Go
|
|
71
97
|
|
|
72
98
|
- Distributed asset: `typescript-7.0.2.wasm.gz.bin`
|
|
73
|
-
- Compressed SHA-256: `
|
|
74
|
-
- Expanded Wasm SHA-256: `
|
|
99
|
+
- Compressed SHA-256: `29c6ee0e46151e2644049ae96162b1b1d46dcb13310e2a928114bb9030c3ea92`
|
|
100
|
+
- Expanded Wasm SHA-256: `01cea8c18841b73e0601d31859be1dcd323e61d83e7cfb15523dd051fc78c8da`
|
|
75
101
|
- Source revision: `microsoft/typescript-go@2bd066d87f5bafd315be9f40889d0a60b9e58e0b`
|
|
76
102
|
- Source: <https://github.com/microsoft/typescript-go/tree/2bd066d87f5bafd315be9f40889d0a60b9e58e0b>
|
|
77
103
|
- Build runtime: Go 1.26.3 standard library (`GOOS=wasip1`, `GOARCH=wasm`)
|
|
@@ -101,29 +127,29 @@ byte-identical to `go/LICENSE` in the exact Go 1.26.5 source distribution.
|
|
|
101
127
|
|
|
102
128
|
### Java compiler toolchain
|
|
103
129
|
|
|
104
|
-
- Distributed assets: `java-teavm-0.13.1.
|
|
130
|
+
- Distributed assets: `java-teavm-0.13.1.compiler.wasm`,
|
|
105
131
|
`java-teavm-0.13.1.compile-classlib.bin`, and
|
|
106
132
|
`java-teavm-0.13.1.runtime-classlib.bin`
|
|
107
133
|
- TeaVM Java compiler source: <https://github.com/konsoletyper/teavm-javac/tree/7e4a44cf521694a4e326e33850dd8aec165eb5c9>
|
|
108
134
|
- TeaVM core source: `konsoletyper/teavm@b3a245b7d9034ff35cdfab2def057a3d4f256efb`
|
|
109
|
-
|
|
110
|
-
- Compiler
|
|
111
|
-
|
|
112
|
-
-
|
|
113
|
-
|
|
114
|
-
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
135
|
+
with source patches and build provenance in `tools/java-client/`
|
|
136
|
+
- Compiler SHA-256: `8c37bce1c6fceeaffeffe93e10834309b67c8b6fb58c6f8a24547afe8be67f5d`
|
|
137
|
+
- Android Scanner and Spliterators source: `platform/libcore@de876a01b29230b877c9f408348c38a90ee724a5`
|
|
138
|
+
- Licenses: TeaVM Apache-2.0; OpenJDK and Android class libraries GPL-2.0
|
|
139
|
+
with Classpath exception
|
|
140
|
+
- License material: `licenses/Apache-2.0.txt`,
|
|
141
|
+
`licenses/openjdk-21-GPL-2.0-with-Classpath-exception.txt`, and
|
|
142
|
+
`licenses/android-libcore-GPL-2.0-with-Classpath-exception.txt`
|
|
143
|
+
|
|
144
|
+
The WasmGC compiler uses statically packaged JavaScript bindings and emits
|
|
145
|
+
standalone `wasip1` student modules. TeaVM links reachable class-library code
|
|
146
|
+
into those modules; the full class-library archives are compiler inputs.
|
|
121
147
|
|
|
122
148
|
### QuickJS-ng
|
|
123
149
|
|
|
124
150
|
- Distributed asset: `quickjs-0.15.1.wasm.gz.bin`
|
|
125
|
-
- Compressed SHA-256: `
|
|
126
|
-
- Expanded Wasm SHA-256: `
|
|
151
|
+
- Compressed SHA-256: `dc6e02e8610269e61b341331661515616451cec929fd534fa96d1c4f47fbcc9a`
|
|
152
|
+
- Expanded Wasm SHA-256: `a098db08592626781f6ad6e63f1b8a36da6d03b85b530dc94c441a348426b20b`
|
|
127
153
|
- Source revision: `quickjs-ng/quickjs@fd0a0210b7be00957751871e7e01b8291268fc29`
|
|
128
154
|
- Source: <https://github.com/quickjs-ng/quickjs/tree/fd0a0210b7be00957751871e7e01b8291268fc29>
|
|
129
155
|
- Build SDK: [WASI SDK 24.0 release archive for arm64 macOS](https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-24/wasi-sdk-24.0-arm64-macos.tar.gz),
|
|
@@ -240,25 +266,25 @@ source trees, so the inventory reuses the exact digest-bound `b9ef79d7` copies;
|
|
|
240
266
|
the revision-specific root and musl-fts notices remain separate. The generated
|
|
241
267
|
WebC and pinned command manifests do not relicense those payloads.
|
|
242
268
|
|
|
243
|
-
### CPython 3.14.
|
|
269
|
+
### CPython 3.14.7 for WASI P1
|
|
244
270
|
|
|
245
|
-
- Distributed assets: `python-3.14.
|
|
246
|
-
manifest `python-3.14.
|
|
247
|
-
- Official source archive: <https://www.python.org/ftp/python/3.14.
|
|
248
|
-
SHA-256 `
|
|
249
|
-
- Official SPDX document: <https://www.python.org/ftp/python/3.14.
|
|
250
|
-
SHA-256 `
|
|
271
|
+
- Distributed assets: `python-3.14.7-wasip1.webc.gz.bin` and its provenance
|
|
272
|
+
manifest `python-3.14.7-wasip1.manifest.json`
|
|
273
|
+
- Official source archive: <https://www.python.org/ftp/python/3.14.7/Python-3.14.7.tar.xz>,
|
|
274
|
+
SHA-256 `3b48dac8fb59f62eaa67ac83c1eb12bda1b7a08406dd286e252c11a66be27f81`
|
|
275
|
+
- Official SPDX document: <https://www.python.org/ftp/python/3.14.7/Python-3.14.7.tar.xz.spdx.json>,
|
|
276
|
+
SHA-256 `87f55ca6c59fe159fa8c47ba2d7d8bec39cc649b1d3f47c667f34025a2ca9a68`
|
|
251
277
|
- Expanded WebC SHA-256:
|
|
252
|
-
`
|
|
278
|
+
`a42c98f5f00582638c8e445440c506bbf94d5e55b3415d1f8d82d11c56cd4b56`
|
|
253
279
|
- Distributed gzip SHA-256:
|
|
254
|
-
`
|
|
280
|
+
`10027f0e32c77dfa0ce1c413b6cb27307d6744fe5e18e6da8cea738bd020260c`
|
|
255
281
|
- Provenance manifest SHA-256:
|
|
256
|
-
`
|
|
282
|
+
`53a24b258363a8494af164121111a34b49c85fa0e054627fe131feba6f359cd5`
|
|
257
283
|
- Deterministically exported `WOJFS002` runtime archive SHA-256:
|
|
258
|
-
`
|
|
284
|
+
`c1acac884af1c86833db5b65f8cc0a2304fce74dea0a05d9b40bde0a4e3e7c0e`
|
|
259
285
|
- CPython license: Python Software Foundation License Version 2 and the
|
|
260
286
|
historical notices reproduced with it
|
|
261
|
-
- License text: `licenses/cpython-3.14.
|
|
287
|
+
- License text: `licenses/cpython-3.14.7-PSF-2.0.txt`
|
|
262
288
|
- Bundled third-party source: Expat 2.8.1 (MIT), HACL* revision
|
|
263
289
|
`8ba599b2f6c9701b3dc961db895b0856a2210f76` (MIT), and libmpdec 2.5.1
|
|
264
290
|
(BSD-2-Clause); their exact notices are
|
|
@@ -270,7 +296,8 @@ WebC and pinned command manifests do not relicense those payloads.
|
|
|
270
296
|
`26a1d6601d727a96f4301d0d8647b5a42760ae0c`, and wasi-libc revision
|
|
271
297
|
`b9ef79d7dbd47c6c5bafdae760823467c2f60b70`.
|
|
272
298
|
|
|
273
|
-
WASM-OJ compiles this package from the pinned official sources
|
|
299
|
+
WASM-OJ compiles this package from the pinned official sources with a 4 MiB C
|
|
300
|
+
stack and 16 MiB initial linear memory, retaining `--stack-first`, disables
|
|
274
301
|
`_socket`, removes test/development-only standard-library roots, canonicalizes
|
|
275
302
|
build-only sysconfig paths, and packages the complete source SPDX document and
|
|
276
303
|
applicable CPython, third-party, compiler-rt, WASI SDK, and wasi-libc notices
|
package/dist/index.d.ts
CHANGED
|
@@ -28,7 +28,6 @@ declare const WASM_OJ_SCHEMAS: Readonly<{
|
|
|
28
28
|
readonly objectCache: "wasm-oj-v2/object-cache";
|
|
29
29
|
readonly pythonToolchain: "wasm-oj-v2/python-toolchain";
|
|
30
30
|
readonly replayBundle: "wasm-oj-v2/replay-bundle";
|
|
31
|
-
readonly releaseManifest: "wasm-oj-v2/release-manifest";
|
|
32
31
|
readonly rustToolchain: "wasm-oj-v2/rust-toolchain";
|
|
33
32
|
readonly runRequest: "wasm-oj-v2/run-request";
|
|
34
33
|
readonly runtimeBundle: "wasm-oj-v2/runtime-bundle";
|
|
@@ -244,6 +243,8 @@ interface RunResult {
|
|
|
244
243
|
/** Requested output files that existed when the process terminated. */
|
|
245
244
|
files: Record<string, Uint8Array>;
|
|
246
245
|
durationMs: number;
|
|
246
|
+
/** Browser guest wall time, excluding runtime preparation and output collection. */
|
|
247
|
+
executionDurationMs?: number;
|
|
247
248
|
determinism: DeterminismConfig;
|
|
248
249
|
resources: ResourcePolicy;
|
|
249
250
|
termination: ExecutionTermination;
|
|
@@ -351,8 +352,8 @@ declare function isCostProfileFor(profile: string, language: Language, target: T
|
|
|
351
352
|
|
|
352
353
|
/** Executable runtime components covered by deterministic cost calibration. */
|
|
353
354
|
declare const WASM_OJ_RUNTIME_COMPONENTS: Readonly<{
|
|
354
|
-
readonly runtimeCoreWasmSha256: "
|
|
355
|
-
readonly runtimeSourceRootSha256: "
|
|
355
|
+
readonly runtimeCoreWasmSha256: "1e297ad276694e9fb8a23afdc6ccc0b2ae56a223ced19d5cae26fe4661daa11e";
|
|
356
|
+
readonly runtimeSourceRootSha256: "27c52cb1887aa8a7e0d8a238514fc8881cf86c68267e2a1691f110423692e2b6";
|
|
356
357
|
readonly wasmerNativeVersion: "7.2.1";
|
|
357
358
|
readonly wasmerSdkVersion: "0.10.0";
|
|
358
359
|
readonly wasmerSdkWasmSha256: "49a6646209f5ab5e7c737eac33407d87d9a9959ac83e5ecaaab9261b2323589e";
|
|
@@ -363,94 +364,11 @@ declare const WASM_OJ_RUNTIME_COMPONENTS: Readonly<{
|
|
|
363
364
|
* Release verification independently checks the component bytes before this
|
|
364
365
|
* identity is admitted into a calibrated release.
|
|
365
366
|
*/
|
|
366
|
-
declare const WASM_OJ_RUNTIME_IDENTITY_SHA256 = "
|
|
367
|
+
declare const WASM_OJ_RUNTIME_IDENTITY_SHA256 = "d3e44cafdc1c17a7e6bd4591ef04ec8161af805a519b5bbff437b15e5accd442";
|
|
367
368
|
/** Exact canonical serialization hashed by `WASM_OJ_RUNTIME_IDENTITY_SHA256`. */
|
|
368
369
|
declare function runtimeIdentityBytes(): Uint8Array;
|
|
369
370
|
declare function verifyRuntimeIdentity(): Promise<void>;
|
|
370
371
|
|
|
371
|
-
declare const WASM_OJ_RELEASE_MANIFEST_SCHEMA: "wasm-oj-v2/release-manifest";
|
|
372
|
-
declare const WASM_OJ_CONTAINER_PROTOCOL_VERSION = "wasm-oj-container-v2";
|
|
373
|
-
interface ReleaseManifest {
|
|
374
|
-
readonly schema: typeof WASM_OJ_RELEASE_MANIFEST_SCHEMA;
|
|
375
|
-
readonly releaseId: string;
|
|
376
|
-
readonly version: string;
|
|
377
|
-
readonly wasmOjContract: typeof WASM_OJ_CONTRACT_VERSION;
|
|
378
|
-
readonly createdAt: string;
|
|
379
|
-
readonly source: {
|
|
380
|
-
readonly repository: string;
|
|
381
|
-
readonly commit: string;
|
|
382
|
-
readonly sourceTreeSha256: string;
|
|
383
|
-
readonly tag?: string;
|
|
384
|
-
};
|
|
385
|
-
readonly build: {
|
|
386
|
-
readonly nodeVersion: string;
|
|
387
|
-
readonly pnpmVersion: string;
|
|
388
|
-
readonly rustVersion: string;
|
|
389
|
-
readonly lockSha256: string;
|
|
390
|
-
readonly sbomSha256: string;
|
|
391
|
-
readonly licensesSha256: string;
|
|
392
|
-
readonly auditSha256: string;
|
|
393
|
-
};
|
|
394
|
-
readonly artifacts: {
|
|
395
|
-
readonly npmPackage: ArtifactDigest;
|
|
396
|
-
readonly workerBundle: ArtifactDigest;
|
|
397
|
-
readonly staticAssets: ArtifactDigest;
|
|
398
|
-
readonly containerImage: {
|
|
399
|
-
readonly registry: string;
|
|
400
|
-
readonly digest: string;
|
|
401
|
-
readonly identitySha256: string;
|
|
402
|
-
readonly platform: "linux/amd64";
|
|
403
|
-
readonly dockerfileSha256: string;
|
|
404
|
-
readonly baseImages: readonly {
|
|
405
|
-
readonly stage: "node-build" | "rust-build" | "judge";
|
|
406
|
-
readonly image: string;
|
|
407
|
-
readonly digest: string;
|
|
408
|
-
}[];
|
|
409
|
-
};
|
|
410
|
-
};
|
|
411
|
-
readonly runtime: {
|
|
412
|
-
readonly protocolVersion: typeof WASM_OJ_CONTAINER_PROTOCOL_VERSION;
|
|
413
|
-
readonly executionRootSha256: string;
|
|
414
|
-
readonly rootSha256: string;
|
|
415
|
-
readonly runtimeIdentitySha256: string;
|
|
416
|
-
readonly runtimeCoreSha256: string;
|
|
417
|
-
readonly wasmerVersion: string;
|
|
418
|
-
readonly wasmerSha256: string;
|
|
419
|
-
readonly compilerSha256: string;
|
|
420
|
-
readonly runnerSha256: string;
|
|
421
|
-
};
|
|
422
|
-
readonly toolchains: {
|
|
423
|
-
readonly rootSha256: string;
|
|
424
|
-
readonly manifestSha256: string;
|
|
425
|
-
};
|
|
426
|
-
readonly cost: {
|
|
427
|
-
readonly model: typeof WEIGHTED_METER_MODEL;
|
|
428
|
-
readonly profileRootSha256: string;
|
|
429
|
-
readonly baselineSha256: string;
|
|
430
|
-
};
|
|
431
|
-
readonly evidence: {
|
|
432
|
-
readonly conformanceSha256: string;
|
|
433
|
-
readonly testsSha256: string;
|
|
434
|
-
readonly costCalibrationSha256: string;
|
|
435
|
-
};
|
|
436
|
-
readonly migrations: {
|
|
437
|
-
readonly databaseSha256: string;
|
|
438
|
-
};
|
|
439
|
-
readonly provenance: {
|
|
440
|
-
readonly issuer: string;
|
|
441
|
-
readonly subject: string;
|
|
442
|
-
};
|
|
443
|
-
}
|
|
444
|
-
interface ArtifactDigest {
|
|
445
|
-
readonly sha256: string;
|
|
446
|
-
readonly bytes: number;
|
|
447
|
-
}
|
|
448
|
-
declare function parseReleaseManifest(value: unknown): ReleaseManifest;
|
|
449
|
-
declare function createReleaseManifest(value: ReleaseManifest): ReleaseManifest;
|
|
450
|
-
declare function releaseManifestBytes(value: ReleaseManifest): Uint8Array;
|
|
451
|
-
declare function releaseManifestSha256(value: ReleaseManifest): Promise<string>;
|
|
452
|
-
declare function verifyReleaseManifestBytes(bytes: Uint8Array, expectedSha256?: string): Promise<ReleaseManifest>;
|
|
453
|
-
|
|
454
372
|
/**
|
|
455
373
|
* Fail-closed validation boundary for projects crossing persistence or
|
|
456
374
|
* transport boundaries. The candidate is checked without mutation, defaults,
|
|
@@ -506,7 +424,7 @@ declare const CLANG_VERSION = "22.0.0-git20542-10";
|
|
|
506
424
|
/** SHA-256 after browser-side gzip decompression. */
|
|
507
425
|
declare const CLANG_PACKAGE_SHA256 = "21ded33b9c6d4e1aaad5528c940bdaf6c3e84be77ea8f522f018ca7289a2a224";
|
|
508
426
|
/** SHA-256 of the pinned cc1/wasm-ld argv manifest; regenerated by scripts/pin-clang-cc1-argv.mjs. */
|
|
509
|
-
declare const CLANG_CC1_PINS_SHA256 = "
|
|
427
|
+
declare const CLANG_CC1_PINS_SHA256 = "895eee17c63b1112c84adcc4ddbcb38e0c18e53bff15f50a8689b9b82d87b1ff";
|
|
510
428
|
declare function toolchainCacheIdentity(language: Language): {
|
|
511
429
|
wasmOjContract: 2;
|
|
512
430
|
version: string;
|
|
@@ -1640,58 +1558,28 @@ declare function scoreProblemResults(problem: JudgeProblem, language: BuiltinLan
|
|
|
1640
1558
|
/** Score immutable execution-only judge data without reconstructing a public problem bundle. */
|
|
1641
1559
|
declare function scoreJudgeDataResults(data: JudgeData, language: BuiltinLanguage$1, results: readonly JudgeCaseResult[]): ProblemScore;
|
|
1642
1560
|
|
|
1643
|
-
interface JudgeAllowedProfile {
|
|
1644
|
-
readonly target: "wasip1" | "wasix";
|
|
1645
|
-
readonly optimization: "debug" | "release";
|
|
1646
|
-
}
|
|
1647
|
-
type JudgeAllowedProfiles = Readonly<Partial<Record<BuiltinLanguage, JudgeAllowedProfile>>>;
|
|
1648
|
-
declare function parseJudgeAllowedProfiles(value: unknown, label?: string): JudgeAllowedProfiles;
|
|
1649
|
-
|
|
1650
|
-
declare const MANAGED_COLLECTION_SCHEMA = "wasm-oj-platform/managed-collection/v2";
|
|
1651
|
-
interface ManagedRepositoryObject {
|
|
1652
|
-
/** Normalized path relative to the directory containing collection/index.json. */
|
|
1653
|
-
readonly repositoryPath: string;
|
|
1654
|
-
readonly bytes: number;
|
|
1655
|
-
readonly sha256: string;
|
|
1656
|
-
}
|
|
1657
|
-
interface ManagedProblemPublication {
|
|
1658
|
-
readonly slug: string;
|
|
1659
|
-
readonly allowedProfiles: JudgeAllowedProfiles;
|
|
1660
|
-
readonly contestPublic: ManagedRepositoryObject;
|
|
1661
|
-
readonly judgePackage: ManagedRepositoryObject;
|
|
1662
|
-
}
|
|
1663
|
-
interface ManagedCollectionV2 {
|
|
1664
|
-
readonly schema: typeof MANAGED_COLLECTION_SCHEMA;
|
|
1665
|
-
readonly collectionRevision: string;
|
|
1666
|
-
readonly problems: readonly ManagedProblemPublication[];
|
|
1667
|
-
}
|
|
1668
|
-
/** Parse the value form used by the authoring CLI after JSON decoding. */
|
|
1669
|
-
declare function parseManagedCollectionValueV2(value: unknown): ManagedCollectionV2;
|
|
1670
|
-
/**
|
|
1671
|
-
* Stable platform boundary for generated collection/managed.json bytes.
|
|
1672
|
-
* Published managed contracts must use WASM-OJ canonical JSON; author-only
|
|
1673
|
-
* managed-source documents are intentionally not accepted here.
|
|
1674
|
-
*/
|
|
1675
|
-
declare function parseManagedCollectionV2(bytes: Uint8Array): ManagedCollectionV2;
|
|
1676
|
-
/** Same v2-only value parser retained as the environment-neutral library entry point. */
|
|
1677
|
-
declare const parseManagedCollectionContract: typeof parseManagedCollectionValueV2;
|
|
1678
|
-
|
|
1679
1561
|
declare const CONTEST_PUBLIC_PROJECTION_SCHEMA = "wasm-oj-platform/contest-public-problem-projection/v1";
|
|
1680
1562
|
interface ContestPublicProjection {
|
|
1681
1563
|
readonly schema: typeof CONTEST_PUBLIC_PROJECTION_SCHEMA;
|
|
1682
1564
|
readonly problem: JudgeProblem;
|
|
1683
|
-
readonly digest: string;
|
|
1684
1565
|
}
|
|
1685
1566
|
/**
|
|
1686
|
-
* The
|
|
1687
|
-
*
|
|
1688
|
-
*
|
|
1567
|
+
* The repository practice bundle is safe to fetch for every practice visitor.
|
|
1568
|
+
* Hidden cases and their expected answers exist only in the immutable judge
|
|
1569
|
+
* package built from the authoring source.
|
|
1689
1570
|
*/
|
|
1690
1571
|
declare function derivePracticePublic(authored: JudgeProblem): JudgeProblem;
|
|
1691
1572
|
/** The single deterministic hidden-data redaction used by author CI and platform validation. */
|
|
1692
1573
|
declare function deriveContestPublic(practice: JudgeProblem): JudgeProblem;
|
|
1693
|
-
declare function createContestPublicProjection(practice: JudgeProblem
|
|
1694
|
-
declare function contestPublicProjectionBytes(practice: JudgeProblem
|
|
1574
|
+
declare function createContestPublicProjection(practice: JudgeProblem): ContestPublicProjection;
|
|
1575
|
+
declare function contestPublicProjectionBytes(practice: JudgeProblem): Uint8Array;
|
|
1576
|
+
|
|
1577
|
+
interface JudgeAllowedProfile {
|
|
1578
|
+
readonly target: "wasip1" | "wasix";
|
|
1579
|
+
readonly optimization: "debug" | "release";
|
|
1580
|
+
}
|
|
1581
|
+
type JudgeAllowedProfiles = Readonly<Partial<Record<BuiltinLanguage, JudgeAllowedProfile>>>;
|
|
1582
|
+
declare function parseJudgeAllowedProfiles(value: unknown, label?: string): JudgeAllowedProfiles;
|
|
1695
1583
|
|
|
1696
1584
|
declare const WASM_OJ_JUDGE_PACKAGE_SCHEMA = "wasm-oj-v2/judge-package";
|
|
1697
1585
|
declare const WASM_OJ_JUDGE_PACKAGE_MAGIC = "WOJJDG02";
|
|
@@ -1808,43 +1696,43 @@ declare function decodeJudgePackageForExecution(bytes: Uint8Array): Promise<Deco
|
|
|
1808
1696
|
/** Execution identity is the digest of the exact canonical WOJJDG02 bytes. */
|
|
1809
1697
|
declare function judgePackageSemanticDigest(bytes: Uint8Array): Promise<string>;
|
|
1810
1698
|
|
|
1811
|
-
declare const
|
|
1812
|
-
interface
|
|
1699
|
+
declare const REPOSITORY_AUTHORING_JUDGES_SCHEMA = "wasm-oj-platform/repository-authoring-judges/v1";
|
|
1700
|
+
interface RepositorySourceObject {
|
|
1813
1701
|
readonly path: string;
|
|
1814
1702
|
readonly bytes: number;
|
|
1815
1703
|
readonly sha256: string;
|
|
1816
1704
|
}
|
|
1817
|
-
interface
|
|
1705
|
+
interface RepositorySourceArtifact extends RepositorySourceObject {
|
|
1818
1706
|
readonly runtimeProfile: TrustedJudgeRuntimeProfile;
|
|
1819
1707
|
}
|
|
1820
|
-
interface
|
|
1708
|
+
interface RepositorySourceAsset extends RepositorySourceObject {
|
|
1821
1709
|
readonly guestPath: string;
|
|
1822
1710
|
}
|
|
1823
|
-
type
|
|
1711
|
+
type RepositorySourceJudge = {
|
|
1824
1712
|
readonly kind: "text";
|
|
1825
1713
|
} | {
|
|
1826
1714
|
readonly kind: "checker";
|
|
1827
|
-
readonly artifact:
|
|
1828
|
-
readonly assets: readonly
|
|
1715
|
+
readonly artifact: RepositorySourceArtifact;
|
|
1716
|
+
readonly assets: readonly RepositorySourceAsset[];
|
|
1829
1717
|
readonly args: readonly string[];
|
|
1830
1718
|
} | {
|
|
1831
1719
|
readonly kind: "interactive";
|
|
1832
|
-
readonly artifact:
|
|
1833
|
-
readonly assets: readonly
|
|
1720
|
+
readonly artifact: RepositorySourceArtifact;
|
|
1721
|
+
readonly assets: readonly RepositorySourceAsset[];
|
|
1834
1722
|
readonly args: readonly string[];
|
|
1835
1723
|
readonly inputPath: string;
|
|
1836
1724
|
};
|
|
1837
|
-
interface
|
|
1725
|
+
interface RepositoryAuthoringJudgeProblem {
|
|
1838
1726
|
readonly slug: string;
|
|
1839
1727
|
readonly allowedProfiles: JudgeAllowedProfiles;
|
|
1840
|
-
readonly judge:
|
|
1728
|
+
readonly judge: RepositorySourceJudge;
|
|
1841
1729
|
}
|
|
1842
|
-
interface
|
|
1843
|
-
readonly schema: typeof
|
|
1844
|
-
readonly problems: readonly
|
|
1730
|
+
interface RepositoryAuthoringJudges {
|
|
1731
|
+
readonly schema: typeof REPOSITORY_AUTHORING_JUDGES_SCHEMA;
|
|
1732
|
+
readonly problems: readonly RepositoryAuthoringJudgeProblem[];
|
|
1845
1733
|
}
|
|
1846
|
-
/** Author-only
|
|
1847
|
-
declare function
|
|
1734
|
+
/** Author-only input used by collection build; never accepted by the platform sync boundary. */
|
|
1735
|
+
declare function parseRepositoryAuthoringJudges(value: unknown): RepositoryAuthoringJudges;
|
|
1848
1736
|
|
|
1849
1737
|
/** Build the runtime judge spec directly from verified WOJJDG02 execution data. */
|
|
1850
1738
|
declare function trustedJudgeSpec(data: JudgeData, executable: TrustedJudgeExecutable): JudgeSpec;
|
|
@@ -1879,5 +1767,5 @@ declare const DEFAULT_CONFORMANCE_CASES: readonly ConformanceCase[];
|
|
|
1879
1767
|
declare const CPP_STDLIB_CONFORMANCE_CASE: ConformanceCase;
|
|
1880
1768
|
declare const FULL_CONFORMANCE_CASES: readonly ConformanceCase[];
|
|
1881
1769
|
|
|
1882
|
-
export { BROWSER_COLLECTION_SCHEMA, BROWSER_PROBLEM_SCHEMA, BrowserDependencyNetworkConsent, CONTEST_PUBLIC_PROJECTION_SCHEMA, CPP_STDLIB_CONFORMANCE_CASE, CargoLockDependencyResolver, CompilerRegistry, CostBaselineRegistry, CppLockDependencyResolver, DEFAULT_CONFORMANCE_CASES, DEFAULT_DETERMINISM, DEFAULT_RESOURCE_POLICY, DEPENDENCY_BUILD_LIMITS, DependencyManager, DependencyNetworkError, Engine, FULL_CONFORMANCE_CASES, GoLockDependencyResolver, JudgeEngine,
|
|
1883
|
-
export type { ArtifactBuildExpectation,
|
|
1770
|
+
export { BROWSER_COLLECTION_SCHEMA, BROWSER_PROBLEM_SCHEMA, BrowserDependencyNetworkConsent, CONTEST_PUBLIC_PROJECTION_SCHEMA, CPP_STDLIB_CONFORMANCE_CASE, CargoLockDependencyResolver, CompilerRegistry, CostBaselineRegistry, CppLockDependencyResolver, DEFAULT_CONFORMANCE_CASES, DEFAULT_DETERMINISM, DEFAULT_RESOURCE_POLICY, DEPENDENCY_BUILD_LIMITS, DependencyManager, DependencyNetworkError, Engine, FULL_CONFORMANCE_CASES, GoLockDependencyResolver, JudgeEngine, MemoryDependencyCache, NpmLockDependencyResolver, PROBLEM_STARTER_LIMITS, PROJECT_SOURCE_LIMITS, PyPiLockDependencyResolver, REPOSITORY_AUTHORING_JUDGES_SCHEMA, RuntimeDriverRegistry, TRUSTED_JUDGE_RUNTIME_PROFILES, TRUSTED_JUDGE_WASIP1_IMPORTS, TRUSTED_JUDGE_WASM_MAX_BYTES, WASM_OJ_JUDGE_DATA_SCHEMA, WASM_OJ_JUDGE_PACKAGE_MAGIC, WASM_OJ_JUDGE_PACKAGE_MAX_BYTES, WASM_OJ_JUDGE_PACKAGE_SCHEMA, WASM_OJ_LIBCXX_PCH_HEADER, WASM_OJ_RUNTIME_COMPONENTS, WASM_OJ_RUNTIME_IDENTITY_SHA256, WEIGHTED_METER_MODEL, assertCompilerCacheKey, assertJudgeDataCostProfile, assertJudgeDataMatchesPracticePublic, assertJudgeGuestFilePath, assertProblemCostProfile, assertValidBuildArtifact, assertValidDependencyBuildBundle, assertValidDependencyLock, assertValidProject, assertValidReplayBundle, browserToolchainAssetBaseUrl, browserToolchainAssetUrl, canonicalJsonBytes, compareConformanceSnapshots, contestPublicProjectionBytes, costProfileId, createContestPublicProjection, createDefaultCostBaselineRegistry, createDefaultDependencyBuildAdapters, createDefaultDependencyManager, createDefaultDependencyResolvers, createDefaultRuntimeDrivers, createDependencyBuildBundle, createDependencyLock, createEngine, createExtendedCostBaselineRegistry, createJudgeExecutor, createReplayBundle, createRuntimeBundleManifest, createSdkProject, decodeJudgePackageForExecution, decodeLibcxxPchManifest, decodeReplayBundle, dependencyFileTreeSha256, dependencyLockSha256, dependencyManifestSha256, deriveContestPublic, deriveJudgeData, derivePracticePublic, deterministicTranscript, encodeJudgePackage, encodeReplayBundle, fileMatcher, floatMatcher, goModuleZipHash, isCostProfileFor, isToolchainLibcxxPchHeader, judgePackageSemanticDigest, judgeTranscript, normalizeDependencyNetworkAccess, normalizeDependencyNetworkScope, normalizeExecutionMetrics, normalizeOutput, parseCanonicalJsonBytes, parseJudgeAllowedProfiles, parseJudgeData, parseJudgePackageManifest, parseProblemBundle, parseProblemCollectionIndex, parseRepositoryAuthoringJudges, parseStandaloneProblemBundle, prepareArtifactInteraction, prepareArtifactRun, prepareTrustedJudgeRun, problemCollectionRevision, readJudgePackageManifest, replayBundle, replayBundleSha256, resolveArtifactCostBudget, resolveCostBudget, resolveDeterminism, resolveResourcePolicy, runConformanceHost, runConformanceMatrix, runtimeIdentityBytes, scoreJudgeDataResults, scoreProblemResults, setMatcher, sha256Matcher, snapshotBrowserToolchainSources, summarizeProblemPolicies, textMatcher, tokenMatcher, toolchainAssetSource, toolchainCacheIdentity, toolchainProfileSource, trustedJudgeSpec, unavailableExecutionMetrics, validateBrowserToolchainSources, validateJudgePackage, validateJudgeSpec, validateServerToolchainSources, validateToolchainDescriptors, validateTrustedJudgeWasm, verifyDependencyBuildBundle, verifyProblemBundleBytes, verifyProblemCollectionRevision, verifyRuntimeIdentity, wasmCheckerMatcher };
|
|
1771
|
+
export type { ArtifactBuildExpectation, ArtifactStore, BatchJudgeCaseSpec, CanonicalJsonValue, CompileInput, CompileOptions, Compiler, CompilerRegistration, ConformanceCase, ConformanceHost, ConformanceMismatch, ConformanceOptions, ConformanceReport, ConformanceRunExpectation, ConformanceSample, ConformanceSnapshot, ContestPublicProjection, CostBudget, CppDependencyLockSource, DecodedJudgePackageForExecution, DependencyBuildAdapter, DependencyBuildBundle, DependencyCache, DependencyConsentStorage, DependencyEcosystem, DependencyFetch, DependencyLock, DependencyManifest, DependencyNetworkAccess, DependencyNetworkAuthorizer, DependencyNetworkConsentPrompt, DependencyNetworkScope, DependencyOfflineBundle, DependencyRequirement, DependencyResolutionContext, DependencyResolver, DependencyResolverOptions, DependencySourceFile, DeterministicTranscript, EncodedJudgePackage, EngineOptions, ExecuteResult, InteractiveExecuteResult, InteractiveJudgeCaseSpec, InteractiveOptions, InteractiveProgramOptions, JudgeAllowedProfile, JudgeAllowedProfiles, JudgeCaseResult, JudgeCaseSpec, JudgeCaseVerdict, JudgeData, JudgeDataCase, JudgeEngineOptions, JudgeExecutionAdapter, JudgeExecutor, JudgeFileInputSpec, JudgeInputProvider, JudgeInputSpec, JudgeMatchResult, JudgeMatcher, JudgeMatcherContext, JudgeMatcherSpec, JudgePackageAllowedProfile, JudgePackageAssetInput, JudgePackageAssetReference, JudgePackageBlobReference, JudgePackageByteSource, JudgePackageInput, JudgePackageInputJudge, JudgePackageManifest, JudgePackageManifestJudge, JudgePolicy, JudgeProblem, JudgeProgramSpec, JudgeProjectResult, JudgeResolvedInput, JudgeResult, JudgeRunOptions, JudgeSpec, JudgeStarterTemplate, JudgeStarterTemplates, LibcxxPchAsset, LibcxxPchManifest, LibcxxPchProfile, LockedDependencyPackage, MaterializedDependencyPackage, Operation, OperationEvent, OperationEventPayload, OperationKind, OperationState, OutputNormalization, PackageFileSystemRequest, PolicyPerformanceAggregate, PrecompileOutcome, PrecompileStatus, PreparedRunRequest, ProblemBundleDescriptor, ProblemCollectionEntry, ProblemCollectionIndex, ProblemScore, RawExecutionMetrics, ReplayBundle, ReplayBundleInput, ReplayDecodeOptions, ReplayHost, ReplayJudgeCaseTranscript, ReplayJudgeOperation, ReplayJudgeTranscript, ReplayOperation, ReplayOptions, ReplayResult, ReplayRunOperation, RepositoryAuthoringJudgeProblem, RepositoryAuthoringJudges, RepositorySourceArtifact, RepositorySourceAsset, RepositorySourceJudge, RepositorySourceObject, ResolveDependencyOptions, ResolvedDependencyGraph, RunOptions, Runner, RuntimeDriver, RuntimeResolver, ScoredProblemCase, SubmissionOperation, SubmissionPolicySummary, SubmissionRequest, TrustedJudgeAsset, TrustedJudgeExecutable, TrustedJudgeProgram, TrustedJudgeRuntimeProfile, TrustedJudgeWasmInfo, TrustedJudgeWasmValidationOptions, ValidateJudgePackageOptions, ValidatedJudgePackage };
|