@tracecode/harness 0.16.1 → 0.16.3

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 (45) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/{browser-runtime-provider-NQNCL6HE.js → browser-runtime-provider-C53ZJH3D.js} +4 -4
  3. package/dist/{chunk-MMQLUTPP.js → chunk-53ROKKGU.js} +2 -2
  4. package/dist/{chunk-KYTMGAFA.js → chunk-6SWX35P2.js} +2 -2
  5. package/dist/{chunk-4W6MUXZE.js → chunk-BXUGUGWL.js} +9 -9
  6. package/dist/{chunk-AWHLLSEH.js → chunk-DI7WIHES.js} +3 -3
  7. package/dist/chunk-EJE2EJDI.js +193 -0
  8. package/dist/{chunk-DQMPICNS.js → chunk-TXDHVV6B.js} +193 -345
  9. package/dist/{chunk-57WKRSIB.js → chunk-YID2AAYD.js} +2 -2
  10. package/dist/cli.cjs +5 -0
  11. package/dist/cli.js +5 -0
  12. package/dist/core.cjs +8 -8
  13. package/dist/core.d.cts +2 -2
  14. package/dist/core.d.ts +2 -2
  15. package/dist/core.js +1 -1
  16. package/dist/{cpp-worker-client-A2ULEW5T.js → cpp-worker-client-FLJ2YLSW.js} +3 -3
  17. package/dist/{csharp-worker-client-RA47P77F.js → csharp-worker-client-S4U6MCVF.js} +3 -3
  18. package/dist/internal/tracekernel-workspace.cjs +171 -31
  19. package/dist/internal/tracekernel-workspace.d.cts +8 -2
  20. package/dist/internal/tracekernel-workspace.d.ts +8 -2
  21. package/dist/internal/tracekernel-workspace.js +164 -24
  22. package/dist/{java-project-BTAANBJH.js → java-project-GK6MHT3I.js} +2 -2
  23. package/dist/{java-project-client-R7CKC72F.js → java-project-client-PEQKFTH6.js} +11 -2
  24. package/dist/judge.cjs +420 -214
  25. package/dist/judge.d.cts +1 -1
  26. package/dist/judge.d.ts +1 -1
  27. package/dist/judge.js +9 -7
  28. package/dist/{project-browser-GBSPIYEW.js → project-browser-3I5FVB5N.js} +2 -2
  29. package/dist/{project-browser-U3YK43H4.js → project-browser-ADXGG5RZ.js} +2 -2
  30. package/dist/{project-browser-J6LVPVDC.js → project-browser-B5T7WJWP.js} +2 -2
  31. package/dist/{project-browser-QMZCUVJA.js → project-browser-JXJ74RDZ.js} +2 -2
  32. package/dist/{project-browser-PC7TRROQ.js → project-browser-TDL4LMJJ.js} +2 -2
  33. package/dist/{python-worker-client-NEBS6V63.js → python-worker-client-2RF6IYIN.js} +3 -3
  34. package/dist/{runtime-environment-D7mZm8SA.d.cts → runtime-environment-BO5I1fAC.d.cts} +5 -0
  35. package/dist/{runtime-environment-Q60S0pUa.d.ts → runtime-environment-Dfg6ZoCj.d.ts} +5 -0
  36. package/dist/{runtime-open-source-info-BQtIRJ9F.d.cts → runtime-open-source-info-CaBpNicy.d.cts} +4 -2
  37. package/dist/{runtime-open-source-info-FkIxlAcm.d.ts → runtime-open-source-info-D0OJc4zH.d.ts} +4 -2
  38. package/dist/tracecc-runtime-assets-G3BFH7LY.js +19 -0
  39. package/dist/tracekernel.cjs +585 -235
  40. package/dist/tracekernel.d.cts +14 -5
  41. package/dist/tracekernel.d.ts +14 -5
  42. package/dist/tracekernel.js +175 -31
  43. package/package.json +44 -32
  44. package/runtime-assets.lock.json +7 -7
  45. package/workers/javascript/javascript-project-worker.js +7 -7
@@ -1,12 +1,12 @@
1
1
  export * from './internal/tracekernel.cjs';
2
2
  export * from './internal/tracekernel-workspace.cjs';
3
- import { B as BrowserRuntimeAssetManifest } from './runtime-environment-D7mZm8SA.cjs';
4
- export { A as AnyBrowserRuntimeAssetManifest, a as BROWSER_RUNTIME_ASSET_PROTOCOL_VERSION, b as BROWSER_RUNTIME_IDS, c as BrowserKernelStorage, d as BrowserKernelStorageBinding, e as BrowserKernelStorageSnapshot, f as BrowserRuntimeAssetDelivery, g as BrowserRuntimeAssetDescriptor, h as BrowserRuntimeAssetManifestProvider, i as BrowserRuntimeAssetManifests, j as BrowserRuntimeAssetOriginPolicy, k as BrowserRuntimeAssetOverrides, l as BrowserRuntimeAssets, m as BrowserRuntimeAssetsByRuntime, n as BrowserRuntimeEngine, o as BrowserRuntimeEnvironment, p as BrowserRuntimeEnvironmentOptions, q as BrowserRuntimeEnvironmentReport, r as BrowserRuntimeFeatureSupport, s as BrowserRuntimeId, t as BrowserRuntimeKnownIssue, u as BrowserRuntimeLoaderFormat, v as BrowserRuntimeReadiness, w as BrowserRuntimeReadinessStatus, x as BrowserRuntimeSurface, y as BrowserRuntimeWorkerFormat, z as BrowserWorkspace, C as BrowserWorkspaceExecutionHostOptions, D as BrowserWorkspaceJavaRuntimeOptions, E as BrowserWorkspaceNodeOptions, F as BrowserWorkspaceProvider, G as BrowserWorkspaceRuntimeProvider, H as BrowserWorkspaceRuntimeProviders, I as BrowserWorkspaceTypeScriptOptions, J as BrowserWorkspaceWorkerIsolation, K as BrowserWorkspaceWorkerPrewarmOptions, L as CppCompilerIntegrityEntry, M as CppCompilerIntegrityManifest, N as CreateBrowserWorkspaceOptions, O as IndexedDbKernelStorageOptions, P as PYTHON_RUNTIME_IMAGE_PROTOCOL_VERSION, Q as PythonRuntimeImageAssetDescriptor, R as createBrowserRuntimeEnvironment, S as createBrowserWorkspace, T as createIndexedDbKernelStorage, U as resolveBrowserRuntimeAssetManifests, V as resolveBrowserRuntimeAssets } from './runtime-environment-D7mZm8SA.cjs';
3
+ import { B as BrowserRuntimeAssetManifest } from './runtime-environment-BO5I1fAC.cjs';
4
+ export { A as AnyBrowserRuntimeAssetManifest, a as BROWSER_RUNTIME_ASSET_PROTOCOL_VERSION, b as BROWSER_RUNTIME_IDS, c as BrowserKernelStorage, d as BrowserKernelStorageBinding, e as BrowserKernelStorageSnapshot, f as BrowserRuntimeAssetDelivery, g as BrowserRuntimeAssetDescriptor, h as BrowserRuntimeAssetManifestProvider, i as BrowserRuntimeAssetManifests, j as BrowserRuntimeAssetOriginPolicy, k as BrowserRuntimeAssetOverrides, l as BrowserRuntimeAssets, m as BrowserRuntimeAssetsByRuntime, n as BrowserRuntimeEngine, o as BrowserRuntimeEnvironment, p as BrowserRuntimeEnvironmentOptions, q as BrowserRuntimeEnvironmentReport, r as BrowserRuntimeFeatureSupport, s as BrowserRuntimeId, t as BrowserRuntimeKnownIssue, u as BrowserRuntimeLoaderFormat, v as BrowserRuntimeReadiness, w as BrowserRuntimeReadinessStatus, x as BrowserRuntimeSurface, y as BrowserRuntimeWorkerFormat, z as BrowserWorkspace, C as BrowserWorkspaceExecutionHostOptions, D as BrowserWorkspaceJavaRuntimeOptions, E as BrowserWorkspaceNodeOptions, F as BrowserWorkspaceProvider, G as BrowserWorkspaceRuntimeProvider, H as BrowserWorkspaceRuntimeProviders, I as BrowserWorkspaceTypeScriptOptions, J as BrowserWorkspaceWorkerIsolation, K as BrowserWorkspaceWorkerPrewarmOptions, L as CppCompilerIntegrityEntry, M as CppCompilerIntegrityManifest, N as CreateBrowserWorkspaceOptions, O as IndexedDbKernelStorageOptions, P as PYTHON_RUNTIME_IMAGE_PROTOCOL_VERSION, Q as PythonRuntimeImageAssetDescriptor, R as createBrowserRuntimeEnvironment, S as createBrowserWorkspace, T as createIndexedDbKernelStorage, U as resolveBrowserRuntimeAssetManifests, V as resolveBrowserRuntimeAssets } from './runtime-environment-BO5I1fAC.cjs';
5
5
  export { L as LANGUAGE_RUNTIME_PROFILES, S as SUPPORTED_LANGUAGES, a as assertRuntimeRequestSupported, g as getLanguageRuntimeProfile, b as getRuntimeProjectIoCapability, c as getRuntimeProjectIoCapabilityMatrix, d as getRuntimeProjectIoSupport, e as getSupportedLanguageProfiles, i as isLanguageSupported, f as isRuntimeSafeForUntrustedReuse } from './runtime-profiles-CeFZX8sd.cjs';
