@tracecode/harness 0.16.2 → 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.
- package/CHANGELOG.md +13 -0
- package/dist/{browser-runtime-provider-45ND6W3K.js → browser-runtime-provider-C53ZJH3D.js} +4 -4
- package/dist/{chunk-HK62URW2.js → chunk-53ROKKGU.js} +2 -2
- package/dist/{chunk-J54PE2JS.js → chunk-6SWX35P2.js} +2 -2
- package/dist/{chunk-DGXNINFR.js → chunk-BXUGUGWL.js} +9 -9
- package/dist/{chunk-K4424WAS.js → chunk-DI7WIHES.js} +3 -3
- package/dist/{chunk-5SU2JQGI.js → chunk-TXDHVV6B.js} +16 -14
- package/dist/{chunk-MJOC6WVB.js → chunk-YID2AAYD.js} +2 -2
- package/dist/cli.js +0 -0
- package/dist/core.cjs +8 -8
- package/dist/core.d.cts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +1 -1
- package/dist/{cpp-worker-client-I6CPM7TA.js → cpp-worker-client-FLJ2YLSW.js} +3 -3
- package/dist/{csharp-worker-client-X7R4VXF4.js → csharp-worker-client-S4U6MCVF.js} +3 -3
- package/dist/internal/tracekernel-workspace.cjs +171 -31
- package/dist/internal/tracekernel-workspace.d.cts +8 -2
- package/dist/internal/tracekernel-workspace.d.ts +8 -2
- package/dist/internal/tracekernel-workspace.js +164 -24
- package/dist/{java-project-MLWER3CQ.js → java-project-GK6MHT3I.js} +2 -2
- package/dist/{java-project-client-R7CKC72F.js → java-project-client-PEQKFTH6.js} +11 -2
- package/dist/judge.cjs +186 -35
- package/dist/judge.d.cts +1 -1
- package/dist/judge.d.ts +1 -1
- package/dist/judge.js +6 -6
- package/dist/{project-browser-UALCR5KR.js → project-browser-3I5FVB5N.js} +2 -2
- package/dist/{project-browser-EIQ2FOXP.js → project-browser-ADXGG5RZ.js} +2 -2
- package/dist/{project-browser-JR2WG7DG.js → project-browser-B5T7WJWP.js} +2 -2
- package/dist/{project-browser-V3W4CQAQ.js → project-browser-JXJ74RDZ.js} +2 -2
- package/dist/{project-browser-T3EIQCMD.js → project-browser-TDL4LMJJ.js} +2 -2
- package/dist/{python-worker-client-MRWQTXOF.js → python-worker-client-2RF6IYIN.js} +3 -3
- package/dist/{runtime-environment-D7mZm8SA.d.cts → runtime-environment-BO5I1fAC.d.cts} +5 -0
- package/dist/{runtime-environment-Q60S0pUa.d.ts → runtime-environment-Dfg6ZoCj.d.ts} +5 -0
- package/dist/{runtime-open-source-info-BQtIRJ9F.d.cts → runtime-open-source-info-CaBpNicy.d.cts} +4 -2
- package/dist/{runtime-open-source-info-FkIxlAcm.d.ts → runtime-open-source-info-D0OJc4zH.d.ts} +4 -2
- package/dist/tracekernel.cjs +351 -60
- package/dist/tracekernel.d.cts +4 -4
- package/dist/tracekernel.d.ts +4 -4
- package/dist/tracekernel.js +166 -26
- package/package.json +44 -32
- package/runtime-assets.lock.json +7 -7
- package/workers/javascript/javascript-project-worker.js +7 -7
package/dist/tracekernel.d.cts
CHANGED
|
@@ -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-
|
|
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-
|
|
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-
|
|
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-
|
|
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';
|
package/dist/tracekernel.d.ts
CHANGED
|
@@ -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-
|
|
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-
|
|
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-
|
|
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-
|
|
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';
|
package/dist/tracekernel.js
CHANGED
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
makeTraceKernelSharedSyscallChannel,
|
|
62
62
|
resolveBrowserRuntimeAssetManifests,
|
|
63
63
|
resolveBrowserRuntimeAssets
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-TXDHVV6B.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-
|
|
75
|
+
} from "./chunk-53ROKKGU.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-
|
|
239
|
+
} from "./chunk-BXUGUGWL.js";
|
|
240
240
|
import {
|
|
241
241
|
_await,
|
|
242
242
|
bounded,
|
|
@@ -71384,20 +71384,27 @@ var RuntimeProjectWorkspaceTerminalSession = class {
|
|
|
71384
71384
|
signalCharacter === "" ? "SIGINT" : "SIGQUIT"
|
|
71385
71385
|
);
|
|
71386
71386
|
}
|
|
71387
|
-
const
|
|
71387
|
+
const routed = this.options.terminalInputRouter?.write(data);
|
|
71388
|
+
const route = routed === "rejected" && this.activeStdinPipe !== null ? "legacy" : routed ?? (this.activeStdinPipe !== null ? "legacy" : "rejected");
|
|
71388
71389
|
if (route === "legacy") {
|
|
71389
|
-
this.activeStdinPipe
|
|
71390
|
+
if (!this.activeStdinPipe) return false;
|
|
71391
|
+
try {
|
|
71392
|
+
this.activeStdinPipe.write(data);
|
|
71393
|
+
} catch {
|
|
71394
|
+
return false;
|
|
71395
|
+
}
|
|
71390
71396
|
}
|
|
71391
71397
|
const accepted = route !== "rejected";
|
|
71392
71398
|
if (accepted && this.currentInputState.mode === "stdin") {
|
|
71393
71399
|
this.activeStdinPrompt = "";
|
|
71394
|
-
this.setInputState("
|
|
71400
|
+
this.setInputState("stdin", "stdin-submit", "");
|
|
71395
71401
|
}
|
|
71396
71402
|
return accepted;
|
|
71397
71403
|
}
|
|
71398
71404
|
endStdin() {
|
|
71399
71405
|
if (!this.activeRun || this.activeStdinEnded) return false;
|
|
71400
|
-
const
|
|
71406
|
+
const routed = this.options.terminalInputRouter?.end();
|
|
71407
|
+
const route = routed === "rejected" && this.activeStdinPipe !== null ? "legacy" : routed ?? (this.activeStdinPipe !== null ? "legacy" : "rejected");
|
|
71401
71408
|
if (route === "rejected") return false;
|
|
71402
71409
|
this.activeStdinEnded = true;
|
|
71403
71410
|
if (route === "legacy") {
|
|
@@ -71436,6 +71443,14 @@ var RuntimeProjectWorkspaceTerminalSession = class {
|
|
|
71436
71443
|
this.emitTerminalEvent(reason);
|
|
71437
71444
|
return this.currentInputState;
|
|
71438
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
|
+
}
|
|
71439
71454
|
async run(command, options = {}) {
|
|
71440
71455
|
const trimmed = command.trim();
|
|
71441
71456
|
if (!trimmed) return { stdout: "", stderr: "", exitCode: 0 };
|
|
@@ -71490,7 +71505,7 @@ var RuntimeProjectWorkspaceTerminalSession = class {
|
|
|
71490
71505
|
this.activeTerminalEventHandler = options.onTerminalEvent;
|
|
71491
71506
|
this.activeStdinPrompt = "";
|
|
71492
71507
|
this.activeCommand = submittedCommand;
|
|
71493
|
-
this.
|
|
71508
|
+
this.showForegroundInputLine();
|
|
71494
71509
|
try {
|
|
71495
71510
|
let stdout = "";
|
|
71496
71511
|
let stderr = "";
|
|
@@ -71519,6 +71534,7 @@ var RuntimeProjectWorkspaceTerminalSession = class {
|
|
|
71519
71534
|
...error ? { error } : {}
|
|
71520
71535
|
};
|
|
71521
71536
|
} finally {
|
|
71537
|
+
this.options.terminalInputRouter?.reset();
|
|
71522
71538
|
ownedStdinPipe?.close();
|
|
71523
71539
|
this.activeStdinPipe = previousStdinPipe;
|
|
71524
71540
|
this.activeStdinEnded = previousStdinEnded;
|
|
@@ -71557,7 +71573,7 @@ var RuntimeProjectWorkspaceTerminalSession = class {
|
|
|
71557
71573
|
this.activeStdinPrompt = "";
|
|
71558
71574
|
this.activeCommand = trimmed;
|
|
71559
71575
|
this.activeCommandAbortController = commandAbortController;
|
|
71560
|
-
this.
|
|
71576
|
+
this.showForegroundInputLine();
|
|
71561
71577
|
try {
|
|
71562
71578
|
const result = await this.runForegroundTerminalCommand(
|
|
71563
71579
|
trimmed,
|
|
@@ -71568,6 +71584,7 @@ var RuntimeProjectWorkspaceTerminalSession = class {
|
|
|
71568
71584
|
return result;
|
|
71569
71585
|
} finally {
|
|
71570
71586
|
options.signal?.removeEventListener("abort", forwardExternalAbort);
|
|
71587
|
+
this.options.terminalInputRouter?.reset();
|
|
71571
71588
|
ownedStdinPipe?.close();
|
|
71572
71589
|
this.activeStdinPipe = previousStdinPipe;
|
|
71573
71590
|
this.activeStdinEnded = previousStdinEnded;
|
|
@@ -77195,21 +77212,26 @@ function createWorkspaceRuntimeRunnerBridge(bridge) {
|
|
|
77195
77212
|
...requestWithoutLegacyStdin
|
|
77196
77213
|
} = request;
|
|
77197
77214
|
const activeStdinPipe = request.source !== "compile" && request.source !== "stdin" ? commandContext?.stdinPipe : void 0;
|
|
77215
|
+
const consumesLiveStdin = request.source !== "compile" && request.source !== "stdin";
|
|
77198
77216
|
const stdinPipe = request.stdinPipe ?? activeStdinPipe;
|
|
77199
|
-
const processBinding = commandContext ? bridge.bindProcess(
|
|
77217
|
+
const processBinding = commandContext ? bridge.bindProcess(
|
|
77218
|
+
commandContext,
|
|
77219
|
+
descriptorStdio,
|
|
77220
|
+
consumesLiveStdin
|
|
77221
|
+
) : {};
|
|
77200
77222
|
const signal = processBinding.signal ?? request.signal;
|
|
77201
77223
|
const runtimeIo = commandContext?.runtimeIo;
|
|
77202
77224
|
let acceptingRunnerEvents = true;
|
|
77203
77225
|
let result;
|
|
77204
77226
|
const kernelSyscalls = options.kernelSyscalls ? bridge.createKernelSyscallBridge(commandContext) : void 0;
|
|
77205
|
-
if (descriptorStdio && commandContext) {
|
|
77227
|
+
if (descriptorStdio && commandContext && consumesLiveStdin) {
|
|
77206
77228
|
bridge.startHostStandardInputPump(commandContext);
|
|
77207
77229
|
}
|
|
77208
77230
|
try {
|
|
77209
|
-
|
|
77210
|
-
...descriptorStdio ? requestWithoutLegacyStdin : request,
|
|
77231
|
+
const execution = runner({
|
|
77232
|
+
...descriptorStdio || !consumesLiveStdin ? requestWithoutLegacyStdin : request,
|
|
77211
77233
|
...processBinding.process ? { process: processBinding.process } : {},
|
|
77212
|
-
...stdinPipe && !descriptorStdio ? { stdinPipe: { buffer: stdinPipe.buffer } } : {},
|
|
77234
|
+
...stdinPipe && !descriptorStdio && consumesLiveStdin ? { stdinPipe: { buffer: stdinPipe.buffer } } : {},
|
|
77213
77235
|
...commandContext?.terminal ? { terminal: commandContext.terminal } : {},
|
|
77214
77236
|
...commandContext?.engineLease ? { engineLease: commandContext.engineLease } : {},
|
|
77215
77237
|
...signal ? { signal } : {},
|
|
@@ -77221,6 +77243,8 @@ function createWorkspaceRuntimeRunnerBridge(bridge) {
|
|
|
77221
77243
|
bridge.handleRuntimeCommandEvent(event, commandContext);
|
|
77222
77244
|
}
|
|
77223
77245
|
});
|
|
77246
|
+
await processBinding.replayStartupInput?.();
|
|
77247
|
+
result = await execution;
|
|
77224
77248
|
} finally {
|
|
77225
77249
|
acceptingRunnerEvents = false;
|
|
77226
77250
|
kernelSyscalls?.close();
|
|
@@ -78098,6 +78122,7 @@ function createRuntimeWorkspaceShellCommands(options) {
|
|
|
78098
78122
|
var PRINCIPAL_ACTOR2 = runtimeWorkspaceActorPreset("principal");
|
|
78099
78123
|
var RUNTIME_ACTOR = runtimeWorkspaceActorPreset("runtime");
|
|
78100
78124
|
var SYSTEM_ACTOR2 = runtimeWorkspaceActorPreset("system");
|
|
78125
|
+
var TERMINAL_STARTUP_INPUT_MAX_BYTES = 64 * 1024 - 1;
|
|
78101
78126
|
var TRACEKERNEL_SYSCALL_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
78102
78127
|
"E2BIG",
|
|
78103
78128
|
"EAGAIN",
|
|
@@ -78231,6 +78256,7 @@ var RuntimeProjectWorkspace = class {
|
|
|
78231
78256
|
processState = new WorkspaceProcessState();
|
|
78232
78257
|
terminalShells = /* @__PURE__ */ new Map();
|
|
78233
78258
|
terminalResourceIds = /* @__PURE__ */ new Map();
|
|
78259
|
+
pendingTerminalStartupInput = /* @__PURE__ */ new Map();
|
|
78234
78260
|
processProjection;
|
|
78235
78261
|
// Temporary 0.13 introspection aliases. The process state module remains
|
|
78236
78262
|
// authoritative; these preserve existing hardening probes while 0.14 moves
|
|
@@ -78412,17 +78438,24 @@ var RuntimeProjectWorkspace = class {
|
|
|
78412
78438
|
});
|
|
78413
78439
|
const withEvents = createWorkspaceRuntimeRunnerBridge({
|
|
78414
78440
|
resolveCommandContext: (context) => this.resolveCommandContext(context),
|
|
78415
|
-
bindProcess: (context, descriptorStdio) => {
|
|
78441
|
+
bindProcess: (context, descriptorStdio, consumesLiveStdin) => {
|
|
78416
78442
|
const executionHandle = this.processProjection.executionHandle(
|
|
78417
78443
|
context.process
|
|
78418
78444
|
);
|
|
78419
78445
|
if (executionHandle) {
|
|
78420
78446
|
executionHandle.descriptorStdio = descriptorStdio;
|
|
78447
|
+
executionHandle.consumesLiveStdin = consumesLiveStdin;
|
|
78421
78448
|
}
|
|
78422
78449
|
const processSnapshot = this.processProjection.authoritativeSnapshot(
|
|
78423
78450
|
context.process
|
|
78424
78451
|
);
|
|
78425
78452
|
return {
|
|
78453
|
+
replayStartupInput: () => this.resolvePendingTerminalStartupInput(
|
|
78454
|
+
context.process.pid,
|
|
78455
|
+
descriptorStdio,
|
|
78456
|
+
context.stdinPipe,
|
|
78457
|
+
consumesLiveStdin
|
|
78458
|
+
),
|
|
78426
78459
|
...executionHandle?.abortController?.signal ? { signal: executionHandle.abortController.signal } : {},
|
|
78427
78460
|
...executionHandle?.signalChannel ? { kernelSignals: executionHandle.signalChannel } : {},
|
|
78428
78461
|
...processSnapshot ? {
|
|
@@ -80970,24 +81003,106 @@ var RuntimeProjectWorkspace = class {
|
|
|
80970
81003
|
)
|
|
80971
81004
|
);
|
|
80972
81005
|
}
|
|
80973
|
-
kernelTerminalInputRoute(terminal) {
|
|
81006
|
+
kernelTerminalInputRoute(terminalSessionId, terminal) {
|
|
80974
81007
|
const hasDescriptorConsumer = this.traceKernelAuthority?.session.processSnapshots().some(
|
|
80975
|
-
(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
|
|
80976
81009
|
) === true;
|
|
80977
|
-
|
|
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;
|
|
80978
81037
|
}
|
|
80979
|
-
|
|
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
|
+
}
|
|
80980
81064
|
const authority = this.traceKernelAuthority;
|
|
80981
81065
|
const terminalId = this.terminalResourceIds.get(terminalSessionId);
|
|
80982
81066
|
const terminal = terminalId === void 0 ? void 0 : authority?.session.terminalSnapshots().find(
|
|
80983
81067
|
(candidate) => candidate.id === terminalId
|
|
80984
81068
|
);
|
|
80985
|
-
if (!authority || !terminal || terminal.closed) return
|
|
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) {
|
|
80986
81088
|
const signalByte = new TextEncoder().encode(data).find(
|
|
80987
81089
|
(byte) => byte === 3 || byte === 28
|
|
80988
81090
|
);
|
|
80989
|
-
|
|
80990
|
-
|
|
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";
|
|
80991
81106
|
}
|
|
80992
81107
|
if (signalByte !== void 0) {
|
|
80993
81108
|
const signal = signalByte === 3 ? "SIGINT" : "SIGQUIT";
|
|
@@ -81017,8 +81132,16 @@ var RuntimeProjectWorkspace = class {
|
|
|
81017
81132
|
const terminal = terminalId === void 0 ? void 0 : authority?.session.terminalSnapshots().find(
|
|
81018
81133
|
(candidate) => candidate.id === terminalId
|
|
81019
81134
|
);
|
|
81020
|
-
if (!authority || !terminal || terminal.closed)
|
|
81021
|
-
|
|
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";
|
|
81022
81145
|
runFork(
|
|
81023
81146
|
authority.session.sendTerminalInputEof(terminal.id).pipe(
|
|
81024
81147
|
catchAll(() => _void)
|
|
@@ -82172,6 +82295,10 @@ usage: tracekernelctl {status|reset|verbose [on|off|status]|kill <pid> [signal]|
|
|
|
82172
82295
|
executionHandle.signalChannel?.close();
|
|
82173
82296
|
this.processState.executionHandles.delete(process3.pid);
|
|
82174
82297
|
if (options.terminalSessionId && this.processState.terminalForeground.get(options.terminalSessionId) === process3.pid) {
|
|
82298
|
+
this.discardPendingTerminalStartupInput(
|
|
82299
|
+
options.terminalSessionId,
|
|
82300
|
+
process3.pid
|
|
82301
|
+
);
|
|
82175
82302
|
this.processState.terminalForeground.delete(options.terminalSessionId);
|
|
82176
82303
|
}
|
|
82177
82304
|
clearKernelSignalHandler();
|
|
@@ -82426,6 +82553,10 @@ usage: tracekernelctl {status|reset|verbose [on|off|status]|kill <pid> [signal]|
|
|
|
82426
82553
|
executionHandle.signalChannel?.close();
|
|
82427
82554
|
this.processState.executionHandles.delete(process3.pid);
|
|
82428
82555
|
if (options.terminalSessionId && this.processState.terminalForeground.get(options.terminalSessionId) === process3.pid) {
|
|
82556
|
+
this.discardPendingTerminalStartupInput(
|
|
82557
|
+
options.terminalSessionId,
|
|
82558
|
+
process3.pid
|
|
82559
|
+
);
|
|
82429
82560
|
this.processState.terminalForeground.delete(options.terminalSessionId);
|
|
82430
82561
|
}
|
|
82431
82562
|
this.observeKernelReparentedChildren(process3.pid);
|
|
@@ -82732,6 +82863,7 @@ usage: tracekernelctl {status|reset|verbose [on|off|status]|kill <pid> [signal]|
|
|
|
82732
82863
|
const shellPromise = this.terminalShells.get(terminalSessionId);
|
|
82733
82864
|
this.terminalShells.delete(terminalSessionId);
|
|
82734
82865
|
this.terminalResourceIds.delete(terminalSessionId);
|
|
82866
|
+
this.pendingTerminalStartupInput.delete(terminalSessionId);
|
|
82735
82867
|
if (!shellPromise) return;
|
|
82736
82868
|
const disposal = shellPromise.then(async (shell) => {
|
|
82737
82869
|
const authority = this.traceKernelAuthority;
|
|
@@ -82786,7 +82918,8 @@ usage: tracekernelctl {status|reset|verbose [on|off|status]|kill <pid> [signal]|
|
|
|
82786
82918
|
signalForeground: (signal) => this.signalTerminalForeground(terminalSessionId, signal),
|
|
82787
82919
|
terminalInputRouter: {
|
|
82788
82920
|
write: (data) => this.writeKernelTerminalInput(terminalSessionId, data),
|
|
82789
|
-
end: () => this.endKernelTerminalInput(terminalSessionId)
|
|
82921
|
+
end: () => this.endKernelTerminalInput(terminalSessionId),
|
|
82922
|
+
reset: () => this.discardPendingTerminalStartupInput(terminalSessionId)
|
|
82790
82923
|
},
|
|
82791
82924
|
resizeTerminal: (columns, rows) => this.resizeKernelTerminal(terminalSessionId, columns, rows),
|
|
82792
82925
|
closeTerminal: () => this.closeTerminalShell(terminalSessionId),
|
|
@@ -82900,13 +83033,14 @@ usage: tracekernelctl {status|reset|verbose [on|off|status]|kill <pid> [signal]|
|
|
|
82900
83033
|
const descriptorStdio = this.cppRunner.capabilities?.descriptorStdio === true;
|
|
82901
83034
|
if (executionHandle) {
|
|
82902
83035
|
executionHandle.descriptorStdio = descriptorStdio;
|
|
83036
|
+
executionHandle.consumesLiveStdin = true;
|
|
82903
83037
|
}
|
|
82904
83038
|
if (descriptorStdio) {
|
|
82905
83039
|
this.startHostStandardInputPump(request.commandContext);
|
|
82906
83040
|
}
|
|
82907
83041
|
let result;
|
|
82908
83042
|
try {
|
|
82909
|
-
|
|
83043
|
+
const execution = this.cppRunner({
|
|
82910
83044
|
code: "",
|
|
82911
83045
|
source: "run",
|
|
82912
83046
|
scriptPath,
|
|
@@ -82931,6 +83065,12 @@ usage: tracekernelctl {status|reset|verbose [on|off|status]|kill <pid> [signal]|
|
|
|
82931
83065
|
this.handleRuntimeCommandEvent(event, request.commandContext);
|
|
82932
83066
|
}
|
|
82933
83067
|
});
|
|
83068
|
+
await this.resolvePendingTerminalStartupInput(
|
|
83069
|
+
request.commandContext.process.pid,
|
|
83070
|
+
descriptorStdio,
|
|
83071
|
+
request.stdinPipe
|
|
83072
|
+
);
|
|
83073
|
+
result = await execution;
|
|
82934
83074
|
} finally {
|
|
82935
83075
|
kernelSyscalls?.close();
|
|
82936
83076
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tracecode/harness",
|
|
3
|
-
"version": "0.16.
|
|
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/tracekernel": "^0.16.2",
|
|
69
|
-
"@tracecode/runtime-contracts": "^0.16.2"
|
|
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
|
+
}
|
package/runtime-assets.lock.json
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"schema": "tracecode.runtime-assets-lock.v1",
|
|
3
3
|
"harness": {
|
|
4
4
|
"name": "@tracecode/harness",
|
|
5
|
-
"version": "0.16.
|
|
6
|
-
"releaseId": "@tracecode/harness@0.16.
|
|
5
|
+
"version": "0.16.3",
|
|
6
|
+
"releaseId": "@tracecode/harness@0.16.3+sha256.d18992b4747d0a65e03c2b103bc38051f14c78cf543e7fe94faf05b9ce98120c"
|
|
7
7
|
},
|
|
8
8
|
"treeSha256Algorithm": "sha256-path-nul-bytes-nul-v1",
|
|
9
|
-
"packageTreeSha256": "
|
|
9
|
+
"packageTreeSha256": "d18992b4747d0a65e03c2b103bc38051f14c78cf543e7fe94faf05b9ce98120c",
|
|
10
10
|
"totalPackagedRuntimeBytes": 151629893,
|
|
11
11
|
"components": {
|
|
12
12
|
"cpp": {
|
|
@@ -1837,15 +1837,15 @@
|
|
|
1837
1837
|
]
|
|
1838
1838
|
},
|
|
1839
1839
|
"javascript": {
|
|
1840
|
-
"releaseId": "javascript+sha256.
|
|
1841
|
-
"treeSha256": "
|
|
1840
|
+
"releaseId": "javascript+sha256.f4e5d679cae01f08ba4327ffbd7f4bcfcb685bb5b70cfb3b0b4b063e2f46cb26",
|
|
1841
|
+
"treeSha256": "f4e5d679cae01f08ba4327ffbd7f4bcfcb685bb5b70cfb3b0b4b063e2f46cb26",
|
|
1842
1842
|
"totalBytes": 1202891,
|
|
1843
1843
|
"files": [
|
|
1844
1844
|
{
|
|
1845
1845
|
"path": "workers/javascript/javascript-project-worker.js",
|
|
1846
1846
|
"size": 561093,
|
|
1847
|
-
"sha256": "
|
|
1848
|
-
"integrity": "sha256-
|
|
1847
|
+
"sha256": "570de947fe170a1dd1d778514577827ede5edbef1ddf08c01f3500834e93ce6b",
|
|
1848
|
+
"integrity": "sha256-Vw3pR/4XCh3R13hRRXeCft5e2+8d3wjAHzUAg06Tzms=",
|
|
1849
1849
|
"mediaType": "text/javascript"
|
|
1850
1850
|
},
|
|
1851
1851
|
{
|