@deepseek-ai/dsh-experimental-webworker-runtime 0.2.1-alpha.1 → 0.2.1-alpha.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/README.i18n.yaml CHANGED
@@ -15,8 +15,8 @@
15
15
  en: 4e53164159b5ce41
16
16
  zh: 89582dc0294d0776
17
17
  /deepseek-ai-dsh-experimental-webworker-runtime/use-this-package:
18
- en: 6dd3d8495bc6ee61
19
- zh: 71f7da310233a37b
18
+ en: aed3c07b75b29e34
19
+ zh: b609ae0f5796aa34
20
20
  /deepseek-ai-dsh-experimental-webworker-runtime/model-experience:
21
21
  en: 61fce9b4c7dc96e6
22
22
  zh: dc2d931063a38327
@@ -24,8 +24,8 @@
24
24
  en: ca75c51c89c2c9b0
25
25
  zh: 64715dc7e6d02f71
26
26
  /deepseek-ai-dsh-experimental-webworker-runtime/known-limitations-and-deferred-work:
27
- en: dd2469d07c86127a
28
- zh: efa1be38e57bdd1e
27
+ en: 7a473e73cc9449f9
28
+ zh: 2752c65ef3a33463
29
29
  /deepseek-ai-dsh-experimental-webworker-runtime/known-limitations-and-deferred-work/dev-note:
30
30
  en: e67f633dc6fe7773
31
31
  zh: e88aeb617ffb74ea