6
6
  import { R as RuntimeExecutionStyle } from './runtime-capabilities-lLyT-B7D.cjs';
7
7
  export { L as Language, a as LanguageRuntimeProfile, b as RuntimeCapabilities, c as RuntimeCompileCost, d as RuntimeExecutionIsolationBoundary, e as RuntimeExecutionIsolationPolicy, f as RuntimeExecutionIsolationSupport, g as RuntimeExecutionLimitSupport, h as RuntimeExecutionLimits, i as RuntimeExecutionPipeline, j as RuntimeMaturity, k as RuntimeProjectIoCapabilityRow, l as RuntimeProjectIoEnvironment, m as RuntimeProjectIoSupport, n as RuntimeProjectIoTier, T as TraceExecutionOptions } from './runtime-capabilities-lLyT-B7D.cjs';
8
- import { C as CodeExecutionResult } from './runtime-open-source-info-BQtIRJ9F.cjs';
9
- export { E as ExecutionDiagnosticStage, a as ExecutionLimitReason, b as ExecutionResult, L as LANGUAGE_RUNTIME_INFOS, c as LANGUAGE_RUNTIME_OPEN_SOURCE_INFOS, d as LanguageRuntimeInfo, e as LanguageRuntimeOpenSourceInfo, N as NODE_RUNTIME_COMPAT_VERSION, R as ResolvedLanguageRuntimeOpenSourceInfo, f as ResolvedRuntimeOpenSourceComponentInfo, g as ResolvedRuntimeOpenSourceResource, h as RuntimeCommandEvent, i as RuntimeCommandEventHandler, j as RuntimeCommandEventStream, k as RuntimeCommandFileChangeEvent, l as RuntimeCommandOptions, m as RuntimeCommandOutputEvent, n as RuntimeCommandResult, o as RuntimeCommandStatusEvent, p as RuntimeComponentInfo, q as RuntimeExecuteCase, r as RuntimeExecuteCaseResult, s as RuntimeExecuteCodeRequest, t as RuntimeExecuteResult, u as RuntimeFile, v as RuntimeFileChange, w as RuntimeFileEncoding, x as RuntimeFileMutationPhase, y as RuntimeKernelDevicePath, z as RuntimeKernelHostConfig, A as RuntimeKernelHostInfo, B as RuntimeKernelHttpBodyInit, D as RuntimeKernelHttpBodyPayload, F as RuntimeKernelHttpBridge, G as RuntimeKernelHttpHandler, H as RuntimeKernelHttpListenOptions, I as RuntimeKernelHttpListenerHandle, J as RuntimeKernelHttpListenerInfo, K as RuntimeKernelHttpRequest, M as RuntimeKernelHttpResponse, O as RuntimeKernelInfo, P as RuntimeKernelUserConfig, Q as RuntimeKernelUserInfo, S as RuntimeKernelWorkspaceConfig, T as RuntimeKernelWorkspaceInfo, U as RuntimeLibraryInfo, V as RuntimeOpenSourceAssetResource, W as RuntimeOpenSourceComponentInfo, X as RuntimeOpenSourceInfoOptions, Y as RuntimeOpenSourceResource, Z as RuntimeOpenSourceResourceKind, _ as RuntimeOpenSourceUrlResource, $ as RuntimeProjectCommandRequest, a0 as RuntimeProjectCommandRunner, a1 as RuntimeProjectIoBridge, a2 as RuntimeProjectLiveIoControllerOptions, a3 as RuntimeProjectPatch, a4 as RuntimeProjectPatchBase, a5 as RuntimeProjectPatchChange, a6 as RuntimeProjectPatchDirectoryCreate, a7 as RuntimeProjectPatchDirectoryDelete, a8 as RuntimeProjectPatchFileDelete, a9 as RuntimeProjectPatchFileWrite, aa as RuntimeProjectPatchOptions, ab as RuntimeProjectSession, ac as RuntimeProjectSessionCommand, ad as RuntimeProjectSessionCommandDefinition, ae as RuntimeProjectSessionFile, af as RuntimeProjectSessionInfo, ag as RuntimeProjectSnapshot, ah as RuntimeProjectTerminalEvent, ai as RuntimeProjectTerminalEventHandler, aj as RuntimeProjectTerminalInputState, ak as RuntimeProjectTerminalInputStateReason, al as RuntimeProjectTerminalPrompt, am as RuntimeProjectTerminalRunOptions, an as RuntimeProjectTerminalSession, ao as RuntimeProjectTerminalSessionOptions, ap as RuntimeProjectWorkerBridgeOptions, aq as RuntimeTrace, ar as RuntimeTraceKernelConfig, as as RuntimeTraceKernelSchedulerConfig, at as RuntimeWorkspace, au as RuntimeWorkspaceActor, av as RuntimeWorkspaceActorKind, aw as RuntimeWorkspaceCapabilities, ax as RuntimeWorkspaceEvent, ay as RuntimeWorkspaceEventHandler, az as RuntimeWorkspaceHttpClient, aA as RuntimeWorkspaceHttpJsonRequestOptions, aB as RuntimeWorkspaceHttpJsonResponse, aC as RuntimeWorkspaceHttpRequestOptions, aD as RuntimeWorkspaceKernel, aE as RuntimeWorkspaceRemoveOptions, aF as RuntimeWorkspaceStat, aG as RuntimeWorkspaceUnsubscribe, aH as SUPPORTED_LANGUAGE_RUNTIME_INFOS, aI as createEmptyRuntimeTrace, aJ as getLanguageRuntimeInfo, aK as getLanguageRuntimeOpenSourceInfo, aL as getSupportedLanguageRuntimeInfos, aM as getSupportedLanguageRuntimeOpenSourceInfos, aN as resolveRuntimeOpenSourceResourceHref } from './runtime-open-source-info-BQtIRJ9F.cjs';
8
+ import { C as CodeExecutionResult } from './runtime-open-source-info-CaBpNicy.cjs';
9
+ export { E as ExecutionDiagnosticStage, a as ExecutionLimitReason, b as ExecutionResult, L as LANGUAGE_RUNTIME_INFOS, c as LANGUAGE_RUNTIME_OPEN_SOURCE_INFOS, d as LanguageRuntimeInfo, e as LanguageRuntimeOpenSourceInfo, N as NODE_RUNTIME_COMPAT_VERSION, R as ResolvedLanguageRuntimeOpenSourceInfo, f as ResolvedRuntimeOpenSourceComponentInfo, g as ResolvedRuntimeOpenSourceResource, h as RuntimeCommandEvent, i as RuntimeCommandEventHandler, j as RuntimeCommandEventStream, k as RuntimeCommandFileChangeEvent, l as RuntimeCommandOptions, m as RuntimeCommandOutputEvent, n as RuntimeCommandResult, o as RuntimeCommandStatusEvent, p as RuntimeComponentInfo, q as RuntimeExecuteCase, r as RuntimeExecuteCaseResult, s as RuntimeExecuteCodeRequest, t as RuntimeExecuteResult, u as RuntimeFile, v as RuntimeFileChange, w as RuntimeFileEncoding, x as RuntimeFileMutationPhase, y as RuntimeKernelDevicePath, z as RuntimeKernelHostConfig, A as RuntimeKernelHostInfo, B as RuntimeKernelHttpBodyInit, D as RuntimeKernelHttpBodyPayload, F as RuntimeKernelHttpBridge, G as RuntimeKernelHttpHandler, H as RuntimeKernelHttpListenOptions, I as RuntimeKernelHttpListenerHandle, J as RuntimeKernelHttpListenerInfo, K as RuntimeKernelHttpRequest, M as RuntimeKernelHttpResponse, O as RuntimeKernelInfo, P as RuntimeKernelUserConfig, Q as RuntimeKernelUserInfo, S as RuntimeKernelWorkspaceConfig, T as RuntimeKernelWorkspaceInfo, U as RuntimeLibraryInfo, V as RuntimeOpenSourceAssetResource, W as RuntimeOpenSourceComponentInfo, X as RuntimeOpenSourceInfoOptions, Y as RuntimeOpenSourceResource, Z as RuntimeOpenSourceResourceKind, _ as RuntimeOpenSourceUrlResource, $ as RuntimeProjectCommandRequest, a0 as RuntimeProjectCommandRunner, a1 as RuntimeProjectIoBridge, a2 as RuntimeProjectLiveIoControllerOptions, a3 as RuntimeProjectPatch, a4 as RuntimeProjectPatchBase, a5 as RuntimeProjectPatchChange, a6 as RuntimeProjectPatchDirectoryCreate, a7 as RuntimeProjectPatchDirectoryDelete, a8 as RuntimeProjectPatchFileDelete, a9 as RuntimeProjectPatchFileWrite, aa as RuntimeProjectPatchOptions, ab as RuntimeProjectSession, ac as RuntimeProjectSessionCommand, ad as RuntimeProjectSessionCommandDefinition, ae as RuntimeProjectSessionFile, af as RuntimeProjectSessionInfo, ag as RuntimeProjectSnapshot, ah as RuntimeProjectTerminalEvent, ai as RuntimeProjectTerminalEventHandler, aj as RuntimeProjectTerminalInputState, ak as RuntimeProjectTerminalInputStateReason, al as RuntimeProjectTerminalPrompt, am as RuntimeProjectTerminalRunOptions, an as RuntimeProjectTerminalSession, ao as RuntimeProjectTerminalSessionOptions, ap as RuntimeProjectWorkerBridgeOptions, aq as RuntimeTrace, ar as RuntimeTraceKernelConfig, as as RuntimeTraceKernelSchedulerConfig, at as RuntimeWorkspace, au as RuntimeWorkspaceActor, av as RuntimeWorkspaceActorKind, aw as RuntimeWorkspaceCapabilities, ax as RuntimeWorkspaceEvent, ay as RuntimeWorkspaceEventHandler, az as RuntimeWorkspaceHttpClient, aA as RuntimeWorkspaceHttpJsonRequestOptions, aB as RuntimeWorkspaceHttpJsonResponse, aC as RuntimeWorkspaceHttpRequestOptions, aD as RuntimeWorkspaceKernel, aE as RuntimeWorkspaceRemoveOptions, aF as RuntimeWorkspaceStat, aG as RuntimeWorkspaceUnsubscribe, aH as SUPPORTED_LANGUAGE_RUNTIME_INFOS, aI as createEmptyRuntimeTrace, aJ as getLanguageRuntimeInfo, aK as getLanguageRuntimeOpenSourceInfo, aL as getSupportedLanguageRuntimeInfos, aM as getSupportedLanguageRuntimeOpenSourceInfos, aN as resolveRuntimeOpenSourceResourceHref } from './runtime-open-source-info-CaBpNicy.cjs';
10
10
  import { BrowserWorkerFactory } from './internal/browser.cjs';
