Files
deepseek-harness/packages/experimental/webworker-runtime/src/index.ts
T
imccyu 93d2ad2d25 feat(webworker): boot the preview from the shipped profile and fetch lazy chunks on demand
The packer images the web template bundles, every optional bundle, and an installation manifest instead of a dumped composition, and the Worker boots that profile through app-boot like dsh web. Package-local lazy client chunks move into content-addressed archives that the VFS fetches on first asynchronous read; client-modules reads chunks asynchronously.

The Worker replaces node-addon-require-builtin with Node v24.18.0 internal-module interfaces and reports Node 24, so plugin metadata, the Cordis Loader, and HMR reach one cascaded loader backed by the Worker loader. Resolution failures carry Node error codes, the empty load cache lets HMR apply profile changes, and every optional bundle switches on and off live. Platform stubs throw ERR_FEATURE_UNAVAILABLE_ON_PLATFORM.
2026-10-15 11:30:45 +08:00

56 lines
2.9 KiB
TypeScript

/**
* Browser-only host runtime: the harness Cordis tree inside a dedicated Web Worker.
* @module @deepseek-ai/dsh-experimental-webworker-runtime
*/
export {
createAlsRuntime,
type AlsCausality, type AlsRuntime, type AlsSnapshot, type AlsToken,
} from './polyfill/async-context/als-runtime.ts'
export {
parseInboundFrame,
type TunnelAbortFrame, type TunnelInboundFrame, type TunnelOutboundFrame, type TunnelRequestFrame,
type TunnelRequestId, type TunnelResponseChunkFrame, type TunnelResponseEndFrame,
type TunnelResponseErrorFrame, type TunnelResponseFrame, type TunnelResponseHeadFrame,
type TunnelStreamEndFrame, type TunnelStreamErrorFrame, type TunnelStreamUplinkEndFrame,
type TunnelStreamUplinkItemFrame, type TunnelStreamItemFrame, type TunnelStreamOpenFrame,
} from './transport/frames.ts'
export {
DEFAULT_CONDITIONS, requireActiveModuleLoader, setActiveModuleLoader, WorkerModuleLoader,
type Resolution, type StaticModuleFactory, type WorkerModuleLoaderOptions, type WorkerRequire,
} from './module-system/module-loader.ts'
export * as posixPath from './module-system/posix-path.ts'
export { MODULE_PROXIES, MODULE_PROXY_PREFIXES } from './module-proxies.ts'
export { REPLACED_EXTERNAL_PACKAGES } from './node/external_packages/replaced-externals.ts'
export {
createSyntheticExchange,
type RequestListener, type ResponseSink, type SyntheticExchange,
} from './transport/synthetic-http.ts'
export { lowerModuleSource, type LoweredModule } from './compile/transform.ts'
export {
API_PREFIX, SYNTHETIC_HOST, TunnelServer,
type TunnelPort, type TunnelSeams, type TunnelServerOptions,
} from './transport/tunnel.ts'
export { installProcessGlobal, type ProcessShim, type ProcessShimOptions } from './node/globals/process.ts'
export {
createWorkerHost, type WorkerHost, type WorkerHostOptions,
} from './worker-host.ts'
export {
DEFAULT_ROOT, IMAGE_EMPTY_DIRECTORIES, IMAGE_FILE_NAME, IMAGE_HOME_DIRECTORY, IMAGE_LAZY_DIRECTORY,
IMAGE_MANIFEST_PATH, IMAGE_OVERLAY_DIRECTORIES, LOWERING_VERSION, PLATFORM_ENTRY_CONFIG, WRAPPER_PARAMS,
} from './image-layout.ts'
export {
parseImageManifest, type ImageLazyArchive, type ImageLazyFile, type ImageManifest,
} from './image-manifest.ts'
export {
parsePreviewFixtureManifest, PREVIEW_FIXTURE_MANIFEST_FILE, PREVIEW_FIXTURE_MANIFEST_VERSION,
type PreviewFixtureManifest, type PreviewFixtureManifestEntry,
} from './fixture-manifest.ts'
export { loadVfsImage, loadVfsOverlay, MemoryVfs } from './storage/memory.ts'
export { inflateImage, inflateImageStream } from './storage/image-gzip.ts'
export { packTar, parseTar, type TarEntry } from './storage/tar.ts'
export { requireActiveVfs, setActiveVfs } from './storage/active.ts'
export {
type VfsDeferredArchive, type VfsDeferredFile, type VfsDir, type VfsDirent, type VfsEncoding, type VfsError,
type VfsFileHandle, type VfsReadOptions, type VfsStats, type VfsWriteOptions,
} from './storage/types.ts'