package/README.md CHANGED
@@ -32,7 +32,7 @@ Three build artifacts and one source-owned process layer:
32
32
  - **`src/shell/` (the worker's own process layer)** — a browser worker cannot fork, so `node:child_process` is not a stub but an implementation: `spawn` starts the command in its own Web Worker — this same bundle, told by its first frame to be a shell process — and reports it through the `ChildProcess` surface the subprocess service consumes. The command runs off the host's thread, `SIGKILL` terminates it whatever it is doing, and it reaches the VFS only by message (the host serves those frames). Worker platform executables preserve native-package protocols such as Landlock without replacing their JavaScript packages or coupling their implementations to `node:child_process`; `xdg-open` sends one VFS text file to the page's read-only viewer, so desktop-opener actions such as **Open configuration file** show the file in the page; ordinary commands use the package's evaluator and coreutils command table. The grammar is `@yarnpkg/parsers`' `parseShell`, while `execSync`/`fork` still refuse because they need a real process.
33
33
  - **`lib/client.js` (page half)** — startup has two independent stages. `chooseWorkerHostSource({ image?, fixtureManifest? })` optionally owns the boot barrier and fixture manifest: without `preview-fixture` it waits at the source chooser, while a valid query selects directly; either path returns ordered overlays. `connectWorkerHost(worker, { image?, overlays? })` remains the public base-runtime connector; callers that skip the chooser get an empty overlay list. `apps/web` invokes both and supplies its statically bundled Worker. The opening `init` frame carries the base and ordered overlay URLs, the boot payload delivers the structured index-injection table, and `applyIndexInjections` executes it before the shell entry runs. Script preload rows are advisory and skipped because `/plugins` resources resolve only through the tunnel; `loadBundle` fetches each combo on first demand, embeds its tunnel-only source map as a Base64 data URL, and executes the script as a Blob. The worker's unsolicited `view-text` frame opens the page's modal text viewer. The tunnel also exposes fetch-shaped transport, the independent file-upload carrier, and the API client. Request frames preserve Blob bodies through structured clone and transfer `ReadableStream<Uint8Array>` ownership. The Host Worker streams both forms into the route, so neither browser thread creates a complete byte array for a generic-file upload. A Remote stream's uplink crosses as `stream-uplink-item` / `stream-uplink-end` frames into an unbounded `TunnelUplink` that drops items arriving after `end`: the page and its worker are one trusted same-origin boundary, so the Host inbox cap does not apply.
34
34
 
35
- Acceptance lives in `apps/web/tests/preview-boot.e2e.ts`, which serves the real built pages and drives the pre-boot chooser plus Worker activation in headless Chromium. The empty selection exercises first-run startup. The `vfs-example` overlay supplies ordinary workspace files and plaintext persistence artifacts for cold Workspace/Session discovery, tool presentation, subagent navigation, and history paging without a model request. The [packer](../webworker-packer/README.md) prepares current-generation successors from committed historical logs in Node; those source logs remain byte-identical in the overlay. The fixture generator owns the acceptance test's current projection cache. The chooser reserves WebFS as a separate user-authorized source; that provider does not read the built-in fixture.
35
+ Acceptance lives in `apps/web/tests/preview-boot.e2e.ts`, which serves the real built pages and drives the pre-boot chooser plus Worker activation in headless Chromium. The empty selection exercises first-run startup. The `vfs-example` overlay supplies ordinary workspace files and plaintext persistence artifacts for cold Workspace/Session discovery, tool presentation, subagent navigation, and history paging without a model request. The showcase mixes empty, whitespace-only, and non-empty reasoning with a long multiline command and a parent-path file link; these are authored fixtures, not live model output. The [packer](../webworker-packer/README.md) prepares current-generation successors from committed historical logs in Node; those source logs remain byte-identical in the overlay. The fixture generator owns the acceptance test's current projection cache. The chooser reserves WebFS as a separate user-authorized source; that provider does not read the built-in fixture.
36
36
 
37
37
  The [built-bundle import sweep](tests/compile/transform-corpus-check.ts) checks bare Node imports after the library build. Its Dockkit exception accepts Node’s unknown-`.css`-extension refusal for any stylesheet rather than one pinned path; another extension, error code, or message, and an unexpectedly successful exempt import, remain errors.
38
38
 
@@ -54,8 +54,10 @@ None; this package neither assembles nor sends a provider request.
54
54
  - **The worker composition writes plaintext session logs** (`compression: 'none'` boot patch): it carries no Zstandard codec, so exported logs are `.jsonl`, never `.jsonl.zstd`.
55
55
  - **`node:dns/promises`, `node:vm`, `node:net`, `node:sqlite`, `node:worker_threads` are structural stubs**: every call reports its refusal on the console and throws. Rows needing native DNS, a real process, or realm isolation cannot run here.
56
56
  - **`node:assert/strict` supports truthiness assertions only**: for falsy values, the callable default and `ok` throw `ERR_ASSERTION` with the supplied message or generic text, or rethrow a supplied Error unchanged. Other assertion APIs are absent.
57
+ - **Native TLS listeners require a Node Host**: the worker's `node:https.createServer` rejects activation rather than substituting plaintext. The preview's internal HTTP tunnel does not bind sockets; browser-facing HTTPS belongs to its deployment server.
57
58
  - **Desktop product telemetry is unavailable**: `got.post` reports an explicit worker-host refusal. Got and its Node HTTP dependencies are excluded from the browser image; Desktop reporting remains disabled in the preview composition.
58
59
  - **Host package commands are unavailable**: `execa` reports an explicit worker-host refusal; the preview cannot run pnpm, install plugins, or install native dependencies.
60
+ - **pi-ai model requests are unavailable**: the replacement exposes a fixed subset of installed provider identifiers with no models, allowing the adapter to register configuration metadata. Its identifiers must stay valid when pi-ai is upgraded; inference entry points report an explicit worker-host refusal.
59
61
  - **PTC Node programs are unavailable**: the process shim exposes `/dsh/bin/node` as its executable identity so the provider can activate, but the Worker has neither a Node executable nor `stripTypeScriptTypes`. Program execution fails before launching a child.
60
62
  - **Office conversion requires a Node Host**: the LibreOffice kit replacement rejects converter creation with `unavailable`. The browser image excludes the kit and its engine dependencies; the Office preview reports that conversion is unavailable.
61
63
  - **Filesystem watchers observe only the mounted VFS**: image seeding is silent and the VFS has no symlinks or external writers. `persistent`, `ref()`, and `unref()` preserve the Node API but cannot control a dedicated Worker's lifetime because browsers expose no ref-counted event loop.
package/README.zh.md CHANGED
@@ -32,7 +32,7 @@ kind: "package-library"
32
32
  - **`src/shell/`(worker 自己的进程层)**——浏览器 worker 无法 fork,所以 `node:child_process` 不是 stub 而是实现:`spawn` 把命令放进它自己的 Web Worker——就是这同一个束,由首帧告诉它「你是 shell 进程」——并以 subprocess 服务消费的 `ChildProcess` 面报告结果。命令不占宿主线程,`SIGKILL` 不管它在干什么都能终止它,而它只能靠消息触达 VFS(由宿主应答这些帧)。Worker 平台 executable 在不替换 JavaScript 包、也不把具体实现耦合进 `node:child_process` 的情况下保持 Landlock 等 native 包协议;`xdg-open` 把一个 VFS 文本文件交给页面的只读查看器,因此 **打开配置文件** 等桌面打开操作会在页面内显示该文件;普通命令使用本包的求值器与 coreutils 命令表。语法来自 `@yarnpkg/parsers` 的 `parseShell`,而 `execSync`/`fork` 依然拒绝,因为它们需要真进程。
33
33
  - **`lib/client.js`(页面半)**——启动分为相互独立的两段。`chooseWorkerHostSource({ image?, fixtureManifest? })` 可选地拥有 boot barrier 与 fixture manifest:没有 `preview-fixture` 时停在来源选择面板,合法 query 则直接选择;两条路径都返回按序排列的 overlays。`connectWorkerHost(worker, { image?, overlays? })` 仍是公开的基础运行态连接器;调用方跳过选择器时 overlay 列表为空。`apps/web` 调用这两段并提供静态打包的 Worker。开局 `init` 帧携带基础镜像与按序排列的 overlay URL,boot 载荷送达结构化 index 注入表,`applyIndexInjections` 在壳入口运行前逐行执行。脚本 preload 行只是提示,因此会被跳过:`/plugins` 资源只能经 tunnel 解析,`loadBundle` 会在首次需要时获取 combo、把仅 tunnel 可达的 sourcemap 内嵌为 Base64 data URL,再以 Blob 执行脚本。worker 主动发出的 `view-text` 帧会打开页面的模态文本查看器。Tunnel 还暴露 fetch 形式的传输、独立文件上传载体和 API 客户端。请求帧通过结构化克隆保留 Blob 请求体,并转移 `ReadableStream<Uint8Array>` 的所有权。Host Worker 将两种请求体都逐块送入路由,因此通用文件上传不会在任何浏览器线程创建完整字节数组。Remote 流的上行以 `stream-uplink-item` / `stream-uplink-end` 帧进入没有上限的 `TunnelUplink`,`end` 之后到达的项被丢弃:页面与其 worker 是同一个可信的同源边界,Host 的 inbox 上限在此不适用。
34
34
 
35
- 验收在 `apps/web/tests/preview-boot.e2e.ts`:静态服务真实构建页面,在 headless Chromium 里驱动 pre-boot 选择面板与 Worker 激活。空白选择验证首次启动;`vfs-example` overlay 提供普通 workspace 文件与明文 persistence 产物,无需模型请求即可验证 Workspace/Session 冷发现、工具呈现、subagent 导航和历史分页。[打包器](../webworker-packer/README.zh.md)在 Node 中根据已提交的历史日志准备当前代后继文件;这些源日志在 overlay 中逐字节保持不变。fixture 生成器负责验收测试的当前投影缓存。选择面板为 WebFS 保留独立的用户授权来源;该 provider 不读取内置 fixture。
35
+ 验收在 `apps/web/tests/preview-boot.e2e.ts`:静态服务真实构建页面,在 headless Chromium 里驱动 pre-boot 选择面板与 Worker 激活。空白选择验证首次启动;`vfs-example` overlay 提供普通 workspace 文件与明文 persistence 产物,无需模型请求即可验证 Workspace/Session 冷发现、工具呈现、subagent 导航和历史分页。showcase 混排空字符串、纯空白与非空推理块,并包含多行长命令和父路径文件链接;这些是人工构造的 fixture,不是真实模型输出。[打包器](../webworker-packer/README.zh.md)在 Node 中根据已提交的历史日志准备当前代后继文件;这些源日志在 overlay 中逐字节保持不变。fixture 生成器负责验收测试的当前投影缓存。选择面板为 WebFS 保留独立的用户授权来源;该 provider 不读取内置 fixture。
36
36
 
37
37
  [已构建 bundle 导入检查](tests/compile/transform-corpus-check.ts)在库构建后检查裸 Node 导入。Dockkit 例外接受 Node 针对任意样式表报告的未知 `.css` 扩展名错误,而不限定某一固定路径;其他扩展名、错误码或消息,以及意外成功的豁免导入,仍然报错。
38
38
 
@@ -54,8 +54,10 @@ kind: "package-library"
54
54
  - **worker 组合写明文会话日志**(`compression: 'none'` boot patch):不带 Zstandard 编解码器,导出日志是 `.jsonl`,不会是 `.jsonl.zstd`。
55
55
  - **`node:dns/promises`、`node:vm`、`node:net`、`node:sqlite`、`node:worker_threads` 是结构化 stub**:每次调用在 console 报告拒绝并抛出。需要原生 DNS、真进程或真 realm 隔离的行在此无法运行。
56
56
  - **`node:assert/strict` 仅支持真值断言**:对于假值,可调用的默认导出和 `ok` 使用传入的消息或通用文本抛出 `ERR_ASSERTION`,或原样抛出传入的 Error。其他断言 API 未提供。
57
+ - **原生 TLS 监听器需要 Node Host**:worker 的 `node:https.createServer` 会拒绝激活,不会替换成明文。预览内部的 HTTP 隧道不绑定套接字;面向浏览器的 HTTPS 由部署服务器提供。
57
58
  - **桌面产品埋点不可用**:`got.post` 明确报告 worker host 不支持该调用。浏览器镜像不包含 Got 及其 Node HTTP 依赖;预览组合不启用桌面上报。
58
59
  - **宿主包管理命令不可用**:`execa` 明确报告 worker host 不支持该调用;预览无法运行 pnpm、安装插件或安装原生依赖。
60
+ - **pi-ai 模型请求不可用**:替代实现暴露已安装提供方标识的固定子集,不包含模型,使适配器能够注册配置元数据。升级 pi-ai 时必须保持这些标识有效;推理入口明确报告 worker host 不支持该调用。
59
61
  - **PTC Node 程序不可用**:process shim 用 `/dsh/bin/node` 表示可执行文件身份,使 provider 能够激活,但 Worker 既没有 Node 可执行文件,也没有 `stripTypeScriptTypes`。程序执行会在启动子进程前失败。
60
62
  - **Office 转换需要 Node Host**:LibreOffice kit 的替代模块以 `unavailable` 拒绝创建转换器。浏览器镜像排除 kit 及其引擎依赖;Office 预览提示转换不可用。
61
63
  - **文件 watcher 只能观察已挂载的 VFS**:镜像 seed 不产生事件,VFS 也没有符号链接或外部写入方。`persistent`、`ref()` 和 `unref()` 保留 Node API,但浏览器没有引用计数事件循环,因此这些接口不能控制 dedicated Worker 的生存期。
package/lib/index.js CHANGED
@@ -732,6 +732,7 @@ const MODULE_PROXIES = {
732
732
  "tty": "./node/builtin_modules/implemented/tty.ts",
733
733
  "node:zlib": "./node/builtin_modules/implemented/zlib.ts",
734
734
  "node:child_process": "./node/builtin_modules/implemented/child_process.ts",
735
+ "node:https": "./node/builtin_modules/mock/https.ts",
735
736
  "node:dns/promises": "./node/builtin_modules/mock/dns/promises.ts",
736
737
  "dns/promises": "./node/builtin_modules/mock/dns/promises.ts",
737
738
  "node:net": "./node/builtin_modules/mock/net.ts",
@@ -3428,10 +3429,11 @@ function createWorkerHost(options) {
3428
3429
  const handler = connection.createSharedFetchHandler("/api");
3429
3430
  const usage = loader.usage();
3430
3431
  console.info(`webworker host: tree active (modules=${String(usage.modules)}, data overlays=${String(overlays.length)}, direct lane=connection.createSharedFetchHandler, als causality=${options.alsCausality === void 0 ? "inert" : "snapshot/restore"}, image lowering=${LOWERING_VERSION})`);
3432
+ const peer = connection.browserPeer;
3431
3433
  tunnel.serve({
3432
- directFetch: (request) => handler.fetch(request),
3434
+ directFetch: (request) => handler.fetch(request, peer),
3433
3435
  bootPayload: () => readBootPayload(ctx),
3434
- openStream: (endpoint, payload, uplink, signal) => typertGateway.wireStream.open(endpoint, payload, uplink, void 0, signal),
3436
+ openStream: (endpoint, payload, uplink, signal) => typertGateway.wireStream.open(endpoint, payload, uplink, peer, signal),
3435
3437
  streamFailure: typertGateway.wireStream.failure
3436
3438
  });
3437
3439
  started.resolve();
@@ -48,8 +48,7 @@ export declare function availableParallelism(): number;
48
48
  export declare function cpus(): CpuInfo[];
49
49
  /**
50
50
  * Network interfaces.
51
- * @returns an empty record — the worker webserver binds the loopback literal, so
52
- * no LAN address is ever derived.
51
+ * @returns an empty record — a worker has no view of the host's network.
53
52
  */
54
53
  export declare function networkInterfaces(): NodeJS.Dict<NetworkInterfaceInfo[]>;
55
54
  /** OS constants: only the signal table is read (terminal signal name mapping). */
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Reject native TLS instead of serving plaintext for an HTTPS configuration.
3
+ * @returns Never; a browser worker cannot bind a TLS socket.
4
+ */
5
+ export declare function createServer(): never;
6
+ /** CommonJS interop marker for the worker module loader. */
7
+ export declare const __esModule = true;
8
+ /** CommonJS exports for the worker's explicit TLS-listener refusal. */
9
+ declare const _default: {
10
+ createServer: typeof createServer;
11
+ };
12
+ export default _default;
13
+ //# sourceMappingURL=https.d.ts.map
@@ -6,26 +6,27 @@ export declare const createModels: (...args: never[]) => never;
6
6
  export declare const getSupportedThinkingLevels: (...args: never[]) => never;
7
7
  /** Context-overflow predicate (unavailable). */
8
8
  export declare const isContextOverflow: (...args: never[]) => never;
9
+ /** Collection of every builtin provider (unavailable). */
10
+ export declare const builtinModels: (...args: never[]) => never;
9
11
  /**
10
- * Installed catalog providers, read while `llm-pi-ai` activates. Each carries the
11
- * api-key auth marker the adapter filters on, and no models: the provider
12
- * directory therefore matches the served deployment while every request path
13
- * lands on a loud symbol above.
12
+ * Installed catalog providers, read while `llm-pi-ai` activates. `llm-pi-ai`
13
+ * registers the whole catalog as configurable the moment it mounts and rejects
14
+ * an empty registration, so these carry pi-ai's ids instead of being an empty
15
+ * list. Each has the api-key auth marker the adapter filters on, and no
16
+ * models, so every request path lands on a loud symbol above.
14
17
  * @returns one entry per builtin provider.
15
18
  */
16
19
  export declare function builtinProviders(): unknown[];
17
- /**
18
- * Provider route ids of the installed catalog. `llm-pi-ai` registers the whole
19
- * catalog as configurable the moment it mounts and rejects an empty
20
- * registration, so these are pi-ai's real ids rather than an empty list.
21
- * @returns the builtin provider ids.
22
- */
23
- export declare function getBuiltinProviders(): string[];
24
20
  /**
25
21
  * Models of one installed catalog provider.
26
22
  * @returns no models.
27
23
  */
28
24
  export declare function getBuiltinModels(): unknown[];
25
+ /**
26
+ * Models of every type of one installed catalog provider.
27
+ * @returns no models.
28
+ */
29
+ export declare function getAllBuiltinModels(): unknown[];
29
30
  /** Anthropic messages API binding (unavailable). */
30
31
  export declare const anthropicMessagesApi: (...args: never[]) => never;
31
32
  /** OpenAI completions API binding (unavailable). */
@@ -40,9 +41,10 @@ declare const _default: {
40
41
  createModels: (...args: never[]) => never;
41
42
  getSupportedThinkingLevels: (...args: never[]) => never;
42
43
  isContextOverflow: (...args: never[]) => never;
44
+ builtinModels: (...args: never[]) => never;
43
45
  builtinProviders: typeof builtinProviders;
44
46
  getBuiltinModels: typeof getBuiltinModels;
45
- getBuiltinProviders: typeof getBuiltinProviders;
47
+ getAllBuiltinModels: typeof getAllBuiltinModels;
46
48
  anthropicMessagesApi: (...args: never[]) => never;
47
49
  openAICompletionsApi: (...args: never[]) => never;
48
50
  openAIResponsesApi: (...args: never[]) => never;
@@ -84,8 +84,7 @@ export interface WorkerHostOptions {
84
84
  readonly configPath?: string;
85
85
  /**
86
86
  * Inner arguments the tree parses. The default binds the web server to the
87
- * loopback authority the tunnel synthesizes, which also keeps
88
- * `networkInterfaces()` out of the trust snapshot.
87
+ * loopback authority the tunnel synthesizes.
89
88
  */
90
89
  readonly cmdlineArgs?: readonly string[];
91
90
  /** Port named on the default command line; defaults to {@link DEFAULT_PORT}. */
package/lib/worker.js CHANGED
@@ -2709,10 +2709,11 @@ function createWorkerHost(options) {
2709
2709
  const handler = connection.createSharedFetchHandler("/api");
2710
2710
  const usage = loader.usage();
2711
2711
  console.info(`webworker host: tree active (modules=${String(usage.modules)}, data overlays=${String(overlays.length)}, direct lane=connection.createSharedFetchHandler, als causality=${options.alsCausality === void 0 ? "inert" : "snapshot/restore"}, image lowering=${LOWERING_VERSION})`);
2712
+ const peer = connection.browserPeer;
2712
2713
  tunnel.serve({
2713
- directFetch: (request) => handler.fetch(request),
2714
+ directFetch: (request) => handler.fetch(request, peer),
2714
2715
  bootPayload: () => readBootPayload(ctx),
2715
- openStream: (endpoint, payload, uplink, signal) => typertGateway.wireStream.open(endpoint, payload, uplink, void 0, signal),
2716
+ openStream: (endpoint, payload, uplink, signal) => typertGateway.wireStream.open(endpoint, payload, uplink, peer, signal),
2716
2717
  streamFailure: typertGateway.wireStream.failure
2717
2718
  });
2718
2719
  started.resolve();
@@ -4825,7 +4826,7 @@ function ok(value, message) {
4825
4826
  /** Callable truthiness assertion with the identical `ok` method; other assertion APIs are absent. */
4826
4827
  const assert = Object.assign(ok, { ok });
4827
4828
  //#endregion
4828
- //#region ../../../node_modules/.pnpm/@noble+hashes@2.3.0/node_modules/@noble/hashes/_u64.js
4829
+ //#region ../../../node_modules/.pnpm/@noble+hashes@2.4.0/node_modules/@noble/hashes/_u64.js
4829
4830
  const U32_MASK64 = /* @__PURE__ */ (() => BigInt(2 ** 32 - 1))();
4830
4831
  const _32n = /* @__PURE__ */ BigInt(32);
4831
4832
  function fromBig(n, le = false) {
@@ -4876,7 +4877,7 @@ const add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) |
4876
4877
  const add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);
4877
4878
  const add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;
4878
4879
  //#endregion
4879
- //#region ../../../node_modules/.pnpm/@noble+hashes@2.3.0/node_modules/@noble/hashes/utils.js
4880
+ //#region ../../../node_modules/.pnpm/@noble+hashes@2.4.0/node_modules/@noble/hashes/utils.js
4880
4881
  /**
4881
4882
  * Checks if something is Uint8Array. Be careful: nodejs Buffer will return true.
4882
4883
  * @param a - value to test
@@ -4936,6 +4937,12 @@ function abytes(value, length, title = "") {
4936
4937
  const aobject = (value, label) => {
4937
4938
  if (value === null || typeof value !== "object" || Array.isArray(value)) throw new TypeError((label === "object" ? "" : `"${label}" `) + "expected object, got type=" + typeof value);
4938
4939
  };
4940
+ const aopts = (value, label) => {
4941
+ aobject(value, label);
4942
+ const proto = Object.getPrototypeOf(value);
4943
+ if (proto !== Object.prototype && proto !== null) throw new TypeError(`"${label}" expected plain object`);
4944
+ if (Object.hasOwn(value, "__proto__")) throw new TypeError(`"${label}.__proto__" is not allowed`);
4945
+ };
4939
4946
  /**
4940
4947
  * Asserts a hash instance has not been destroyed or finished.
4941
4948
  * @param instance - hash instance to validate
@@ -5033,7 +5040,7 @@ function rotl(word, shift) {
5033
5040
  * @param defaults - base option object
5034
5041
  * @param opts - user overrides
5035
5042
  * @param title - label included in thrown override errors
5036
- * @returns Merged option object. The merge mutates `defaults` in place.
5043
+ * @returns Fresh merged option object with a null prototype.
5037
5044
  * @throws On wrong argument types. {@link TypeError}
5038
5045
  * @example
5039
5046
  * Merge user overrides onto default options.
@@ -5042,9 +5049,9 @@ function rotl(word, shift) {
5042
5049
  * ```
5043
5050
  */
5044
5051
  function checkOpts(defaults, opts, title = "opts") {
5045
- aobject(defaults, "defaults");
5046
- if (opts !== void 0) aobject(opts, title);
5047
- return Object.assign(defaults, opts);
5052
+ aopts(defaults, "defaults");
5053
+ if (opts !== void 0) aopts(opts, title);
5054
+ return Object.assign(Object.create(null), defaults, opts);
5048
5055
  }
5049
5056
  /**
5050
5057
  * Creates a callable hash function from a stateful class constructor.
@@ -5102,7 +5109,7 @@ const oidNist = (suffix) => ({ oid: Uint8Array.from([
5102
5109
  suffix
5103
5110
  ]) });
5104
5111
  //#endregion
5105
- //#region ../../../node_modules/.pnpm/@noble+hashes@2.3.0/node_modules/@noble/hashes/_md.js
5112
+ //#region ../../../node_modules/.pnpm/@noble+hashes@2.4.0/node_modules/@noble/hashes/_md.js
5106
5113
  /**
5107
5114
  * Internal Merkle-Damgard hash utils.
5108
5115
  * @module
@@ -5288,7 +5295,7 @@ const SHA512_IV = /* @__PURE__ */ Uint32Array.from([
5288
5295
  327033209
5289
5296
  ]);
5290
5297
  //#endregion
5291
- //#region ../../../node_modules/.pnpm/@noble+hashes@2.3.0/node_modules/@noble/hashes/legacy.js
5298
+ //#region ../../../node_modules/.pnpm/@noble+hashes@2.4.0/node_modules/@noble/hashes/legacy.js
5292
5299
  /**
5293
5300
 
5294
5301
  SHA1 (RFC 3174), MD5 (RFC 1321), and RIPEMD160 legacy, weak hash functions.
@@ -5396,7 +5403,7 @@ var _SHA1 = class extends HashMD {
5396
5403
  */
5397
5404
  const sha1 = /* @__PURE__ */ createHasher(() => new _SHA1());
5398
5405
  //#endregion
5399
- //#region ../../../node_modules/.pnpm/@noble+hashes@2.3.0/node_modules/@noble/hashes/sha2.js
5406
+ //#region ../../../node_modules/.pnpm/@noble+hashes@2.4.0/node_modules/@noble/hashes/sha2.js
5400
5407
  /**
5401
5408
  * SHA2 hash function. A.k.a. sha256, sha384, sha512, sha512_224, sha512_256.
5402
5409
  * SHA256 is the fastest hash implementable in JS, even faster than Blake3.
@@ -12824,7 +12831,7 @@ var http_exports = /* @__PURE__ */ __exportAll({
12824
12831
  Server: () => FakeServer,
12825
12832
  ServerResponse: () => ServerResponse,
12826
12833
  __esModule: () => true,
12827
- createServer: () => createServer$1,
12834
+ createServer: () => createServer$2,
12828
12835
  default: () => http_default,
12829
12836
  get: () => get,
12830
12837
  request: () => request,
@@ -12934,7 +12941,7 @@ var ServerResponse = class {};
12934
12941
  * @param listener - the request listener the webserver installs.
12935
12942
  * @returns the fake Server.
12936
12943
  */
12937
- function createServer$1(listener) {
12944
+ function createServer$2(listener) {
12938
12945
  if (listener !== void 0) {
12939
12946
  captured = listener;
12940
12947
  for (const resolve of waiting) resolve(listener);
@@ -12973,7 +12980,7 @@ const STATUS_CODES = {
12973
12980
  };
12974
12981
  /** CommonJS default export: the members `require()` hands a caller of this module. */
12975
12982
  var http_default = {
12976
- createServer: createServer$1,
12983
+ createServer: createServer$2,
12977
12984
  request,
12978
12985
  get,
12979
12986
  STATUS_CODES,
@@ -12981,6 +12988,23 @@ var http_default = {
12981
12988
  ServerResponse
12982
12989
  };
12983
12990
  //#endregion
12991
+ //#region src/node/builtin_modules/mock/https.ts
12992
+ /** Native TLS listeners are unavailable in a browser worker's HTTP tunnel. */
12993
+ var https_exports = /* @__PURE__ */ __exportAll({
12994
+ __esModule: () => true,
12995
+ createServer: () => createServer$1,
12996
+ default: () => https_default
12997
+ });
12998
+ /**
12999
+ * Reject native TLS instead of serving plaintext for an HTTPS configuration.
13000
+ * @returns Never; a browser worker cannot bind a TLS socket.
13001
+ */
13002
+ function createServer$1() {
13003
+ throw notAvailableError("node:https", "createServer");
13004
+ }
13005
+ /** CommonJS exports for the worker's explicit TLS-listener refusal. */
13006
+ var https_default = { createServer: createServer$1 };
13007
+ //#endregion
12984
13008
  //#region src/node/builtin_modules/implemented/module.ts
12985
13009
  /**
12986
13010
  * `node:module` for the worker: `createRequire` hands out the worker module
@@ -13150,8 +13174,7 @@ function cpus() {
13150
13174
  }
13151
13175
  /**
13152
13176
  * Network interfaces.
13153
- * @returns an empty record — the worker webserver binds the loopback literal, so
13154
- * no LAN address is ever derived.
13177
+ * @returns an empty record — a worker has no view of the host's network.
13155
13178
  */
13156
13179
  function networkInterfaces() {
13157
13180
  return {};
@@ -16951,7 +16974,7 @@ var require_shell = /* @__PURE__ */ __commonJSMin(((exports) => {
16951
16974
  ]);
16952
16975
  }));
16953
16976
  //#endregion
16954
- //#region ../../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/constants.js
16977
+ //#region ../../../node_modules/.pnpm/picomatch@4.0.7/node_modules/picomatch/lib/constants.js
16955
16978
  var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16956
16979
  const WIN_SLASH = "\\\\/";
16957
16980
  const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
@@ -17120,7 +17143,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17120
17143
  };
17121
17144
  }));
17122
17145
  //#endregion
17123
- //#region ../../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/utils.js
17146
+ //#region ../../../node_modules/.pnpm/picomatch@4.0.7/node_modules/picomatch/lib/utils.js
17124
17147
  var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
17125
17148
  const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants();
17126
17149
  exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
@@ -17168,7 +17191,7 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
17168
17191
  };
17169
17192
  }));
17170
17193
  //#endregion
17171
- //#region ../../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/scan.js
17194
+ //#region ../../../node_modules/.pnpm/picomatch@4.0.7/node_modules/picomatch/lib/scan.js
17172
17195
  var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17173
17196
  const utils = require_utils();
17174
17197
  const { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = require_constants();
@@ -17197,7 +17220,7 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17197
17220
  const scan = (input, options) => {
17198
17221
  const opts = options || {};
17199
17222
  const length = input.length - 1;
17200
- const scanToEnd = opts.parts === true || opts.scanToEnd === true;
17223
+ const scanToEnd = opts.parts === true || opts.tokens === true || opts.scanToEnd === true;
17201
17224
  const slashes = [];
17202
17225
  const tokens = [];
17203
17226
  const parts = [];
@@ -17300,14 +17323,18 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17300
17323
  finished = true;
17301
17324
  if (code === CHAR_EXCLAMATION_MARK && index === start) negatedExtglob = true;
17302
17325
  if (scanToEnd === true) {
17326
+ let parens = 0;
17303
17327
  while (eos() !== true && (code = advance())) {
17304
17328
  if (code === CHAR_BACKWARD_SLASH) {
17305
17329
  backslashes = token.backslashes = true;
17306
- code = advance();
17330
+ advance();
17307
17331
  continue;
17308
17332
  }
17309
- if (code === CHAR_RIGHT_PARENTHESES) {
17310
- isGlob = token.isGlob = true;
17333
+ if (code === CHAR_LEFT_PARENTHESES) {
17334
+ parens++;
17335
+ continue;
17336
+ }
17337
+ if (code === CHAR_RIGHT_PARENTHESES && --parens === 0) {
17311
17338
  finished = true;
17312
17339
  break;
17313
17340
  }
@@ -17355,13 +17382,18 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17355
17382
  if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
17356
17383
  isGlob = token.isGlob = true;
17357
17384
  if (scanToEnd === true) {
17385
+ let parens = 1;
17358
17386
  while (eos() !== true && (code = advance())) {
17359
- if (code === CHAR_LEFT_PARENTHESES) {
17387
+ if (code === CHAR_BACKWARD_SLASH) {
17360
17388
  backslashes = token.backslashes = true;
17361
- code = advance();
17389
+ advance();
17362
17390
  continue;
17363
17391
  }
17364
- if (code === CHAR_RIGHT_PARENTHESES) {
17392
+ if (code === CHAR_LEFT_PARENTHESES) {
17393
+ parens++;
17394
+ continue;
17395
+ }
17396
+ if (code === CHAR_RIGHT_PARENTHESES && --parens === 0) {
17365
17397
  finished = true;
17366
17398
  break;
17367
17399
  }
@@ -17424,7 +17456,7 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17424
17456
  if (opts.parts === true || opts.tokens === true) {
17425
17457
  let prevIndex;
17426
17458
  for (let idx = 0; idx < slashes.length; idx++) {
17427
- const n = prevIndex ? prevIndex + 1 : start;
17459
+ const n = prevIndex !== void 0 ? prevIndex + 1 : start;
17428
17460
  const i = slashes[idx];
17429
17461
  const value = input.slice(n, i);
17430
17462
  if (opts.tokens) {
@@ -17435,18 +17467,19 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17435
17467
  depth(tokens[idx]);
17436
17468
  state.maxDepth += tokens[idx].depth;
17437
17469
  }
17438
- if (idx !== 0 || value !== "") parts.push(value);
17439
- prevIndex = i;
17440
- }
17441
- if (prevIndex && prevIndex + 1 < input.length) {
17442
- const value = input.slice(prevIndex + 1);
17443
- parts.push(value);
17444
- if (opts.tokens) {
17445
- tokens[tokens.length - 1].value = value;
17446
- depth(tokens[tokens.length - 1]);
17447
- state.maxDepth += tokens[tokens.length - 1].depth;
17470
+ if (i >= start) {
17471
+ parts.push(value);
17472
+ prevIndex = i;
17448
17473
  }
17449
17474
  }
17475
+ const n = prevIndex !== void 0 ? prevIndex + 1 : start;
17476
+ const value = input.slice(n);
17477
+ parts.push(value);
17478
+ if (opts.tokens && prevIndex && prevIndex + 1 < input.length) {
17479
+ tokens[tokens.length - 1].value = value;
17480
+ depth(tokens[tokens.length - 1]);
17481
+ state.maxDepth += tokens[tokens.length - 1].depth;
17482
+ }
17450
17483
  state.slashes = slashes;
17451
17484
  state.parts = parts;
17452
17485
  }
@@ -17455,7 +17488,7 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17455
17488
  module.exports = scan;
17456
17489
  }));
17457
17490
  //#endregion
17458
- //#region ../../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/parse.js
17491
+ //#region ../../../node_modules/.pnpm/picomatch@4.0.7/node_modules/picomatch/lib/parse.js
17459
17492
  var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17460
17493
  const constants = require_constants();
17461
17494
  const utils = require_utils();
@@ -17610,7 +17643,10 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17610
17643
  }
17611
17644
  }
17612
17645
  };
17613
- const getStarExtglobSequenceOutput = (pattern) => {
17646
+ const buildCharClassStar = (chars) => {
17647
+ return `${chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`}*`;
17648
+ };
17649
+ const getStarExtglobSequenceChars = (pattern) => {
17614
17650
  let index = 0;
17615
17651
  const chars = [];
17616
17652
  while (index < pattern.length) {
@@ -17624,7 +17660,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17624
17660
  index += match.end + 1;
17625
17661
  }
17626
17662
  if (chars.length < 1) return;
17627
- return `${chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`}*`;
17663
+ return chars;
17628
17664
  };
17629
17665
  const repeatedExtglobRecursion = (pattern) => {
17630
17666
  let depth = 0;
@@ -17644,14 +17680,28 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17644
17680
  if (branches.length > 1) {
17645
17681
  if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) return { risky: true };
17646
17682
  }
17683
+ const safeChars = [];
17684
+ let sawStarSequence = false;
17685
+ let combinable = true;
17647
17686
  for (const branch of branches) {
17648
- const safeOutput = getStarExtglobSequenceOutput(branch);
17649
- if (safeOutput) return {
17650
- risky: true,
17651
- safeOutput
17652
- };
17687
+ const chars = getStarExtglobSequenceChars(branch);
17688
+ if (chars) {
17689
+ sawStarSequence = true;
17690
+ safeChars.push(...chars);
17691
+ continue;
17692
+ }
17693
+ const literal = normalizeSimpleBranch(branch);
17694
+ if (literal && literal.length === 1) {
17695
+ safeChars.push(literal);
17696
+ continue;
17697
+ }
17698
+ combinable = false;
17653
17699
  if (repeatedExtglobRecursion(branch) > max) return { risky: true };
17654
17700
  }
17701
+ if (sawStarSequence) return combinable ? {
17702
+ risky: true,
17703
+ safeOutput: buildCharClassStar([...new Set(safeChars)])
17704
+ } : { risky: true };
17655
17705
  return { risky: false };
17656
17706
  };
17657
17707
  /**
@@ -18336,6 +18386,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18336
18386
  rest = rest.slice(3);
18337
18387
  consume("/**", 3);
18338
18388
  }
18389
+ const isEnd = eos() || state.parens > 0 && rest === ")".repeat(state.parens) && !extglobs.some((extglob) => extglob.type === "negate");
18339
18390
  if (prior.type === "bos" && eos()) {
18340
18391
  prev.type = "globstar";
18341
18392
  prev.value += value;
@@ -18345,7 +18396,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18345
18396
  consume(value);
18346
18397
  continue;
18347
18398
  }
18348
- if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) {
18399
+ if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && isEnd) {
18349
18400
  state.output = state.output.slice(0, -(prior.output + prev.output).length);
18350
18401
  prior.output = `(?:${prior.output}`;
18351
18402
  prev.type = "globstar";
@@ -18510,7 +18561,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18510
18561
  module.exports = parse;
18511
18562
  }));
18512
18563
  //#endregion
18513
- //#region ../../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/picomatch.js
18564
+ //#region ../../../node_modules/.pnpm/picomatch@4.0.7/node_modules/picomatch/lib/picomatch.js
18514
18565
  var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18515
18566
  const scan = require_scan();
18516
18567
  const parse = require_parse();
@@ -18531,6 +18582,18 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18531
18582
  * const isMatch = picomatch('*.!(*a)');
18532
18583
  * console.log(isMatch('a.a')); //=> false
18533
18584
  * console.log(isMatch('a.b')); //=> true
18585
+ *
18586
+ * // For environments without `node.js`, `picomatch/posix` provides you a dependency-free matcher, without automatic OS detection.
18587
+ * const picomatch = require('picomatch/posix');
18588
+ * // the same API, defaulting to posix paths
18589
+ * const isMatch = picomatch('a/*');
18590
+ * console.log(isMatch('a\\b')); //=> false
18591
+ * console.log(isMatch('a/b')); //=> true
18592
+ *
18593
+ * // you can still configure the matcher function to accept windows paths
18594
+ * const isMatch = picomatch('a/*', { options: windows });
18595
+ * console.log(isMatch('a\\b')); //=> true
18596
+ * console.log(isMatch('a/b')); //=> true
18534
18597
  * ```
18535
18598
  * @name picomatch
18536
18599
  * @param {String|Array} `globs` One or more glob patterns.
@@ -18649,8 +18712,8 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18649
18712
  * @return {Boolean}
18650
18713
  * @api public
18651
18714
  */
18652
- picomatch.matchBase = (input, glob, options) => {
18653
- return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(utils.basename(input));
18715
+ picomatch.matchBase = (input, glob, options, posix = options && options.windows) => {
18716
+ return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(utils.basename(input, { windows: posix }));
18654
18717
  };
18655
18718
  /**
18656
18719
  * Returns true if **any** of the given glob `patterns` match the specified `string`.
@@ -18810,7 +18873,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18810
18873
  module.exports = picomatch;
18811
18874
  }));
18812
18875
  //#endregion
18813
- //#region ../../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/index.js
18876
+ //#region ../../../node_modules/.pnpm/picomatch@4.0.7/node_modules/picomatch/index.js
18814
18877
  var require_picomatch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18815
18878
  const pico = require_picomatch$1();
18816
18879
  const utils = require_utils();
@@ -21653,20 +21716,22 @@ const got = { post: notImplementedFail("got", "post") };
21653
21716
  * statically at module scope, so the row cannot mount without it.
21654
21717
  *
21655
21718
  * Every symbol `llm-pi-ai` imports by name is present: a missing CommonJS symbol
21656
- * would surface as `undefined` at call time instead of a link error. The three catalog readers
21657
- * return empty collections rather than throwing — the row reads them while it
21658
- * activates, and "this deployment ships no pi-ai provider" is the truth here.
21659
- * Everything on a request path is loud.
21719
+ * would surface as `undefined` at call time instead of a link error. The row
21720
+ * reads the catalog while it activates, so the provider reader returns
21721
+ * providers without models and the two model readers return empty collections
21722
+ * instead of throwing: this deployment serves no pi-ai model. Everything on a
21723
+ * request path is loud.
21660
21724
  */
21661
21725
  var pi_ai_exports = /* @__PURE__ */ __exportAll({
21662
21726
  __esModule: () => true,
21663
21727
  anthropicMessagesApi: () => anthropicMessagesApi,
21728
+ builtinModels: () => builtinModels,
21664
21729
  builtinProviders: () => builtinProviders,
21665
21730
  createModels: () => createModels,
21666
21731
  createProvider: () => createProvider,
21667
21732
  default: () => pi_ai_default,
21733
+ getAllBuiltinModels: () => getAllBuiltinModels,
21668
21734
  getBuiltinModels: () => getBuiltinModels,
21669
- getBuiltinProviders: () => getBuiltinProviders,
21670
21735
  getSupportedThinkingLevels: () => getSupportedThinkingLevels,
21671
21736
  isContextOverflow: () => isContextOverflow,
21672
21737
  openAICompletionsApi: () => openAICompletionsApi,
@@ -21681,12 +21746,17 @@ const createModels = notImplementedFail(MODULE$1, "createModels");
21681
21746
  const getSupportedThinkingLevels = notImplementedFail(MODULE$1, "getSupportedThinkingLevels");
21682
21747
  /** Context-overflow predicate (unavailable). */
21683
21748
  const isContextOverflow = notImplementedFail(MODULE$1, "isContextOverflow");
21684
- /** Builtin provider ids of pi-ai 0.84.2, in catalog order. */
21749
+ /** Collection of every builtin provider (unavailable). */
21750
+ const builtinModels = notImplementedFail(MODULE$1, "builtinModels");
21751
+ /**
21752
+ * Preview provider ids, in catalog order. This fixed subset must use valid
21753
+ * installed pi-ai identifiers so the adapter can attach authentication metadata.
21754
+ */
21685
21755
  const BUILTIN_PROVIDER_IDS = [
21686
21756
  "amazon-bedrock",
21687
21757
  "ant-ling",
21688
21758
  "anthropic",
21689
- "azure-openai-responses",
21759
+ "azure",
21690
21760
  "baseten",
21691
21761
  "cerebras",
21692
21762
  "cloudflare-ai-gateway",
@@ -21724,10 +21794,11 @@ const BUILTIN_PROVIDER_IDS = [
21724
21794
  "zai-coding-cn"
21725
21795
  ];
21726
21796
  /**
21727
- * Installed catalog providers, read while `llm-pi-ai` activates. Each carries the
21728
- * api-key auth marker the adapter filters on, and no models: the provider
21729
- * directory therefore matches the served deployment while every request path
21730
- * lands on a loud symbol above.
21797
+ * Installed catalog providers, read while `llm-pi-ai` activates. `llm-pi-ai`
21798
+ * registers the whole catalog as configurable the moment it mounts and rejects
21799
+ * an empty registration, so these carry pi-ai's ids instead of being an empty
21800
+ * list. Each has the api-key auth marker the adapter filters on, and no
21801
+ * models, so every request path lands on a loud symbol above.
21731
21802
  * @returns one entry per builtin provider.
21732
21803
  */
21733
21804
  function builtinProviders() {
@@ -21739,19 +21810,17 @@ function builtinProviders() {
21739
21810
  }));
21740
21811
  }
21741
21812
  /**
21742
- * Provider route ids of the installed catalog. `llm-pi-ai` registers the whole
21743
- * catalog as configurable the moment it mounts and rejects an empty
21744
- * registration, so these are pi-ai's real ids rather than an empty list.
21745
- * @returns the builtin provider ids.
21813
+ * Models of one installed catalog provider.
21814
+ * @returns no models.
21746
21815
  */
21747
- function getBuiltinProviders() {
21748
- return [...BUILTIN_PROVIDER_IDS];
21816
+ function getBuiltinModels() {
21817
+ return [];
21749
21818
  }
21750
21819
  /**
21751
- * Models of one installed catalog provider.
21820
+ * Models of every type of one installed catalog provider.
21752
21821
  * @returns no models.
21753
21822
  */
21754
- function getBuiltinModels() {
21823
+ function getAllBuiltinModels() {
21755
21824
  return [];
21756
21825
  }
21757
21826
  /** Anthropic messages API binding (unavailable). */
@@ -21766,9 +21835,10 @@ var pi_ai_default = {
21766
21835
  createModels,
21767
21836
  getSupportedThinkingLevels,
21768
21837
  isContextOverflow,
21838
+ builtinModels,
21769
21839
  builtinProviders,
21770
21840
  getBuiltinModels,
21771
- getBuiltinProviders,
21841
+ getAllBuiltinModels,
21772
21842
  anthropicMessagesApi,
21773
21843
  openAICompletionsApi,
21774
21844
  openAIResponsesApi
@@ -21915,6 +21985,7 @@ const BUILTINS = {
21915
21985
  fs: () => fs_exports,
21916
21986
  "fs/promises": () => promises_exports$2,
21917
21987
  http: () => http_exports,
21988
+ https: () => https_exports,
21918
21989
  module: () => module_exports,
21919
21990
  net: () => net_exports,
21920
21991
  os: () => os_exports,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-experimental-webworker-runtime",
3
3
  "description": "Browser-only harness runtime: in-memory VFS, module transform and loader, postMessage tunnel, and the dedicated Web Worker assembly, with the Node-compatibility layer that lets the host tree run unchanged",
4
- "version": "0.2.1-alpha.1",
4
+ "version": "0.2.1-alpha.3",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -28,43 +28,43 @@
28
28
  },
29
29
  "license": "MIT",
30
30
  "dependencies": {
31
- "@noble/hashes": "^2.3.0",
31
+ "@deepseek-ai/dsh-util-crypto": "0.2.1-alpha.3",
32
+ "@noble/hashes": "^2.4.0",
32
33
  "@yarnpkg/parsers": "^3.1.0",
33
- "acorn": "^8.17.0",
34
+ "acorn": "^8.18.0",
34
35
  "buffer": "^6.0.3",
35
- "picomatch": "^4.0.4",
36
+ "picomatch": "^4.0.7",
36
37
  "readable-stream": "^4.7.0",
37
- "@deepseek-ai/dsh-util-crypto": "0.2.1-alpha.1",
38
- "@deepseek-ai/dsh-client-web": "0.2.1-alpha.1"
38
+ "@deepseek-ai/dsh-client-web": "0.2.1-alpha.3"
39
39
  },
40
40
  "peerDependencies": {
41
- "@deepseek-ai/cordis-plugin-loader": "~1.0.6-alpha.1",
42
- "@deepseek-ai/cordis": "~4.0.5-alpha.1",
43
- "@deepseek-ai/dsh-client-connection": "0.2.1-alpha.1",
44
- "@deepseek-ai/dsh-client-modules": "0.2.1-alpha.1",
45
- "@deepseek-ai/dsh-host-webserver": "0.2.1-alpha.1"
41
+ "@deepseek-ai/cordis": "~4.0.5-alpha.2",
42
+ "@deepseek-ai/cordis-plugin-loader": "~1.0.6-alpha.2",
43
+ "@deepseek-ai/dsh-client-connection": "0.2.1-alpha.3",
44
+ "@deepseek-ai/dsh-client-modules": "0.2.1-alpha.3",
45
+ "@deepseek-ai/dsh-host-webserver": "0.2.1-alpha.3"
46
46
  },
47
47
  "devDependencies": {
48
- "@types/picomatch": "^3.0.2",
48
+ "@deepseek-ai/cordis": "~4.0.5-alpha.2",
49
+ "@deepseek-ai/cordis-plugin-loader": "~1.0.6-alpha.2",
50
+ "@deepseek-ai/dsh-api-gateway": "0.2.1-alpha.3",
51
+ "@deepseek-ai/dsh-app-boot": "0.2.1-alpha.3",
52
+ "@deepseek-ai/dsh-bash-sandbox": "0.2.1-alpha.3",
53
+ "@deepseek-ai/dsh-client-connection": "0.2.1-alpha.3",
54
+ "@deepseek-ai/dsh-client-file-upload": "0.2.1-alpha.3",
55
+ "@deepseek-ai/dsh-client-modules": "0.2.1-alpha.3",
56
+ "@deepseek-ai/dsh-host-webserver": "0.2.1-alpha.3",
57
+ "@deepseek-ai/dsh-sandbox-local": "0.2.1-alpha.3",
58
+ "@deepseek-ai/dsh-sandbox-policy": "0.2.1-alpha.3",
59
+ "@deepseek-ai/dsh-session": "0.2.1-alpha.3",
60
+ "@deepseek-ai/dsh-session-projection": "0.2.1-alpha.3",
61
+ "@deepseek-ai/dsh-session-persistence-jsonl": "0.2.1-alpha.3",
62
+ "@deepseek-ai/dsh-subagent": "0.2.1-alpha.3",
63
+ "@deepseek-ai/dsh-subprocess-local": "0.2.1-alpha.3",
64
+ "@deepseek-ai/node-addon-system": "~0.1.2",
65
+ "@types/picomatch": "^4.0.3",
49
66
  "@types/readable-stream": "^4.0.24",
50
- "chokidar": "^5.0.0",
51
- "@deepseek-ai/cordis": "~4.0.5-alpha.1",
52
- "@deepseek-ai/cordis-plugin-loader": "~1.0.6-alpha.1",
53
- "@deepseek-ai/dsh-api-gateway": "0.2.1-alpha.1",
54
- "@deepseek-ai/dsh-app-boot": "0.2.1-alpha.1",
55
- "@deepseek-ai/dsh-client-connection": "0.2.1-alpha.1",
56
- "@deepseek-ai/dsh-client-file-upload": "0.2.1-alpha.1",
57
- "@deepseek-ai/dsh-client-modules": "0.2.1-alpha.1",
58
- "@deepseek-ai/dsh-sandbox-local": "0.2.1-alpha.1",
59
- "@deepseek-ai/dsh-host-webserver": "0.2.1-alpha.1",
60
- "@deepseek-ai/dsh-sandbox-policy": "0.2.1-alpha.1",
61
- "@deepseek-ai/dsh-bash-sandbox": "0.2.1-alpha.1",
62
- "@deepseek-ai/dsh-session": "0.2.1-alpha.1",
63
- "@deepseek-ai/dsh-session-projection": "0.2.1-alpha.1",
64
- "@deepseek-ai/dsh-session-persistence-jsonl": "0.2.1-alpha.1",
65
- "@deepseek-ai/dsh-subagent": "0.2.1-alpha.1",
66
- "@deepseek-ai/dsh-subprocess-local": "0.2.1-alpha.1",
67
- "@deepseek-ai/node-addon-system": "~0.1.2"
67
+ "chokidar": "5.0.0"
68
68
  },
69
69
  "files": [
70
70
  "lib/index.js",