11
11
  export { I as InstallBrowserExecutionWorkerHostOptions, c as createBrowserExecutionWorkerHost, i as installBrowserExecutionWorkerHost } from './execution-host-BtriY0VV.cjs';
12
12
  export { runtimeHttpBodyBytes, runtimeHttpBodyFromBytes, runtimeHttpBodyFromText, runtimeHttpBodyText, runtimeHttpRequestBytes, runtimeHttpRequestText, runtimeHttpResponseBytes, runtimeHttpResponseText } from './core.cjs';
@@ -44,6 +44,15 @@ declare function createTraceCCRuntimeManifest(assetBaseUrl: string, options?: {
44
44
  * available with an explicit worker URL override.
45
45
  */
46
46
  declare function resolveBuiltInTraceCCRuntimeManifest(assetBaseUrl?: string): BrowserRuntimeAssetManifest<'cpp'>;
47
+ /**
48
+ * Resolves the built-in TraceCC tree for an isolated Project workspace.
49
+ *
50
+ * Project workers use a distinct entrypoint so deployments can attach the
51
+ * COOP/COEP headers required by the workspace without changing the shared
52
+ * Practice/Judge worker policy. The compiler tree remains the same immutable
53
+ * Harness release.
54
+ */
55
+ declare function resolveBuiltInTraceCCProjectRuntimeManifest(assetBaseUrl?: string): BrowserRuntimeAssetManifest<'cpp'>;
47
56
  /** The pinned fb4 TraceCC manifest for the standard `/workers` deployment. */
48
57
  declare const TRACECC_RUNTIME_MANIFEST: BrowserRuntimeAssetManifest<"cpp">;
49
58
 
@@ -101,4 +110,4 @@ type CreatePythonAnalysisClientOptions = PythonWorkerClientOptions;
101
110
  */
102
111
  declare function createPythonAnalysisClient(options: CreatePythonAnalysisClientOptions): PythonAnalysisClient;
103
112
 
104
- export { BrowserRuntimeAssetManifest, CodeExecutionResult, type CreatePythonAnalysisClientOptions, type PythonAnalysisClient, RuntimeExecutionStyle, TRACECC_RUNTIME_ASSET_RELATIVE_PATH, TRACECC_RUNTIME_CONTENT_HASH, TRACECC_RUNTIME_MANIFEST, createPythonAnalysisClient, createTraceCCRuntimeManifest, resolveBuiltInTraceCCRuntimeManifest };
113
+ export { BrowserRuntimeAssetManifest, CodeExecutionResult, type CreatePythonAnalysisClientOptions, type PythonAnalysisClient, RuntimeExecutionStyle, TRACECC_RUNTIME_ASSET_RELATIVE_PATH, TRACECC_RUNTIME_CONTENT_HASH, TRACECC_RUNTIME_MANIFEST, createPythonAnalysisClient, createTraceCCRuntimeManifest, resolveBuiltInTraceCCProjectRuntimeManifest, resolveBuiltInTraceCCRuntimeManifest };
@@ -1,12 +1,12 @@
1
1
  export * from './internal/tracekernel.js';
2
2
  export * from './internal/tracekernel-workspace.js';
3
- import { B as BrowserRuntimeAssetManifest } from './runtime-environment-Q60S0pUa.js';
4
- export { A as AnyBrowserRuntimeAssetManifest, a as BROWSER_RUNTIME_ASSET_PROTOCOL_VERSION, b as BROWSER_RUNTIME_IDS, c as BrowserKernelStorage, d as BrowserKernelStorageBinding, e as BrowserKernelStorageSnapshot, f as BrowserRuntimeAssetDelivery, g as BrowserRuntimeAssetDescriptor, h as BrowserRuntimeAssetManifestProvider, i as BrowserRuntimeAssetManifests, j as BrowserRuntimeAssetOriginPolicy, k as BrowserRuntimeAssetOverrides, l as BrowserRuntimeAssets, m as BrowserRuntimeAssetsByRuntime, n as BrowserRuntimeEngine, o as BrowserRuntimeEnvironment, p as BrowserRuntimeEnvironmentOptions, q as BrowserRuntimeEnvironmentReport, r as BrowserRuntimeFeatureSupport, s as BrowserRuntimeId, t as BrowserRuntimeKnownIssue, u as BrowserRuntimeLoaderFormat, v as BrowserRuntimeReadiness, w as BrowserRuntimeReadinessStatus, x as BrowserRuntimeSurface, y as BrowserRuntimeWorkerFormat, z as BrowserWorkspace, C as BrowserWorkspaceExecutionHostOptions, D as BrowserWorkspaceJavaRuntimeOptions, E as BrowserWorkspaceNodeOptions, F as BrowserWorkspaceProvider, G as BrowserWorkspaceRuntimeProvider, H as BrowserWorkspaceRuntimeProviders, I as BrowserWorkspaceTypeScriptOptions, J as BrowserWorkspaceWorkerIsolation, K as BrowserWorkspaceWorkerPrewarmOptions, L as CppCompilerIntegrityEntry, M as CppCompilerIntegrityManifest, N as CreateBrowserWorkspaceOptions, O as IndexedDbKernelStorageOptions, P as PYTHON_RUNTIME_IMAGE_PROTOCOL_VERSION, Q as PythonRuntimeImageAssetDescriptor, R as createBrowserRuntimeEnvironment, S as createBrowserWorkspace, T as createIndexedDbKernelStorage, U as resolveBrowserRuntimeAssetManifests, V as resolveBrowserRuntimeAssets } from './runtime-environment-Q60S0pUa.js';
3
+ import { B as BrowserRuntimeAssetManifest } from './runtime-environment-Dfg6ZoCj.js';
4
+ export { A as AnyBrowserRuntimeAssetManifest, a as BROWSER_RUNTIME_ASSET_PROTOCOL_VERSION, b as BROWSER_RUNTIME_IDS, c as BrowserKernelStorage, d as BrowserKernelStorageBinding, e as BrowserKernelStorageSnapshot, f as BrowserRuntimeAssetDelivery, g as BrowserRuntimeAssetDescriptor, h as BrowserRuntimeAssetManifestProvider, i as BrowserRuntimeAssetManifests, j as BrowserRuntimeAssetOriginPolicy, k as BrowserRuntimeAssetOverrides, l as BrowserRuntimeAssets, m as BrowserRuntimeAssetsByRuntime, n as BrowserRuntimeEngine, o as BrowserRuntimeEnvironment, p as BrowserRuntimeEnvironmentOptions, q as BrowserRuntimeEnvironmentReport, r as BrowserRuntimeFeatureSupport, s as BrowserRuntimeId, t as BrowserRuntimeKnownIssue, u as BrowserRuntimeLoaderFormat, v as BrowserRuntimeReadiness, w as BrowserRuntimeReadinessStatus, x as BrowserRuntimeSurface, y as BrowserRuntimeWorkerFormat, z as BrowserWorkspace, C as BrowserWorkspaceExecutionHostOptions, D as BrowserWorkspaceJavaRuntimeOptions, E as BrowserWorkspaceNodeOptions, F as BrowserWorkspaceProvider, G as BrowserWorkspaceRuntimeProvider, H as BrowserWorkspaceRuntimeProviders, I as BrowserWorkspaceTypeScriptOptions, J as BrowserWorkspaceWorkerIsolation, K as BrowserWorkspaceWorkerPrewarmOptions, L as CppCompilerIntegrityEntry, M as CppCompilerIntegrityManifest, N as CreateBrowserWorkspaceOptions, O as IndexedDbKernelStorageOptions, P as PYTHON_RUNTIME_IMAGE_PROTOCOL_VERSION, Q as PythonRuntimeImageAssetDescriptor, R as createBrowserRuntimeEnvironment, S as createBrowserWorkspace, T as createIndexedDbKernelStorage, U as resolveBrowserRuntimeAssetManifests, V as resolveBrowserRuntimeAssets } from './runtime-environment-Dfg6ZoCj.js';
5
5
  export { L as LANGUAGE_RUNTIME_PROFILES, S as SUPPORTED_LANGUAGES, a as assertRuntimeRequestSupported, g as getLanguageRuntimeProfile, b as getRuntimeProjectIoCapability, c as getRuntimeProjectIoCapabilityMatrix, d as getRuntimeProjectIoSupport, e as getSupportedLanguageProfiles, i as isLanguageSupported, f as isRuntimeSafeForUntrustedReuse } from './runtime-profiles-CeFZX8sd.js';
6
6
  import { R as RuntimeExecutionStyle } from './runtime-capabilities-lLyT-B7D.js';
7
7
  export { L as Language, a as LanguageRuntimeProfile, b as RuntimeCapabilities, c as RuntimeCompileCost, d as RuntimeExecutionIsolationBoundary, e as RuntimeExecutionIsolationPolicy, f as RuntimeExecutionIsolationSupport, g as RuntimeExecutionLimitSupport, h as RuntimeExecutionLimits, i as RuntimeExecutionPipeline, j as RuntimeMaturity, k as RuntimeProjectIoCapabilityRow, l as RuntimeProjectIoEnvironment, m as RuntimeProjectIoSupport, n as RuntimeProjectIoTier, T as TraceExecutionOptions } from './runtime-capabilities-lLyT-B7D.js';
8
- import { C as CodeExecutionResult } from './runtime-open-source-info-FkIxlAcm.js';
9
- export { E as ExecutionDiagnosticStage, a as ExecutionLimitReason, b as ExecutionResult, L as LANGUAGE_RUNTIME_INFOS, c as LANGUAGE_RUNTIME_OPEN_SOURCE_INFOS, d as LanguageRuntimeInfo, e as LanguageRuntimeOpenSourceInfo, N as NODE_RUNTIME_COMPAT_VERSION, R as ResolvedLanguageRuntimeOpenSourceInfo, f as ResolvedRuntimeOpenSourceComponentInfo, g as ResolvedRuntimeOpenSourceResource, h as RuntimeCommandEvent, i as RuntimeCommandEventHandler, j as RuntimeCommandEventStream, k as RuntimeCommandFileChangeEvent, l as RuntimeCommandOptions, m as RuntimeCommandOutputEvent, n as RuntimeCommandResult, o as RuntimeCommandStatusEvent, p as RuntimeComponentInfo, q as RuntimeExecuteCase, r as RuntimeExecuteCaseResult, s as RuntimeExecuteCodeRequest, t as RuntimeExecuteResult, u as RuntimeFile, v as RuntimeFileChange, w as RuntimeFileEncoding, x as RuntimeFileMutationPhase, y as RuntimeKernelDevicePath, z as RuntimeKernelHostConfig, A as RuntimeKernelHostInfo, B as RuntimeKernelHttpBodyInit, D as RuntimeKernelHttpBodyPayload, F as RuntimeKernelHttpBridge, G as RuntimeKernelHttpHandler, H as RuntimeKernelHttpListenOptions, I as RuntimeKernelHttpListenerHandle, J as RuntimeKernelHttpListenerInfo, K as RuntimeKernelHttpRequest, M as RuntimeKernelHttpResponse, O as RuntimeKernelInfo, P as RuntimeKernelUserConfig, Q as RuntimeKernelUserInfo, S as RuntimeKernelWorkspaceConfig, T as RuntimeKernelWorkspaceInfo, U as RuntimeLibraryInfo, V as RuntimeOpenSourceAssetResource, W as RuntimeOpenSourceComponentInfo, X as RuntimeOpenSourceInfoOptions, Y as RuntimeOpenSourceResource, Z as RuntimeOpenSourceResourceKind, _ as RuntimeOpenSourceUrlResource, $ as RuntimeProjectCommandRequest, a0 as RuntimeProjectCommandRunner, a1 as RuntimeProjectIoBridge, a2 as RuntimeProjectLiveIoControllerOptions, a3 as RuntimeProjectPatch, a4 as RuntimeProjectPatchBase, a5 as RuntimeProjectPatchChange, a6 as RuntimeProjectPatchDirectoryCreate, a7 as RuntimeProjectPatchDirectoryDelete, a8 as RuntimeProjectPatchFileDelete, a9 as RuntimeProjectPatchFileWrite, aa as RuntimeProjectPatchOptions, ab as RuntimeProjectSession, ac as RuntimeProjectSessionCommand, ad as RuntimeProjectSessionCommandDefinition, ae as RuntimeProjectSessionFile, af as RuntimeProjectSessionInfo, ag as RuntimeProjectSnapshot, ah as RuntimeProjectTerminalEvent, ai as RuntimeProjectTerminalEventHandler, aj as RuntimeProjectTerminalInputState, ak as RuntimeProjectTerminalInputStateReason, al as RuntimeProjectTerminalPrompt, am as RuntimeProjectTerminalRunOptions, an as RuntimeProjectTerminalSession, ao as RuntimeProjectTerminalSessionOptions, ap as RuntimeProjectWorkerBridgeOptions, aq as RuntimeTrace, ar as RuntimeTraceKernelConfig, as as RuntimeTraceKernelSchedulerConfig, at as RuntimeWorkspace, au as RuntimeWorkspaceActor, av as RuntimeWorkspaceActorKind, aw as RuntimeWorkspaceCapabilities, ax as RuntimeWorkspaceEvent, ay as RuntimeWorkspaceEventHandler, az as RuntimeWorkspaceHttpClient, aA as RuntimeWorkspaceHttpJsonRequestOptions, aB as RuntimeWorkspaceHttpJsonResponse, aC as RuntimeWorkspaceHttpRequestOptions, aD as RuntimeWorkspaceKernel, aE as RuntimeWorkspaceRemoveOptions, aF as RuntimeWorkspaceStat, aG as RuntimeWorkspaceUnsubscribe, aH as SUPPORTED_LANGUAGE_RUNTIME_INFOS, aI as createEmptyRuntimeTrace, aJ as getLanguageRuntimeInfo, aK as getLanguageRuntimeOpenSourceInfo, aL as getSupportedLanguageRuntimeInfos, aM as getSupportedLanguageRuntimeOpenSourceInfos, aN as resolveRuntimeOpenSourceResourceHref } from './runtime-open-source-info-FkIxlAcm.js';
8
+ import { C as CodeExecutionResult } from './runtime-open-source-info-D0OJc4zH.js';
9
+ export { E as ExecutionDiagnosticStage, a as ExecutionLimitReason, b as ExecutionResult, L as LANGUAGE_RUNTIME_INFOS, c as LANGUAGE_RUNTIME_OPEN_SOURCE_INFOS, d as LanguageRuntimeInfo, e as LanguageRuntimeOpenSourceInfo, N as NODE_RUNTIME_COMPAT_VERSION, R as ResolvedLanguageRuntimeOpenSourceInfo, f as ResolvedRuntimeOpenSourceComponentInfo, g as ResolvedRuntimeOpenSourceResource, h as RuntimeCommandEvent, i as RuntimeCommandEventHandler, j as RuntimeCommandEventStream, k as RuntimeCommandFileChangeEvent, l as RuntimeCommandOptions, m as RuntimeCommandOutputEvent, n as RuntimeCommandResult, o as RuntimeCommandStatusEvent, p as RuntimeComponentInfo, q as RuntimeExecuteCase, r as RuntimeExecuteCaseResult, s as RuntimeExecuteCodeRequest, t as RuntimeExecuteResult, u as RuntimeFile, v as RuntimeFileChange, w as RuntimeFileEncoding, x as RuntimeFileMutationPhase, y as RuntimeKernelDevicePath, z as RuntimeKernelHostConfig, A as RuntimeKernelHostInfo, B as RuntimeKernelHttpBodyInit, D as RuntimeKernelHttpBodyPayload, F as RuntimeKernelHttpBridge, G as RuntimeKernelHttpHandler, H as RuntimeKernelHttpListenOptions, I as RuntimeKernelHttpListenerHandle, J as RuntimeKernelHttpListenerInfo, K as RuntimeKernelHttpRequest, M as RuntimeKernelHttpResponse, O as RuntimeKernelInfo, P as RuntimeKernelUserConfig, Q as RuntimeKernelUserInfo, S as RuntimeKernelWorkspaceConfig, T as RuntimeKernelWorkspaceInfo, U as RuntimeLibraryInfo, V as RuntimeOpenSourceAssetResource, W as RuntimeOpenSourceComponentInfo, X as RuntimeOpenSourceInfoOptions, Y as RuntimeOpenSourceResource, Z as RuntimeOpenSourceResourceKind, _ as RuntimeOpenSourceUrlResource, $ as RuntimeProjectCommandRequest, a0 as RuntimeProjectCommandRunner, a1 as RuntimeProjectIoBridge, a2 as RuntimeProjectLiveIoControllerOptions, a3 as RuntimeProjectPatch, a4 as RuntimeProjectPatchBase, a5 as RuntimeProjectPatchChange, a6 as RuntimeProjectPatchDirectoryCreate, a7 as RuntimeProjectPatchDirectoryDelete, a8 as RuntimeProjectPatchFileDelete, a9 as RuntimeProjectPatchFileWrite, aa as RuntimeProjectPatchOptions, ab as RuntimeProjectSession, ac as RuntimeProjectSessionCommand, ad as RuntimeProjectSessionCommandDefinition, ae as RuntimeProjectSessionFile, af as RuntimeProjectSessionInfo, ag as RuntimeProjectSnapshot, ah as RuntimeProjectTerminalEvent, ai as RuntimeProjectTerminalEventHandler, aj as RuntimeProjectTerminalInputState, ak as RuntimeProjectTerminalInputStateReason, al as RuntimeProjectTerminalPrompt, am as RuntimeProjectTerminalRunOptions, an as RuntimeProjectTerminalSession, ao as RuntimeProjectTerminalSessionOptions, ap as RuntimeProjectWorkerBridgeOptions, aq as RuntimeTrace, ar as RuntimeTraceKernelConfig, as as RuntimeTraceKernelSchedulerConfig, at as RuntimeWorkspace, au as RuntimeWorkspaceActor, av as RuntimeWorkspaceActorKind, aw as RuntimeWorkspaceCapabilities, ax as RuntimeWorkspaceEvent, ay as RuntimeWorkspaceEventHandler, az as RuntimeWorkspaceHttpClient, aA as RuntimeWorkspaceHttpJsonRequestOptions, aB as RuntimeWorkspaceHttpJsonResponse, aC as RuntimeWorkspaceHttpRequestOptions, aD as RuntimeWorkspaceKernel, aE as RuntimeWorkspaceRemoveOptions, aF as RuntimeWorkspaceStat, aG as RuntimeWorkspaceUnsubscribe, aH as SUPPORTED_LANGUAGE_RUNTIME_INFOS, aI as createEmptyRuntimeTrace, aJ as getLanguageRuntimeInfo, aK as getLanguageRuntimeOpenSourceInfo, aL as getSupportedLanguageRuntimeInfos, aM as getSupportedLanguageRuntimeOpenSourceInfos, aN as resolveRuntimeOpenSourceResourceHref } from './runtime-open-source-info-D0OJc4zH.js';
10
10
  import { BrowserWorkerFactory } from './internal/browser.js';
11
11
  export { I as InstallBrowserExecutionWorkerHostOptions, c as createBrowserExecutionWorkerHost, i as installBrowserExecutionWorkerHost } from './execution-host-BtriY0VV.js';
12
12
  export { runtimeHttpBodyBytes, runtimeHttpBodyFromBytes, runtimeHttpBodyFromText, runtimeHttpBodyText, runtimeHttpRequestBytes, runtimeHttpRequestText, runtimeHttpResponseBytes, runtimeHttpResponseText } from './core.js';
@@ -44,6 +44,15 @@ declare function createTraceCCRuntimeManifest(assetBaseUrl: string, options?: {
44
44
  * available with an explicit worker URL override.
45
45
  */
46
46
  declare function resolveBuiltInTraceCCRuntimeManifest(assetBaseUrl?: string): BrowserRuntimeAssetManifest<'cpp'>;
47
+ /**
48
+ * Resolves the built-in TraceCC tree for an isolated Project workspace.
49
+ *
50
+ * Project workers use a distinct entrypoint so deployments can attach the
51
+ * COOP/COEP headers required by the workspace without changing the shared
52
+ * Practice/Judge worker policy. The compiler tree remains the same immutable
53
+ * Harness release.
54
+ */
55
+ declare function resolveBuiltInTraceCCProjectRuntimeManifest(assetBaseUrl?: string): BrowserRuntimeAssetManifest<'cpp'>;
47
56
  /** The pinned fb4 TraceCC manifest for the standard `/workers` deployment. */
48
57
  declare const TRACECC_RUNTIME_MANIFEST: BrowserRuntimeAssetManifest<"cpp">;
49
58
 
@@ -101,4 +110,4 @@ type CreatePythonAnalysisClientOptions = PythonWorkerClientOptions;
101
110
  */
102
111
  declare function createPythonAnalysisClient(options: CreatePythonAnalysisClientOptions): PythonAnalysisClient;
103
112
 
104
- export { BrowserRuntimeAssetManifest, CodeExecutionResult, type CreatePythonAnalysisClientOptions, type PythonAnalysisClient, RuntimeExecutionStyle, TRACECC_RUNTIME_ASSET_RELATIVE_PATH, TRACECC_RUNTIME_CONTENT_HASH, TRACECC_RUNTIME_MANIFEST, createPythonAnalysisClient, createTraceCCRuntimeManifest, resolveBuiltInTraceCCRuntimeManifest };
113
+ export { BrowserRuntimeAssetManifest, CodeExecutionResult, type CreatePythonAnalysisClientOptions, type PythonAnalysisClient, RuntimeExecutionStyle, TRACECC_RUNTIME_ASSET_RELATIVE_PATH, TRACECC_RUNTIME_CONTENT_HASH, TRACECC_RUNTIME_MANIFEST, createPythonAnalysisClient, createTraceCCRuntimeManifest, resolveBuiltInTraceCCProjectRuntimeManifest, resolveBuiltInTraceCCRuntimeManifest };
@@ -3,9 +3,6 @@ import {
3
3
  BROWSER_RUNTIME_ASSET_PROTOCOL_VERSION,
4
4
  BROWSER_RUNTIME_IDS,
5
5
  PYTHON_RUNTIME_IMAGE_PROTOCOL_VERSION,
6
- TRACECC_RUNTIME_ASSET_RELATIVE_PATH,
7
- TRACECC_RUNTIME_CONTENT_HASH,
8
- TRACECC_RUNTIME_MANIFEST,
9
6
  TRACEKERNEL_FILE_SYSTEM_IMAGE_SCHEMA,
10
7
  TRACEKERNEL_SYSCALL_OPERATION_CODES,
11
8
  TRACEKERNEL_SYSCALL_WIRE_SCHEMA,
@@ -50,7 +47,6 @@ import {
50
47
  createBrowserProjectWorkspace,
51
48
  createBrowserRuntimeEnvironment,
52
49
  createIndexedDbKernelStorage,
53
- createTraceCCRuntimeManifest,
54
50
  decodeTraceKernelSyscallRequest,
55
51
  decodeTraceKernelSyscallResult,
56
52
  decodeTraceKernelWatchEvent,
@@ -64,12 +60,19 @@ import {
64
60
  makeTraceKernelPromiseSyscallHandler,
65
61
  makeTraceKernelSharedSyscallChannel,
66
62
  resolveBrowserRuntimeAssetManifests,
67
- resolveBrowserRuntimeAssets,
63
+ resolveBrowserRuntimeAssets
64
+ } from "./chunk-TXDHVV6B.js";
65
+ import {
66
+ TRACECC_RUNTIME_ASSET_RELATIVE_PATH,
67
+ TRACECC_RUNTIME_CONTENT_HASH,
68
+ TRACECC_RUNTIME_MANIFEST,
69
+ createTraceCCRuntimeManifest,
70
+ resolveBuiltInTraceCCProjectRuntimeManifest,
68
71
  resolveBuiltInTraceCCRuntimeManifest
69
- } from "./chunk-DQMPICNS.js";
72
+ } from "./chunk-EJE2EJDI.js";
70
73
  import {
71
74
  PythonWorkerClient
72
- } from "./chunk-MMQLUTPP.js";
75
+ } from "./chunk-53ROKKGU.js";
73
76
  import {
74
77
  LANGUAGE_RUNTIME_INFOS,
75
78
  LANGUAGE_RUNTIME_OPEN_SOURCE_INFOS,
@@ -233,7 +236,7 @@ import {
233
236
  withRuntimeProjectCommandRunnerCapabilities,
234
237
  withRuntimeTraceOptions,
235
238
  writeRuntimeCommandStdinPipeBytes
236
- } from "./chunk-4W6MUXZE.js";
239
+ } from "./chunk-BXUGUGWL.js";
237
240
  import {
238
241
  _await,
239
242
  bounded,
@@ -71381,20 +71384,27 @@ var RuntimeProjectWorkspaceTerminalSession = class {
71381
71384
  signalCharacter === "" ? "SIGINT" : "SIGQUIT"
71382
71385
  );
71383
71386
  }
71384
- const route = this.options.terminalInputRouter?.write(data) ?? (this.activeStdinPipe !== null ? "legacy" : "rejected");
71387
+ const routed = this.options.terminalInputRouter?.write(data);
71388
+ const route = routed === "rejected" && this.activeStdinPipe !== null ? "legacy" : routed ?? (this.activeStdinPipe !== null ? "legacy" : "rejected");
71385
71389
  if (route === "legacy") {
71386
- this.activeStdinPipe?.write(data);
71390
+ if (!this.activeStdinPipe) return false;
71391
+ try {
71392
+ this.activeStdinPipe.write(data);
71393
+ } catch {
71394
+ return false;
71395
+ }
71387
71396
  }
71388
71397
  const accepted = route !== "rejected";
71389
71398
  if (accepted && this.currentInputState.mode === "stdin") {
71390
71399
  this.activeStdinPrompt = "";
71391
- this.setInputState("busy", "stdin-submit");
71400
+ this.setInputState("stdin", "stdin-submit", "");
71392
71401
  }
71393
71402
  return accepted;
71394
71403
  }
71395
71404
  endStdin() {
71396
71405
  if (!this.activeRun || this.activeStdinEnded) return false;
71397
- const route = this.options.terminalInputRouter?.end() ?? (this.activeStdinPipe !== null ? "legacy" : "rejected");
71406
+ const routed = this.options.terminalInputRouter?.end();
71407
+ const route = routed === "rejected" && this.activeStdinPipe !== null ? "legacy" : routed ?? (this.activeStdinPipe !== null ? "legacy" : "rejected");
71398
71408
  if (route === "rejected") return false;
71399
71409
  this.activeStdinEnded = true;
71400
71410
  if (route === "legacy") {
@@ -71433,6 +71443,14 @@ var RuntimeProjectWorkspaceTerminalSession = class {
71433
71443
  this.emitTerminalEvent(reason);
71434
71444
  return this.currentInputState;
71435
71445
  }
71446
+ showForegroundInputLine() {
71447
+ const acceptsInput = this.activeStdinPipe !== null || this.options.terminalInputRouter !== void 0;
71448
+ return this.setInputState(
71449
+ acceptsInput ? "stdin" : "busy",
71450
+ "command-start",
71451
+ acceptsInput ? "" : this.prompt.text
71452
+ );
71453
+ }
71436
71454
  async run(command, options = {}) {
71437
71455
  const trimmed = command.trim();
71438
71456
  if (!trimmed) return { stdout: "", stderr: "", exitCode: 0 };
@@ -71487,7 +71505,7 @@ var RuntimeProjectWorkspaceTerminalSession = class {
71487
71505
  this.activeTerminalEventHandler = options.onTerminalEvent;
71488
71506
  this.activeStdinPrompt = "";
71489
71507
  this.activeCommand = submittedCommand;
71490
- this.setInputState("busy", "command-start");
71508
+ this.showForegroundInputLine();
71491
71509
  try {
71492
71510
  let stdout = "";
71493
71511
  let stderr = "";
@@ -71516,6 +71534,7 @@ var RuntimeProjectWorkspaceTerminalSession = class {
71516
71534
  ...error ? { error } : {}
71517
71535
  };
71518
71536
  } finally {
71537
+ this.options.terminalInputRouter?.reset();
71519
71538
  ownedStdinPipe?.close();
71520
71539
  this.activeStdinPipe = previousStdinPipe;
71521
71540
  this.activeStdinEnded = previousStdinEnded;
@@ -71554,7 +71573,7 @@ var RuntimeProjectWorkspaceTerminalSession = class {
71554
71573
  this.activeStdinPrompt = "";
71555
71574
  this.activeCommand = trimmed;
71556
71575
  this.activeCommandAbortController = commandAbortController;
71557
- this.setInputState("busy", "command-start");
71576
+ this.showForegroundInputLine();
71558
71577
  try {
71559
71578
  const result = await this.runForegroundTerminalCommand(
71560
71579
  trimmed,
@@ -71565,6 +71584,7 @@ var RuntimeProjectWorkspaceTerminalSession = class {
71565
71584
  return result;
71566
71585
  } finally {
71567
71586
  options.signal?.removeEventListener("abort", forwardExternalAbort);
71587
+ this.options.terminalInputRouter?.reset();
71568
71588
  ownedStdinPipe?.close();
71569
71589
  this.activeStdinPipe = previousStdinPipe;
71570
71590
  this.activeStdinEnded = previousStdinEnded;
@@ -77192,21 +77212,26 @@ function createWorkspaceRuntimeRunnerBridge(bridge) {
77192
77212
  ...requestWithoutLegacyStdin
77193
77213
  } = request;
77194
77214
  const activeStdinPipe = request.source !== "compile" && request.source !== "stdin" ? commandContext?.stdinPipe : void 0;
77215
+ const consumesLiveStdin = request.source !== "compile" && request.source !== "stdin";
77195
77216
  const stdinPipe = request.stdinPipe ?? activeStdinPipe;
77196
- const processBinding = commandContext ? bridge.bindProcess(commandContext, descriptorStdio) : {};
77217
+ const processBinding = commandContext ? bridge.bindProcess(
77218
+ commandContext,
77219
+ descriptorStdio,
77220
+ consumesLiveStdin
77221
+ ) : {};
77197
77222
  const signal = processBinding.signal ?? request.signal;
77198
77223
  const runtimeIo = commandContext?.runtimeIo;
77199
77224
  let acceptingRunnerEvents = true;
77200
77225
  let result;
77201
77226
  const kernelSyscalls = options.kernelSyscalls ? bridge.createKernelSyscallBridge(commandContext) : void 0;
77202
- if (descriptorStdio && commandContext) {
77227
+ if (descriptorStdio && commandContext && consumesLiveStdin) {
77203
77228
  bridge.startHostStandardInputPump(commandContext);
77204
77229
  }
77205
77230
  try {
77206
- result = await runner({
77207
- ...descriptorStdio ? requestWithoutLegacyStdin : request,
77231
+ const execution = runner({
77232
+ ...descriptorStdio || !consumesLiveStdin ? requestWithoutLegacyStdin : request,
77208
77233
  ...processBinding.process ? { process: processBinding.process } : {},
77209
- ...stdinPipe && !descriptorStdio ? { stdinPipe: { buffer: stdinPipe.buffer } } : {},
77234
+ ...stdinPipe && !descriptorStdio && consumesLiveStdin ? { stdinPipe: { buffer: stdinPipe.buffer } } : {},
77210
77235
  ...commandContext?.terminal ? { terminal: commandContext.terminal } : {},
77211
77236
  ...commandContext?.engineLease ? { engineLease: commandContext.engineLease } : {},
77212
77237
  ...signal ? { signal } : {},
@@ -77218,6 +77243,8 @@ function createWorkspaceRuntimeRunnerBridge(bridge) {
77218
77243
  bridge.handleRuntimeCommandEvent(event, commandContext);
77219
77244
  }
77220
77245
  });
77246
+ await processBinding.replayStartupInput?.();
77247
+ result = await execution;
77221
77248
  } finally {
77222
77249
  acceptingRunnerEvents = false;
77223
77250
  kernelSyscalls?.close();
@@ -78095,6 +78122,7 @@ function createRuntimeWorkspaceShellCommands(options) {
78095
78122
  var PRINCIPAL_ACTOR2 = runtimeWorkspaceActorPreset("principal");
78096
78123
  var RUNTIME_ACTOR = runtimeWorkspaceActorPreset("runtime");
78097
78124
  var SYSTEM_ACTOR2 = runtimeWorkspaceActorPreset("system");
78125
+ var TERMINAL_STARTUP_INPUT_MAX_BYTES = 64 * 1024 - 1;
78098
78126
  var TRACEKERNEL_SYSCALL_ERROR_CODES = /* @__PURE__ */ new Set([
78099
78127
  "E2BIG",
78100
78128
  "EAGAIN",
@@ -78228,6 +78256,7 @@ var RuntimeProjectWorkspace = class {
78228
78256
  processState = new WorkspaceProcessState();
78229
78257
  terminalShells = /* @__PURE__ */ new Map();
78230
78258
  terminalResourceIds = /* @__PURE__ */ new Map();
78259
+ pendingTerminalStartupInput = /* @__PURE__ */ new Map();
78231
78260
  processProjection;
78232
78261
  // Temporary 0.13 introspection aliases. The process state module remains
78233
78262
  // authoritative; these preserve existing hardening probes while 0.14 moves
@@ -78409,17 +78438,24 @@ var RuntimeProjectWorkspace = class {
78409
78438
  });
78410
78439
  const withEvents = createWorkspaceRuntimeRunnerBridge({
78411
78440
  resolveCommandContext: (context) => this.resolveCommandContext(context),
78412
- bindProcess: (context, descriptorStdio) => {
78441
+ bindProcess: (context, descriptorStdio, consumesLiveStdin) => {
78413
78442
  const executionHandle = this.processProjection.executionHandle(
78414
78443
  context.process
78415
78444
  );
78416
78445
  if (executionHandle) {
78417
78446
  executionHandle.descriptorStdio = descriptorStdio;
78447
+ executionHandle.consumesLiveStdin = consumesLiveStdin;
78418
78448
  }
78419
78449
  const processSnapshot = this.processProjection.authoritativeSnapshot(
78420
78450
  context.process
78421
78451
  );
78422
78452
  return {
78453
+ replayStartupInput: () => this.resolvePendingTerminalStartupInput(
78454
+ context.process.pid,
78455
+ descriptorStdio,
78456
+ context.stdinPipe,
78457
+ consumesLiveStdin
78458
+ ),
78423
78459
  ...executionHandle?.abortController?.signal ? { signal: executionHandle.abortController.signal } : {},
78424
78460
  ...executionHandle?.signalChannel ? { kernelSignals: executionHandle.signalChannel } : {},
78425
78461
  ...processSnapshot ? {
@@ -80967,24 +81003,106 @@ var RuntimeProjectWorkspace = class {
80967
81003
  )
80968
81004
  );
80969
81005
  }
80970
- kernelTerminalInputRoute(terminal) {
81006
+ kernelTerminalInputRoute(terminalSessionId, terminal) {
80971
81007
  const hasDescriptorConsumer = this.traceKernelAuthority?.session.processSnapshots().some(
80972
- (process3) => process3.sid === terminal.sessionId && process3.pgid === terminal.foregroundProcessGroupId && this.processState.executionHandles.get(process3.pid)?.descriptorStdio === true
81008
+ (process3) => process3.sid === terminal.sessionId && process3.pgid === terminal.foregroundProcessGroupId && this.processState.executionHandles.get(process3.pid)?.descriptorStdio === true && this.processState.executionHandles.get(process3.pid)?.consumesLiveStdin === true
80973
81009
  ) === true;
80974
- return hasDescriptorConsumer ? "kernel" : "legacy";
81010
+ if (hasDescriptorConsumer) return "kernel";
81011
+ const foregroundPid = this.processState.terminalForeground.get(
81012
+ terminalSessionId
81013
+ );
81014
+ if (foregroundPid === void 0) return "pending";
81015
+ const executionHandle = this.processState.executionHandles.get(foregroundPid);
81016
+ if (executionHandle?.consumesLiveStdin !== true) return "pending";
81017
+ const descriptorStdio = executionHandle.descriptorStdio;
81018
+ return descriptorStdio === void 0 ? "pending" : descriptorStdio ? "kernel" : "legacy";
81019
+ }
81020
+ queueTerminalStartupInput(terminalSessionId, input = {}) {
81021
+ const pending = this.pendingTerminalStartupInput.get(terminalSessionId) ?? {
81022
+ chunks: [],
81023
+ byteLength: 0,
81024
+ eof: false
81025
+ };
81026
+ if (input.data) {
81027
+ const byteLength = new TextEncoder().encode(input.data).byteLength;
81028
+ if (pending.byteLength + byteLength > TERMINAL_STARTUP_INPUT_MAX_BYTES) {
81029
+ return false;
81030
+ }
81031
+ pending.chunks.push(input.data);
81032
+ pending.byteLength += byteLength;
81033
+ }
81034
+ if (input.eof) pending.eof = true;
81035
+ this.pendingTerminalStartupInput.set(terminalSessionId, pending);
81036
+ return true;
80975
81037
  }
80976
- writeKernelTerminalInput(terminalSessionId, data) {
81038
+ async resolvePendingTerminalStartupInput(foregroundPid, descriptorStdio, stdinPipe, consumesLiveStdin = true) {
81039
+ const boundProcess = this.processProjection.find(foregroundPid);
81040
+ const boundSnapshot = boundProcess ? this.processProjection.authoritativeSnapshot(boundProcess) : void 0;
81041
+ const terminalSessionId = [...this.processState.terminalForeground].find(([, pid]) => {
81042
+ if (pid === foregroundPid) return true;
81043
+ const terminalProcess = this.processProjection.find(pid);
81044
+ const terminalSnapshot = terminalProcess ? this.processProjection.authoritativeSnapshot(terminalProcess) : void 0;
81045
+ return Boolean(
81046
+ boundSnapshot && terminalSnapshot && boundSnapshot.pgid === terminalSnapshot.pgid
81047
+ );
81048
+ })?.[0];
81049
+ if (!terminalSessionId) return;
81050
+ const pending = this.pendingTerminalStartupInput.get(terminalSessionId);
81051
+ if (!pending) return;
81052
+ if (!consumesLiveStdin) return;
81053
+ this.pendingTerminalStartupInput.delete(terminalSessionId);
81054
+ if (!descriptorStdio) {
81055
+ if (!stdinPipe) return;
81056
+ try {
81057
+ for (const chunk of pending.chunks) stdinPipe.write(chunk);
81058
+ if (pending.eof) stdinPipe.close();
81059
+ } catch {
81060
+ stdinPipe.close();
81061
+ }
81062
+ return;
81063
+ }
80977
81064
  const authority = this.traceKernelAuthority;
80978
81065
  const terminalId = this.terminalResourceIds.get(terminalSessionId);
80979
81066
  const terminal = terminalId === void 0 ? void 0 : authority?.session.terminalSnapshots().find(
80980
81067
  (candidate) => candidate.id === terminalId
80981
81068
  );
80982
- if (!authority || !terminal || terminal.closed) return "rejected";
81069
+ if (!authority || !terminal || terminal.closed) return;
81070
+ const bytes = new TextEncoder().encode(pending.chunks.join(""));
81071
+ await runPromise(
81072
+ gen(function* () {
81073
+ if (bytes.byteLength > 0) {
81074
+ yield* authority.session.writeTerminalInput(terminal.id, bytes);
81075
+ }
81076
+ if (pending.eof) {
81077
+ yield* authority.session.sendTerminalInputEof(terminal.id);
81078
+ }
81079
+ }).pipe(catchAll(() => _void))
81080
+ );
81081
+ }
81082
+ discardPendingTerminalStartupInput(terminalSessionId, foregroundPid) {
81083
+ if (terminalSessionId && (foregroundPid === void 0 || this.processState.terminalForeground.get(terminalSessionId) === foregroundPid)) {
81084
+ this.pendingTerminalStartupInput.delete(terminalSessionId);
81085
+ }
81086
+ }
81087
+ writeKernelTerminalInput(terminalSessionId, data) {
80983
81088
  const signalByte = new TextEncoder().encode(data).find(
80984
81089
  (byte) => byte === 3 || byte === 28
80985
81090
  );
80986
- if (signalByte === void 0 && this.kernelTerminalInputRoute(terminal) === "legacy") {
80987
- return "legacy";
81091
+ const authority = this.traceKernelAuthority;
81092
+ const terminalId = this.terminalResourceIds.get(terminalSessionId);
81093
+ const terminal = terminalId === void 0 ? void 0 : authority?.session.terminalSnapshots().find(
81094
+ (candidate) => candidate.id === terminalId
81095
+ );
81096
+ if (!authority || !terminal || terminal.closed) {
81097
+ if (signalByte !== void 0) return "rejected";
81098
+ return this.queueTerminalStartupInput(terminalSessionId, { data }) ? "pending" : "rejected";
81099
+ }
81100
+ if (signalByte === void 0) {
81101
+ const route = this.kernelTerminalInputRoute(terminalSessionId, terminal);
81102
+ if (route === "pending") {
81103
+ return this.queueTerminalStartupInput(terminalSessionId, { data }) ? "pending" : "rejected";
81104
+ }
81105
+ if (route === "legacy") return "legacy";
80988
81106
  }
80989
81107
  if (signalByte !== void 0) {
80990
81108
  const signal = signalByte === 3 ? "SIGINT" : "SIGQUIT";
@@ -81014,8 +81132,16 @@ var RuntimeProjectWorkspace = class {
81014
81132
  const terminal = terminalId === void 0 ? void 0 : authority?.session.terminalSnapshots().find(
81015
81133
  (candidate) => candidate.id === terminalId
81016
81134
  );
81017
- if (!authority || !terminal || terminal.closed) return "rejected";
81018
- if (this.kernelTerminalInputRoute(terminal) === "legacy") return "legacy";
81135
+ if (!authority || !terminal || terminal.closed) {
81136
+ this.queueTerminalStartupInput(terminalSessionId, { eof: true });
81137
+ return "pending";
81138
+ }
81139
+ const route = this.kernelTerminalInputRoute(terminalSessionId, terminal);
81140
+ if (route === "pending") {
81141
+ this.queueTerminalStartupInput(terminalSessionId, { eof: true });
81142
+ return "pending";
81143
+ }
81144
+ if (route === "legacy") return "legacy";
81019
81145
  runFork(
81020
81146
  authority.session.sendTerminalInputEof(terminal.id).pipe(
81021
81147
  catchAll(() => _void)
@@ -82169,6 +82295,10 @@ usage: tracekernelctl {status|reset|verbose [on|off|status]|kill <pid> [signal]|
82169
82295
  executionHandle.signalChannel?.close();
82170
82296
  this.processState.executionHandles.delete(process3.pid);
82171
82297
  if (options.terminalSessionId && this.processState.terminalForeground.get(options.terminalSessionId) === process3.pid) {
82298
+ this.discardPendingTerminalStartupInput(
82299
+ options.terminalSessionId,
82300
+ process3.pid
82301
+ );
82172
82302
  this.processState.terminalForeground.delete(options.terminalSessionId);
82173
82303
  }
82174
82304
  clearKernelSignalHandler();
@@ -82423,6 +82553,10 @@ usage: tracekernelctl {status|reset|verbose [on|off|status]|kill <pid> [signal]|
82423
82553
  executionHandle.signalChannel?.close();
82424
82554
  this.processState.executionHandles.delete(process3.pid);
82425
82555
  if (options.terminalSessionId && this.processState.terminalForeground.get(options.terminalSessionId) === process3.pid) {
82556
+ this.discardPendingTerminalStartupInput(
82557
+ options.terminalSessionId,
82558
+ process3.pid
82559
+ );
82426
82560
  this.processState.terminalForeground.delete(options.terminalSessionId);
82427
82561
  }
82428
82562
  this.observeKernelReparentedChildren(process3.pid);
@@ -82729,6 +82863,7 @@ usage: tracekernelctl {status|reset|verbose [on|off|status]|kill <pid> [signal]|
82729
82863
  const shellPromise = this.terminalShells.get(terminalSessionId);
82730
82864
  this.terminalShells.delete(terminalSessionId);
82731
82865
  this.terminalResourceIds.delete(terminalSessionId);
82866
+ this.pendingTerminalStartupInput.delete(terminalSessionId);
82732
82867
  if (!shellPromise) return;
82733
82868
  const disposal = shellPromise.then(async (shell) => {
82734
82869
  const authority = this.traceKernelAuthority;
@@ -82783,7 +82918,8 @@ usage: tracekernelctl {status|reset|verbose [on|off|status]|kill <pid> [signal]|
82783
82918
  signalForeground: (signal) => this.signalTerminalForeground(terminalSessionId, signal),
82784
82919
  terminalInputRouter: {
82785
82920
  write: (data) => this.writeKernelTerminalInput(terminalSessionId, data),
82786
- end: () => this.endKernelTerminalInput(terminalSessionId)
82921
+ end: () => this.endKernelTerminalInput(terminalSessionId),
82922
+ reset: () => this.discardPendingTerminalStartupInput(terminalSessionId)
82787
82923
  },
82788
82924
  resizeTerminal: (columns, rows) => this.resizeKernelTerminal(terminalSessionId, columns, rows),
82789
82925
  closeTerminal: () => this.closeTerminalShell(terminalSessionId),
@@ -82897,13 +83033,14 @@ usage: tracekernelctl {status|reset|verbose [on|off|status]|kill <pid> [signal]|
82897
83033
  const descriptorStdio = this.cppRunner.capabilities?.descriptorStdio === true;
82898
83034
  if (executionHandle) {
82899
83035
  executionHandle.descriptorStdio = descriptorStdio;
83036
+ executionHandle.consumesLiveStdin = true;
82900
83037
  }
82901
83038
  if (descriptorStdio) {
82902
83039
  this.startHostStandardInputPump(request.commandContext);
82903
83040
  }
82904
83041
  let result;
82905
83042
  try {
82906
- result = await this.cppRunner({
83043
+ const execution = this.cppRunner({
82907
83044
  code: "",
82908
83045
  source: "run",
82909
83046
  scriptPath,
@@ -82928,6 +83065,12 @@ usage: tracekernelctl {status|reset|verbose [on|off|status]|kill <pid> [signal]|
82928
83065
  this.handleRuntimeCommandEvent(event, request.commandContext);
82929
83066
  }
82930
83067
  });
83068
+ await this.resolvePendingTerminalStartupInput(
83069
+ request.commandContext.process.pid,
83070
+ descriptorStdio,
83071
+ request.stdinPipe
83072
+ );
83073
+ result = await execution;
82931
83074
  } finally {
82932
83075
  kernelSyscalls?.close();
82933
83076
  }
@@ -83829,6 +83972,7 @@ export {
83829
83972
  readRuntimeProcFile,
83830
83973
  resolveBrowserRuntimeAssetManifests,
83831
83974
  resolveBrowserRuntimeAssets,
83975
+ resolveBuiltInTraceCCProjectRuntimeManifest,
83832
83976
  resolveBuiltInTraceCCRuntimeManifest,
83833
83977
  resolveRuntimeOpenSourceResourceHref,
83834
83978
  runRuntimeProjectWorkerBridge,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tracecode/harness",
3
- "version": "0.16.1",
3
+ "version": "0.16.3",
4
4
  "license": "AGPL-3.0-only",
5
5
  "homepage": "https://tracecode.app",
6
6
  "repository": {
@@ -10,6 +10,7 @@
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
13
+ "packageManager": "pnpm@10.4.1",
13
14
  "type": "module",
14
15
  "files": [
15
16
  "dist",
@@ -56,37 +57,8 @@
56
57
  },
57
58
  "./package.json": "./package.json"
58
59
  },
59
- "devDependencies": {
60
- "@types/node": "^20.0.0",
61
- "esbuild": "0.27.3",
62
- "just-bash": "3.1.0",
63
- "playwright": "^1.53.2",
64
- "pyodide": "^0.29.0",
65
- "tsup": "^8.5.0",
66
- "tsx": "^4.21.0",
67
- "typescript": "^5.0.0",
68
- "@tracecode/runtime-contracts": "^0.16.1",
69
- "@tracecode/tracekernel": "^0.16.1"
70
- },
71
- "dependencies": {
72
- "@datastructures-js/binary-search-tree": "5.4.0",
73
- "@datastructures-js/deque": "1.0.8",
74
- "@datastructures-js/graph": "5.3.1",
75
- "@datastructures-js/heap": "4.3.7",
76
- "@datastructures-js/linked-list": "6.1.4",
77
- "@datastructures-js/priority-queue": "6.3.5",
78
- "@datastructures-js/queue": "4.3.0",
79
- "@datastructures-js/set": "4.2.2",
80
- "@datastructures-js/stack": "3.1.6",
81
- "@datastructures-js/trie": "4.2.3",
82
- "@tracecode/tracecc": "0.1.0",
83
- "@tracecode/tracejvm": "0.4.1",
84
- "effect": "3.22.0",
85
- "fflate": "0.8.3",
86
- "lodash": "4.17.21",
87
- "typescript": "^5.0.0"
88
- },
89
60
  "scripts": {
61
+ "prepublishOnly": "pnpm release:check && pnpm test:runtime-assets-lock && pnpm build && pnpm release:check && pnpm test:runtime-assets-lock",
90
62
  "release:check": "node scripts/check-publish-safety.mjs",
91
63
  "release:root": "pnpm release:check && pnpm publish . --access public",
92
64
  "version:sync": "node scripts/sync-workspace-versions.mjs",
@@ -230,5 +202,45 @@
230
202
  "bench:browser-project-runtimes": "pnpm exec tsx --tsconfig tsconfig.base.json scripts/benchmark-browser-project-runtimes.ts",
231
203
  "bench:tracekernel-seekable-output": "node --import tsx scripts/benchmark-tracekernel-seekable-output.mts",
232
204
  "check:browser-project-performance": "node scripts/check-browser-project-performance.mjs"
205
+ },
206
+ "devDependencies": {
207
+ "@tracecode/runtime-contracts": "workspace:^",
208
+ "@tracecode/tracekernel": "workspace:^",
209
+ "@types/node": "^20.0.0",
210
+ "esbuild": "0.27.3",
211
+ "just-bash": "3.1.0",
212
+ "playwright": "^1.53.2",
213
+ "pyodide": "^0.29.0",
214
+ "tsup": "^8.5.0",
215
+ "tsx": "^4.21.0",
216
+ "typescript": "^5.0.0"
217
+ },
218
+ "pnpm": {
219
+ "overrides": {
220
+ "dompurify": "3.4.1",
221
+ "picomatch": "4.0.4",
222
+ "postcss": "8.5.10"
223
+ },
224
+ "patchedDependencies": {
225
+ "just-bash@3.1.0": "patches/just-bash@3.1.0.patch"
226
+ }
227
+ },
228
+ "dependencies": {
229
+ "@datastructures-js/binary-search-tree": "5.4.0",
230
+ "@datastructures-js/deque": "1.0.8",
231
+ "@datastructures-js/graph": "5.3.1",
232
+ "@datastructures-js/heap": "4.3.7",
233
+ "@datastructures-js/linked-list": "6.1.4",
234
+ "@datastructures-js/priority-queue": "6.3.5",
235
+ "@datastructures-js/queue": "4.3.0",
236
+ "@datastructures-js/set": "4.2.2",
237
+ "@datastructures-js/stack": "3.1.6",
238
+ "@datastructures-js/trie": "4.2.3",
239
+ "@tracecode/tracecc": "0.1.0",
240
+ "@tracecode/tracejvm": "0.4.1",
241
+ "effect": "3.22.0",
242
+ "fflate": "0.8.3",
243
+ "lodash": "4.17.21",
244
+ "typescript": "^5.0.0"
233
245
  }
234
- }
246
+ }