better-dsh 0.2.5-e → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +27 -3
  2. package/cordis.patch.yml +44 -0
  3. package/docs/50_test-reports/2026-10-06-authentication-only-web-admission-4999.md +63 -0
  4. package/docs/50_test-reports/2026-10-07-better-dsh-welcome-self-contained-4999.md +52 -0
  5. package/docs/specs/welcome-self-contained/spec.md +13 -0
  6. package/lib/LaunchOptions-B874eBu2.js +4 -0
  7. package/lib/{LaunchOptions-DXdeJis3.js → LaunchOptions-kGXcZOe0.js} +1 -1
  8. package/lib/{bidi-CwtLGgcA.js → bidi-BalpKaJc.js} +1 -1
  9. package/lib/bundle-delivery.d.ts +20 -0
  10. package/lib/bundle-delivery.js +209 -0
  11. package/lib/client/index.js +2 -2
  12. package/lib/failover/index.js +1 -1
  13. package/lib/fs-aware/sandbox-plugin.js +4 -4
  14. package/lib/hmr.d.ts +32 -0
  15. package/lib/hmr.js +49 -0
  16. package/lib/{index-browser-Bp3vxHC3.js → index-browser-CysrjMyM.js} +4 -4
  17. package/lib/index.js +5 -5
  18. package/lib/{kernel-env-BLPZE-I3.js → kernel-env-D8UOWeji.js} +2 -2
  19. package/lib/kernel-env.js +1 -1
  20. package/lib/{lsp-server-registry-BcdkHROD.js → lsp-server-registry-BXvUTBY7.js} +1 -1
  21. package/lib/{lsp-server-registry-D4VLs1Sm.js → lsp-server-registry-CH9WNFFt.js} +1 -1
  22. package/lib/{main-BXwPLuYr.js → main-BQeFrBM1.js} +1 -1
  23. package/lib/{main-CKFNYpqT.js → main-CupOhMp5.js} +4 -4
  24. package/lib/mobile/plugin.d.ts +1 -1
  25. package/lib/mobile/plugin.js +1 -1
  26. package/lib/{puppeteer-core-Bliv_vNf.js → puppeteer-core-CSk2PtSm.js} +8 -8
  27. package/lib/remote/plugin.js +3 -3
  28. package/lib/url-schemes/index.d.ts +11 -11
  29. package/lib/url-schemes/index.js +14 -14
  30. package/lib/web-password.d.ts +7 -7
  31. package/lib/{web-trust-jR0o70JS.js → web-trust-D6gJpUMf.js} +5 -5
  32. package/lib/{web-trust-D9jFaQbH.d.ts → web-trust-Dej_RI2B.d.ts} +15 -15
  33. package/lib/web-trust.d.ts +2 -1
  34. package/lib/web-trust.js +1 -1
  35. package/lib/webserver.d.ts +10 -0
  36. package/lib/webserver.js +19 -0
  37. package/lib/welcome-notice.d.ts +18 -0
  38. package/lib/welcome-notice.js +59 -0
  39. package/lib/{wrap-kTohEeis.js → wrap-T4I0nfPM.js} +116 -116
  40. package/package.json +47 -5
  41. package/scripts/register-bundle.mjs +80 -0
  42. package/lib/LaunchOptions-3peHoOAx.js +0 -4
@@ -20792,7 +20792,7 @@ async function _connectToBiDiBrowser(connectionTransport, url, options) {
20792
20792
  const { bidiConnection, cdpConnection, closeCallback } = await getBiDiConnection(connectionTransport, url, options);
20793
20793
  return await (await import(
20794
20794
  /* webpackIgnore: true */
20795
- "./bidi-CwtLGgcA.js"
20795
+ "./bidi-BalpKaJc.js"
20796
20796
  )).BidiBrowser.create({
20797
20797
  connection: bidiConnection,
20798
20798
  cdpConnection,
@@ -20815,7 +20815,7 @@ async function _connectToBiDiBrowser(connectionTransport, url, options) {
20815
20815
  async function getBiDiConnection(connectionTransport, url, options) {
20816
20816
  const BiDi = await import(
20817
20817
  /* webpackIgnore: true */
20818
- "./bidi-CwtLGgcA.js"
20818
+ "./bidi-BalpKaJc.js"
20819
20819
  );
20820
20820
  const { slowMo = 0, protocolTimeout, idGenerator = createIncrementalIdGenerator() } = options;
20821
20821
  const pureBidiConnection = new BiDi.BidiConnection(url, connectionTransport, idGenerator, slowMo, protocolTimeout);
@@ -20887,10 +20887,10 @@ async function getConnectionTransport(options) {
20887
20887
  endpointUrl: connectionURL
20888
20888
  };
20889
20889
  } else if (options.channel && isNode) {
20890
- const { detectBrowserPlatform, resolveDefaultUserDataDir, Browser: Browser$1 } = await import("./main-BXwPLuYr.js");
20890
+ const { detectBrowserPlatform, resolveDefaultUserDataDir, Browser: Browser$1 } = await import("./main-BQeFrBM1.js");
20891
20891
  const platform = detectBrowserPlatform();
20892
20892
  if (!platform) throw new Error("Could not detect required browser platform");
20893
- const { convertPuppeteerChannelToBrowsersChannel } = await import("./LaunchOptions-3peHoOAx.js");
20893
+ const { convertPuppeteerChannelToBrowsersChannel } = await import("./LaunchOptions-B874eBu2.js");
20894
20894
  const { join } = await import("node:path");
20895
20895
  const portPath = join(resolveDefaultUserDataDir(Browser$1.CHROME, platform, convertPuppeteerChannelToBrowsersChannel(options.channel)), "DevToolsActivePort");
20896
20896
  try {
package/lib/index.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import { t as Schema } from "./lib-C8_jXvwA.js";
2
2
  import { a as RESERVED_ERROR_MEMBERS, i as RESERVED_BINDING_GLOBALS, n as DUNDER_MEMBER, o as ReplRuntime, r as PORTABLE_RESERVED_WORDS, t as isFlatBindableName } from "./py-sdk-D7klhpWb.js";
3
- import { s as resolveKernelEnv } from "./kernel-env-BLPZE-I3.js";
3
+ import { s as resolveKernelEnv } from "./kernel-env-D8UOWeji.js";
4
4
  import { t as captureAllTools } from "./native-capture-BEByDXYM.js";
5
5
  import { createRequire } from "node:module";
6
- import { Context } from "@deepseek-ai/cordis";
7
6
  import { randomBytes, randomUUID } from "node:crypto";
8
- import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
9
- import { join } from "node:path";
10
7
  import { spawn } from "node:child_process";
8
+ import { join } from "node:path";
9
+ import { fileURLToPath } from "node:url";
10
+ import { Context } from "@deepseek-ai/cordis";
11
+ import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
11
12
  import { tmpdir } from "node:os";
12
13
  import { setTimeout as setTimeout$1 } from "node:timers/promises";
13
14
  import { createInterface } from "node:readline";
14
- import { fileURLToPath } from "node:url";
15
15
  import { TOOL_RUNTIME_SCHEDULER, defineTool } from "@deepseek-ai/dsh-tools";
16
16
  import * as dshLlm from "@deepseek-ai/dsh-llm";
17
17
  import { BlockAssembler, HarnessError, createUserMessage } from "@deepseek-ai/dsh-llm";
@@ -1,7 +1,7 @@
1
- import { existsSync, mkdirSync } from "node:fs";
2
- import { dirname, join, resolve } from "node:path";
3
1
  import { execFile } from "node:child_process";
2
+ import { dirname, join, resolve } from "node:path";
4
3
  import { fileURLToPath } from "node:url";
4
+ import { existsSync, mkdirSync } from "node:fs";
5
5
  import { promisify } from "node:util";
6
6
 
7
7
  //#region src/kernel-env.ts
package/lib/kernel-env.js CHANGED
@@ -1,3 +1,3 @@
1
- import { a as PACKAGE_ROOT, c as uvInstallArgs, d as venvFallbackArgs, i as IPYKERNEL_VERSION, l as uvToolEnv, n as DEFAULT_KERNEL_PYTHON_VERSION, o as pipInstallArgs, r as DILL_VERSION, s as resolveKernelEnv, t as AUTO_PYTHON_SENTINEL, u as uvVenvArgs } from "./kernel-env-BLPZE-I3.js";
1
+ import { a as PACKAGE_ROOT, c as uvInstallArgs, d as venvFallbackArgs, i as IPYKERNEL_VERSION, l as uvToolEnv, n as DEFAULT_KERNEL_PYTHON_VERSION, o as pipInstallArgs, r as DILL_VERSION, s as resolveKernelEnv, t as AUTO_PYTHON_SENTINEL, u as uvVenvArgs } from "./kernel-env-D8UOWeji.js";
2
2
 
3
3
  export { AUTO_PYTHON_SENTINEL, DEFAULT_KERNEL_PYTHON_VERSION, DILL_VERSION, IPYKERNEL_VERSION, PACKAGE_ROOT, pipInstallArgs, resolveKernelEnv, uvInstallArgs, uvToolEnv, uvVenvArgs, venvFallbackArgs };
@@ -1,3 +1,3 @@
1
- import { a as primaryServerForFile, c as serversForFile, i as installServer, n as findWorkspaceRoot, o as resolveCommandPath, r as installHintFor, s as serverByName, t as clearCommandProbeCache } from "./lsp-server-registry-D4VLs1Sm.js";
1
+ import { a as primaryServerForFile, c as serversForFile, i as installServer, n as findWorkspaceRoot, o as resolveCommandPath, r as installHintFor, s as serverByName, t as clearCommandProbeCache } from "./lsp-server-registry-CH9WNFFt.js";
2
2
 
3
3
  export { clearCommandProbeCache, findWorkspaceRoot, installHintFor, installServer, primaryServerForFile, resolveCommandPath, serverByName, serversForFile };
@@ -1,5 +1,5 @@
1
- import { accessSync, constants, existsSync, readdirSync } from "node:fs";
2
1
  import * as path$1 from "node:path";
2
+ import { accessSync, constants, existsSync, readdirSync } from "node:fs";
3
3
 
4
4
  //#region src/devices/lsp/defaults.json
5
5
  var defaults_default = {
@@ -1,3 +1,3 @@
1
- import { _ as Browser, a as TimeoutError, b as ChromeReleaseChannel, c as computeSystemExecutablePath, d as InstalledBrowser, f as detectBrowserPlatform, g as resolveDefaultUserDataDir, h as resolveBuildId, i as Process, l as launch, m as getVersionComparator, n as uninstall, o as WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX, p as createProfile, r as CDP_WEBSOCKET_ENDPOINT_REGEX, s as computeExecutablePath, t as getInstalledBrowsers, u as Cache, v as BrowserPlatform, y as BrowserTag } from "./main-CKFNYpqT.js";
1
+ import { _ as Browser, a as TimeoutError, b as ChromeReleaseChannel, c as computeSystemExecutablePath, d as InstalledBrowser, f as detectBrowserPlatform, g as resolveDefaultUserDataDir, h as resolveBuildId, i as Process, l as launch, m as getVersionComparator, n as uninstall, o as WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX, p as createProfile, r as CDP_WEBSOCKET_ENDPOINT_REGEX, s as computeExecutablePath, t as getInstalledBrowsers, u as Cache, v as BrowserPlatform, y as BrowserTag } from "./main-CupOhMp5.js";
2
2
 
3
3
  export { Browser, BrowserPlatform, BrowserTag, CDP_WEBSOCKET_ENDPOINT_REGEX, Cache, ChromeReleaseChannel, InstalledBrowser, Process, TimeoutError, WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX, computeExecutablePath, computeSystemExecutablePath, createProfile, detectBrowserPlatform, getInstalledBrowsers, getVersionComparator, launch, resolveBuildId, resolveDefaultUserDataDir, uninstall };
@@ -1,12 +1,12 @@
1
1
  import { createHash } from "node:crypto";
2
- import fs, { accessSync, constants, existsSync, readFileSync } from "node:fs";
3
- import path from "node:path";
4
2
  import childProcess, { execFile, execSync, spawn, spawnSync } from "node:child_process";
3
+ import { mkdir, readdir, unlink } from "node:fs/promises";
4
+ import path from "node:path";
5
+ import { URL as URL$1, urlToHttpOptions } from "node:url";
6
+ import fs, { accessSync, constants, existsSync, readFileSync } from "node:fs";
5
7
  import os from "node:os";
6
8
  import readline from "node:readline";
7
- import { URL as URL$1, urlToHttpOptions } from "node:url";
8
9
  import { debuglog, promisify } from "node:util";
9
- import { mkdir, readdir, unlink } from "node:fs/promises";
10
10
  import { EventEmitter } from "node:events";
11
11
  import * as http from "node:http";
12
12
  import * as https from "node:https";
@@ -1,5 +1,5 @@
1
1
  import { t as Schema } from "../index-DTDXUe6m.js";
2
- import { r as MobileConfig } from "../web-trust-D9jFaQbH.js";
2
+ import { r as MobileConfig } from "../web-trust-Dej_RI2B.js";
3
3
  import { Context } from "@deepseek-ai/cordis";
4
4
 
5
5
  //#region src/mobile/plugin.d.ts
@@ -1,5 +1,5 @@
1
1
  import { t as Schema } from "../lib-C8_jXvwA.js";
2
- import { r as buildMobileScript } from "../web-trust-jR0o70JS.js";
2
+ import { r as buildMobileScript } from "../web-trust-D6gJpUMf.js";
3
3
  import { Context } from "@deepseek-ai/cordis";
4
4
 
5
5
  //#region src/mobile/plugin.ts
@@ -1,15 +1,15 @@
1
- import { _ as Browser$1, a as TimeoutError$1, c as computeSystemExecutablePath, f as detectBrowserPlatform, h as resolveBuildId, l as launch$1, n as uninstall, o as WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX, p as createProfile, r as CDP_WEBSOCKET_ENDPOINT_REGEX, s as computeExecutablePath, t as getInstalledBrowsers } from "./main-CKFNYpqT.js";
1
+ import { _ as Browser$1, a as TimeoutError$1, c as computeSystemExecutablePath, f as detectBrowserPlatform, h as resolveBuildId, l as launch$1, n as uninstall, o as WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX, p as createProfile, r as CDP_WEBSOCKET_ENDPOINT_REGEX, s as computeExecutablePath, t as getInstalledBrowsers } from "./main-CupOhMp5.js";
2
2
  import { C as unitToPixels, Ct as getCapturedLogs, E as paperFormats, F as bufferCount, J as fromEvent, K as firstValueFrom, M as assert, Q as map, S as timeout, St as debug, T as withSourcePuppeteerURLIfNone, Tt as environment, W as filter, Z as lastValueFrom, _ as isNumber, _t as PuppeteerError, a as UTILITY_WORLD_NAME, at as race, b as isString, bt as TouchError, c as evaluationString, d as fromEmitterEvent, dt as takeUntil, f as getReadableAsTypedArray, ft as tap, g as isDate, gt as ProtocolError, h as getSourceUrlComment, ht as ConnectionClosedError, i as SOURCE_URL_REGEX, l as filterAsync, m as getSourcePuppeteerURLIfAvailable, mt as timer, n as NETWORK_IDLE_TIME, o as debugCatchError, p as getReadableFromProtocolStream, q as from, r as PuppeteerURL, s as debugError, t as DEFAULT_VIEWPORT, u as fromAbortSignal, v as isPlainObject, vt as TargetCloseError, w as validateDialogType, wt as setLogCapture, x as parsePDFOptions, xt as UnsupportedOperation, y as isRegExp, yt as TimeoutError, z as concatMap } from "./util-BHL_dfV_.js";
3
- import { $ as pageBindingInitString, $n as Deferred, $t as scriptInjector, A as NetworkManager, An as guarded, At as DEFAULT_INTERCEPT_RESOLUTION_PRIORITY, B as MAIN_WORLD, Bn as AsyncDisposableStack, Bt as throwIfDetached, C as WebMCPToolCall, Cn as NodeLocator, Ct as WebWorkerEvent, D as CdpTouchscreen, Dn as DeviceRequestPrompt, Dt as normalizeHeaderValue, E as CdpTouchHandle, En as TimeoutSettings, Et as WaitTask, F as CdpFrame, Fn as Browser, Ft as headersArray, G as CdpJSHandle, Gn as asyncDisposeSymbol, Gt as XPathQueryHandler, H as FrameManagerEvent, Hn as DisposableStack, Ht as bindIsolatedHandle, I as referrerPolicyToProtocol, In as WEB_PERMISSION_TO_PROTOCOL_PERMISSION, It as Dialog, J as addPageBinding, Jn as CallbackRegistry, Jt as PQueryHandler, K as releaseObject, Kn as disposeSymbol, Kt as TextQueryHandler, L as LifecycleWatcher, Ln as CDPSession, Lt as Accessibility, M as CdpHTTPResponse, Mt as InterceptResolutionAction, N as CdpHTTPRequest, Nt as STATUS_TEXTS, O as _keyDefinitions, On as BrowserContext, Ot as SecurityDetails, P as FrameTree, Pn as Mutex, Pt as handleError, Q as createEvaluationError, Qn as rewriteError, Qt as ScriptInjector, R as IsolatedWorld, Rn as CDPSessionEvent, Rt as Frame, S as WebMCPTool, Sn as MappedLocator, St as WebWorker, T as CdpMouse, Tn as RaceLocator, Tt as TaskManager, U as ExecutionContext, Un as DisposableStackPolyfill, Ut as JSHandle, V as PUPPETEER_WORLD, Vn as AsyncDisposableStackPolyfill, Vt as ElementHandle, W as CdpElementHandle, Wn as SuppressedError, Wt as getQueryHandlerAndSelector, X as createClientError, Xn as isErrnoException, Xt as CustomQueryHandlerRegistry, Y as convertConsoleMessageLevel, Yn as createProtocolErrorMessage, Yt as PierceQueryHandler, Z as createConsoleMessage, Zn as isErrorLike, Zt as customQueryHandlers, _ as CdpBrowserContext, _n as DelegatedLocator, _t as Mouse, a as KnownDevices, at as CdpPreloadScript, b as convertSameSiteFromPuppeteerToCdp, bn as Locator, bt as createIncrementalIdGenerator, c as _connectToCdpBrowser, cn as Tracing, ct as isTargetClosedError, d as CdpTarget, dn as CSSCoverage, dt as ConsoleMessage, en as ARIAQueryHandler, et as valueFromJSHandle, f as DevToolsTarget, fn as Coverage, ft as CdpBluetoothEmulation, g as WorkerTarget, gn as supportedMetrics, gt as Keyboard, h as PageTarget, hn as setDefaultScreenshotOptions, ht as TargetType, i as assertSupportedUrlRestrictions, it as CdpDeviceRequestPromptManager, j as NetworkEventManager, jt as HTTPRequest, k as FrameManager, kt as HTTPResponse, l as CdpBrowser, ln as EmulatedState, lt as CdpCDPSession, m as OtherTarget, mn as Page, mt as Target, n as TaskQueue, nn as LazyArg, nt as valueFromRemoteObjectReference, o as PredefinedNetworkConditions, on as AsyncIterableUtil, ot as CdpDialog, p as InitializationStatus, pn as JSCoverage, pt as Binding, q as CDP_BINDING_PREFIX, qn as Callback, qt as parsePSelectors, r as Puppeteer, rn as transposeIterableHandle, rt as CdpDeviceRequestPrompt, s as ExtensionTransport, sn as FileChooser, st as Connection, t as PUPPETEER_REVISIONS, tn as QueryHandler, tt as valueFromPrimitiveRemoteObject, u as TargetManager, un as EmulationManager, ut as NetworkManagerEvent, v as CdpPage, vn as FilteredLocator, vt as MouseButton, w as CdpKeyboard, wn as RETRY_DELAY, wt as Realm, x as WebMCP, xn as LocatorEvent, xt as Extension, y as convertCookiesPartitionKeyFromPuppeteerToCdp, yn as FunctionLocator, yt as Touchscreen, z as CdpWebWorker, zn as EventEmitter, zt as FrameEvent } from "./index-browser-Bp3vxHC3.js";
3
+ import { $ as pageBindingInitString, $n as Deferred, $t as scriptInjector, A as NetworkManager, An as guarded, At as DEFAULT_INTERCEPT_RESOLUTION_PRIORITY, B as MAIN_WORLD, Bn as AsyncDisposableStack, Bt as throwIfDetached, C as WebMCPToolCall, Cn as NodeLocator, Ct as WebWorkerEvent, D as CdpTouchscreen, Dn as DeviceRequestPrompt, Dt as normalizeHeaderValue, E as CdpTouchHandle, En as TimeoutSettings, Et as WaitTask, F as CdpFrame, Fn as Browser, Ft as headersArray, G as CdpJSHandle, Gn as asyncDisposeSymbol, Gt as XPathQueryHandler, H as FrameManagerEvent, Hn as DisposableStack, Ht as bindIsolatedHandle, I as referrerPolicyToProtocol, In as WEB_PERMISSION_TO_PROTOCOL_PERMISSION, It as Dialog, J as addPageBinding, Jn as CallbackRegistry, Jt as PQueryHandler, K as releaseObject, Kn as disposeSymbol, Kt as TextQueryHandler, L as LifecycleWatcher, Ln as CDPSession, Lt as Accessibility, M as CdpHTTPResponse, Mt as InterceptResolutionAction, N as CdpHTTPRequest, Nt as STATUS_TEXTS, O as _keyDefinitions, On as BrowserContext, Ot as SecurityDetails, P as FrameTree, Pn as Mutex, Pt as handleError, Q as createEvaluationError, Qn as rewriteError, Qt as ScriptInjector, R as IsolatedWorld, Rn as CDPSessionEvent, Rt as Frame, S as WebMCPTool, Sn as MappedLocator, St as WebWorker, T as CdpMouse, Tn as RaceLocator, Tt as TaskManager, U as ExecutionContext, Un as DisposableStackPolyfill, Ut as JSHandle, V as PUPPETEER_WORLD, Vn as AsyncDisposableStackPolyfill, Vt as ElementHandle, W as CdpElementHandle, Wn as SuppressedError, Wt as getQueryHandlerAndSelector, X as createClientError, Xn as isErrnoException, Xt as CustomQueryHandlerRegistry, Y as convertConsoleMessageLevel, Yn as createProtocolErrorMessage, Yt as PierceQueryHandler, Z as createConsoleMessage, Zn as isErrorLike, Zt as customQueryHandlers, _ as CdpBrowserContext, _n as DelegatedLocator, _t as Mouse, a as KnownDevices, at as CdpPreloadScript, b as convertSameSiteFromPuppeteerToCdp, bn as Locator, bt as createIncrementalIdGenerator, c as _connectToCdpBrowser, cn as Tracing, ct as isTargetClosedError, d as CdpTarget, dn as CSSCoverage, dt as ConsoleMessage, en as ARIAQueryHandler, et as valueFromJSHandle, f as DevToolsTarget, fn as Coverage, ft as CdpBluetoothEmulation, g as WorkerTarget, gn as supportedMetrics, gt as Keyboard, h as PageTarget, hn as setDefaultScreenshotOptions, ht as TargetType, i as assertSupportedUrlRestrictions, it as CdpDeviceRequestPromptManager, j as NetworkEventManager, jt as HTTPRequest, k as FrameManager, kt as HTTPResponse, l as CdpBrowser, ln as EmulatedState, lt as CdpCDPSession, m as OtherTarget, mn as Page, mt as Target, n as TaskQueue, nn as LazyArg, nt as valueFromRemoteObjectReference, o as PredefinedNetworkConditions, on as AsyncIterableUtil, ot as CdpDialog, p as InitializationStatus, pn as JSCoverage, pt as Binding, q as CDP_BINDING_PREFIX, qn as Callback, qt as parsePSelectors, r as Puppeteer, rn as transposeIterableHandle, rt as CdpDeviceRequestPrompt, s as ExtensionTransport, sn as FileChooser, st as Connection, t as PUPPETEER_REVISIONS, tn as QueryHandler, tt as valueFromPrimitiveRemoteObject, u as TargetManager, un as EmulationManager, ut as NetworkManagerEvent, v as CdpPage, vn as FilteredLocator, vt as MouseButton, w as CdpKeyboard, wn as RETRY_DELAY, wt as Realm, x as WebMCP, xn as LocatorEvent, xt as Extension, y as convertCookiesPartitionKeyFromPuppeteerToCdp, yn as FunctionLocator, yt as Touchscreen, z as CdpWebWorker, zn as EventEmitter, zt as FrameEvent } from "./index-browser-CysrjMyM.js";
4
4
  import { t as BrowserWebSocketTransport } from "./BrowserWebSocketTransport-wm99h94r.js";
5
- import { t as convertPuppeteerChannelToBrowsersChannel } from "./LaunchOptions-DXdeJis3.js";
5
+ import { t as convertPuppeteerChannelToBrowsersChannel } from "./LaunchOptions-kGXcZOe0.js";
6
6
  import { t as NodeWebSocketTransport } from "./NodeWebSocketTransport-D9ysYGLM.js";
7
- import fs, { existsSync } from "node:fs";
8
- import path, { dirname, join } from "node:path";
9
7
  import { spawn, spawnSync } from "node:child_process";
8
+ import { mkdtemp, rename, unlink } from "node:fs/promises";
9
+ import path, { dirname, join } from "node:path";
10
+ import fs, { existsSync } from "node:fs";
10
11
  import os, { tmpdir } from "node:os";
11
12
  import { debuglog } from "node:util";
12
- import { mkdtemp, rename, unlink } from "node:fs/promises";
13
13
  import { PassThrough } from "node:stream";
14
14
 
15
15
  //#region node_modules/puppeteer-core/lib/puppeteer/node-env-setup.js
@@ -240,7 +240,7 @@ var BrowserLauncher = class {
240
240
  const bidiOnly = process.env["PUPPETEER_WEBDRIVER_BIDI_ONLY"] === "true";
241
241
  const BiDi = await import(
242
242
  /* webpackIgnore: true */
243
- "./bidi-CwtLGgcA.js"
243
+ "./bidi-BalpKaJc.js"
244
244
  );
245
245
  const bidiConnection = await BiDi.connectBidiOverCdp(cdpConnection);
246
246
  return await BiDi.BidiBrowser.create({
@@ -262,7 +262,7 @@ var BrowserLauncher = class {
262
262
  const transport = await NodeWebSocketTransport.create(browserWSEndpoint);
263
263
  const BiDi = await import(
264
264
  /* webpackIgnore: true */
265
- "./bidi-CwtLGgcA.js"
265
+ "./bidi-BalpKaJc.js"
266
266
  );
267
267
  const bidiConnection = new BiDi.BidiConnection(browserWSEndpoint, transport, opts.idGenerator, opts.slowMo, opts.protocolTimeout);
268
268
  return await BiDi.BidiBrowser.create({
@@ -1,11 +1,11 @@
1
1
  import { t as Schema } from "../lib-C8_jXvwA.js";
2
- import { Context } from "@deepseek-ai/cordis";
3
2
  import { randomBytes } from "node:crypto";
4
- import { join } from "node:path";
5
3
  import { spawn } from "node:child_process";
4
+ import { readFile } from "node:fs/promises";
5
+ import { join } from "node:path";
6
+ import { Context } from "@deepseek-ai/cordis";
6
7
  import { homedir } from "node:os";
7
8
  import { defineTool } from "@deepseek-ai/dsh-tools";
8
- import { readFile } from "node:fs/promises";
9
9
 
10
10
  //#region src/remote/oneshot.ts
11
11
  /** 单流硬收集帽(4M UTF-16 code units,ASCII≈4MB):防失控输出吃内存;模型面截断由上层 tailWindow 负责。 */
@@ -1,6 +1,6 @@
1
+ import { t as Schema } from "../index-DTDXUe6m.js";
1
2
  import { Context } from "@deepseek-ai/cordis";
2
3
  import { ToolDefinition } from "@deepseek-ai/dsh-tools";
3
- import * as _deepseek_ai_schemastery0 from "@deepseek-ai/schemastery";
4
4
 
5
5
  //#region src/url-schemes/tools/write.d.ts
6
6
 
@@ -50,12 +50,12 @@ declare const inject: string[];
50
50
  * real patch-line config. Schema-level defaults (both ON — the service is
51
51
  * opt-out) survive every overlay layer, per the v0.2.2a ruling.
52
52
  */
53
- declare const Config: _deepseek_ai_schemastery0.default<Schemastery.ObjectS<NoInfer<{
54
- urlSchemes: _deepseek_ai_schemastery0.default<boolean, boolean, "defined">;
55
- hashline: _deepseek_ai_schemastery0.default<boolean, boolean, "defined">;
53
+ declare const Config: Schema<Schemastery.ObjectS<NoInfer<{
54
+ urlSchemes: Schema<boolean, boolean, "defined">;
55
+ hashline: Schema<boolean, boolean, "defined">;
56
56
  }>>, Schemastery.ObjectT<NoInfer<{
57
- urlSchemes: _deepseek_ai_schemastery0.default<boolean, boolean, "defined">;
58
- hashline: _deepseek_ai_schemastery0.default<boolean, boolean, "defined">;
57
+ urlSchemes: Schema<boolean, boolean, "defined">;
58
+ hashline: Schema<boolean, boolean, "defined">;
59
59
  }>>, "plain">;
60
60
  /** Register the four URL-aware tools on one agent's own scope layer. */
61
61
  /**
@@ -75,12 +75,12 @@ declare function apply(ctx: Context, config: UrlSchemesConfig | undefined): void
75
75
  declare const _default: {
76
76
  name: string;
77
77
  inject: string[];
78
- Config: _deepseek_ai_schemastery0.default<Schemastery.ObjectS<NoInfer<{
79
- urlSchemes: _deepseek_ai_schemastery0.default<boolean, boolean, "defined">;
80
- hashline: _deepseek_ai_schemastery0.default<boolean, boolean, "defined">;
78
+ Config: Schema<Schemastery.ObjectS<NoInfer<{
79
+ urlSchemes: Schema<boolean, boolean, "defined">;
80
+ hashline: Schema<boolean, boolean, "defined">;
81
81
  }>>, Schemastery.ObjectT<NoInfer<{
82
- urlSchemes: _deepseek_ai_schemastery0.default<boolean, boolean, "defined">;
83
- hashline: _deepseek_ai_schemastery0.default<boolean, boolean, "defined">;
82
+ urlSchemes: Schema<boolean, boolean, "defined">;
83
+ hashline: Schema<boolean, boolean, "defined">;
84
84
  }>>, "plain">;
85
85
  apply: typeof apply;
86
86
  };
@@ -1,28 +1,28 @@
1
1
  import { r as __toESM, t as __commonJS } from "../chunk-DQxbwPpZ.js";
2
2
  import { t as Schema } from "../lib-C8_jXvwA.js";
3
- import { a as PACKAGE_ROOT } from "../kernel-env-BLPZE-I3.js";
3
+ import { a as PACKAGE_ROOT } from "../kernel-env-D8UOWeji.js";
4
4
  import { n as captureNativeTools } from "../native-capture-BEByDXYM.js";
5
- import { a as createDshHandler, c as createDvcHandler, d as registerDvcDevice, f as UrlSchemesError, h as SCHEME_NAMES, i as createHttpHandler, l as dispatchDvcWrite, m as parseUrl, n as wrapFsWithSchemes, o as UrlResolver, p as applySelector, r as HTTP_SCHEMES, s as resolveDocsDir, u as listDvcDevices } from "../wrap-kTohEeis.js";
5
+ import { a as createHttpHandler, c as listDvcDevices, d as UrlResolver, f as UrlSchemesError, h as SCHEME_NAMES, i as HTTP_SCHEMES, l as registerDvcDevice, m as parseUrl, n as wrapFsWithSchemes, o as createDvcHandler, p as applySelector, r as resolveDocsDir, s as dispatchDvcWrite, u as createDshHandler } from "../wrap-T4I0nfPM.js";
6
6
  import { n as Parser } from "../web-tree-sitter-CPrPD4J2.js";
7
- import { a as primaryServerForFile, c as serversForFile, n as findWorkspaceRoot, o as resolveCommandPath, r as installHintFor, s as serverByName } from "../lsp-server-registry-D4VLs1Sm.js";
7
+ import { a as primaryServerForFile, c as serversForFile, n as findWorkspaceRoot, o as resolveCommandPath, r as installHintFor, s as serverByName } from "../lsp-server-registry-CH9WNFFt.js";
8
8
  import { createRequire } from "node:module";
9
9
  import { createHash, randomUUID } from "node:crypto";
10
- import { accessSync, constants, existsSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
10
+ import { spawn } from "node:child_process";
11
+ import * as fsPromises from "node:fs/promises";
12
+ import { mkdir, mkdtemp, readFile, readdir, rename, rm, stat, unlink, writeFile } from "node:fs/promises";
11
13
  import * as path$1 from "node:path";
12
14
  import { dirname, isAbsolute, join, posix, relative, resolve, sep } from "node:path";
13
- import { spawn } from "node:child_process";
14
- import { homedir, tmpdir } from "node:os";
15
15
  import { fileURLToPath, pathToFileURL } from "node:url";
16
+ import { AsyncLocalStorage } from "node:async_hooks";
17
+ import { accessSync, constants, existsSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
18
+ import { homedir, tmpdir } from "node:os";
16
19
  import { defineTool } from "@deepseek-ai/dsh-tools";
17
- import * as fsPromises from "node:fs/promises";
18
- import { mkdir, mkdtemp, readFile, readdir, rename, rm, stat, unlink, writeFile } from "node:fs/promises";
20
+ import { FsError } from "@deepseek-ai/dsh-fs";
21
+ import { ESCALATION_TARGETS, approveEscalation, escalationHintMarker, sandboxDenialMarker, validateEscalationArgs } from "@deepseek-ai/dsh-sandbox";
19
22
  import { gunzipSync } from "node:zlib";
20
23
  import { SessionId } from "@deepseek-ai/dsh-session";
21
24
  import { resolveDshHome } from "@deepseek-ai/dsh-home-paths";
22
25
  import { DatabaseSync } from "node:sqlite";
23
- import { AsyncLocalStorage } from "node:async_hooks";
24
- import { FsError } from "@deepseek-ai/dsh-fs";
25
- import { ESCALATION_TARGETS, approveEscalation, escalationHintMarker, sandboxDenialMarker, validateEscalationArgs } from "@deepseek-ai/dsh-sandbox";
26
26
 
27
27
  //#region src/devices/ast/engine/grammar-manifest.mjs
28
28
  /**
@@ -1435,7 +1435,7 @@ const PUPPETEER_CORE_VERSION = "25.3.0";
1435
1435
  */
1436
1436
  async function loadPuppeteer() {
1437
1437
  if (puppeteerModule === void 0) try {
1438
- puppeteerModule = await import("../puppeteer-core-Bliv_vNf.js");
1438
+ puppeteerModule = await import("../puppeteer-core-CSk2PtSm.js");
1439
1439
  } catch {
1440
1440
  try {
1441
1441
  puppeteerModule = await import(pathToFileURL((await ensureVendored({
@@ -2500,7 +2500,7 @@ function ensureMustHave(gate, language) {
2500
2500
  if (!MUST_HAVE.has(language) || gate.installTried.has(language)) return;
2501
2501
  gate.installTried.add(language);
2502
2502
  (async () => {
2503
- const registry = await import("../lsp-server-registry-BcdkHROD.js");
2503
+ const registry = await import("../lsp-server-registry-BXvUTBY7.js");
2504
2504
  const probePath = `/tmp/x.${language === "python" ? "py" : "ts"}`;
2505
2505
  const primary = registry.primaryServerForFile(probePath);
2506
2506
  if (primary === null) return;
@@ -3189,7 +3189,7 @@ async function lspDeviceRead(subpath, session) {
3189
3189
  if (parsed === void 0) return `unknown read path dvc://lsp/${subpath} — reads: status | diagnostics?file=…[&all=1] | definition?file=&line=[&character=|&symbol=] | references?… | hover?…`;
3190
3190
  if (parsed.action === "status") {
3191
3191
  const availability = {};
3192
- const registry = await import("../lsp-server-registry-BcdkHROD.js");
3192
+ const registry = await import("../lsp-server-registry-BXvUTBY7.js");
3193
3193
  for (const language of [
3194
3194
  "python",
3195
3195
  "typescript",
@@ -1,7 +1,7 @@
1
+ import { t as Schema } from "./index-DTDXUe6m.js";
1
2
  import { Context } from "@deepseek-ai/cordis";
2
3
  import { CredentialRecord } from "@deepseek-ai/dsh-credentials";
3
4
  import { IncomingMessage } from "node:http";
4
- import * as _deepseek_ai_schemastery19 from "@deepseek-ai/schemastery";
5
5
 
6
6
  //#region src/web-password.d.ts
7
7
 
@@ -123,10 +123,10 @@ interface WebPasswordConfig {
123
123
  /** Absolute browser-session lifetime in days. Default: 30 (the native default). */
124
124
  cookieMaxAgeDays?: number;
125
125
  }
126
- declare const Config: _deepseek_ai_schemastery19.default<Schemastery.ObjectS<NoInfer<{
127
- cookieMaxAgeDays: _deepseek_ai_schemastery19.default<number, number, "defined">;
126
+ declare const Config: Schema<Schemastery.ObjectS<NoInfer<{
127
+ cookieMaxAgeDays: Schema<number, number, "defined">;
128
128
  }>>, Schemastery.ObjectT<NoInfer<{
129
- cookieMaxAgeDays: _deepseek_ai_schemastery19.default<number, number, "defined">;
129
+ cookieMaxAgeDays: Schema<number, number, "defined">;
130
130
  }>>, "plain">;
131
131
  /** Cordis plugin name; also the scope of this row's credential record. */
132
132
  declare const name = "dashr-web-password";
@@ -145,10 +145,10 @@ declare function apply(ctx: Context, config?: WebPasswordConfig): void;
145
145
  declare const _default: {
146
146
  name: string;
147
147
  inject: string[];
148
- Config: _deepseek_ai_schemastery19.default<Schemastery.ObjectS<NoInfer<{
149
- cookieMaxAgeDays: _deepseek_ai_schemastery19.default<number, number, "defined">;
148
+ Config: Schema<Schemastery.ObjectS<NoInfer<{
149
+ cookieMaxAgeDays: Schema<number, number, "defined">;
150
150
  }>>, Schemastery.ObjectT<NoInfer<{
151
- cookieMaxAgeDays: _deepseek_ai_schemastery19.default<number, number, "defined">;
151
+ cookieMaxAgeDays: Schema<number, number, "defined">;
152
152
  }>>, "plain">;
153
153
  apply: typeof apply;
154
154
  };
@@ -309,8 +309,8 @@ function frame(body) {
309
309
  *
310
310
  * @param trustedPageAuthorities - the operator-declared hostnames.
311
311
  * @param trustAllHosts - delegate admission to native authentication without an address fence.
312
- * @returns the script text, or `undefined` when the list is empty (inject
313
- * nothing — the feature is fully inert).
312
+ * @returns the script text, or `undefined` when declared-authorities mode
313
+ * has an empty list (no page injection).
314
314
  */
315
315
  function buildTrustScript(trustedPageAuthorities, trustAllHosts = false) {
316
316
  if (trustAllHosts) return frame(["if(!window.__DSH_TRANSPORT__)window.__DSH_TRANSPORT__={ownsHost:true};"]);
@@ -361,8 +361,8 @@ const name = "dashr-web-trust";
361
361
  */
362
362
  const inject = [];
363
363
  /**
364
- * Mount the authorities-leg injection: one `webserver/index-inject` listener
365
- * pushing the rendered row.
364
+ * Mount page capabilities and, when enabled, an authentication-only admission
365
+ * delegate. Both registrations are owned by this plugin fiber.
366
366
  * @param ctx - host plugin context.
367
367
  * @param config - the row config.
368
368
  */
@@ -374,7 +374,7 @@ function apply(ctx, config) {
374
374
  ctx.inject(["webServer"], () => {
375
375
  ctx.on("webserver/index-inject", (table) => {
376
376
  const text = buildTrustScript(authorities, config?.trustAllHosts);
377
- if (text !== void 0) table.push({
377
+ if (text !== void 0) table.unshift({
378
378
  kind: "script",
379
379
  placement: "head",
380
380
  text
@@ -1,5 +1,5 @@
1
+ import { t as Schema } from "./index-DTDXUe6m.js";
1
2
  import { Context } from "@deepseek-ai/cordis";
2
- import * as _deepseek_ai_schemastery9 from "@deepseek-ai/schemastery";
3
3
 
4
4
  //#region src/web-trust.d.ts
5
5
 
@@ -51,8 +51,8 @@ interface BootScriptRow {
51
51
  *
52
52
  * @param trustedPageAuthorities - the operator-declared hostnames.
53
53
  * @param trustAllHosts - delegate admission to native authentication without an address fence.
54
- * @returns the script text, or `undefined` when the list is empty (inject
55
- * nothing — the feature is fully inert).
54
+ * @returns the script text, or `undefined` when declared-authorities mode
55
+ * has an empty list (no page injection).
56
56
  */
57
57
  declare function buildTrustScript(trustedPageAuthorities: readonly string[] | undefined, trustAllHosts?: boolean): string | undefined;
58
58
  /**
@@ -76,12 +76,12 @@ interface TrustConfig {
76
76
  trustedPageAuthorities?: readonly string[];
77
77
  }
78
78
  /** Row config schema (schema-level default derives from `DSH_TRUSTED_HOSTS`). */
79
- declare const Config: _deepseek_ai_schemastery9.default<Schemastery.ObjectS<NoInfer<{
80
- trustAllHosts: _deepseek_ai_schemastery9.default<boolean, boolean, "defined">;
81
- trustedPageAuthorities: _deepseek_ai_schemastery9.default<string[], string[], "defined">;
79
+ declare const Config: Schema<Schemastery.ObjectS<NoInfer<{
80
+ trustAllHosts: Schema<boolean, boolean, "defined">;
81
+ trustedPageAuthorities: Schema<string[], string[], "defined">;
82
82
  }>>, Schemastery.ObjectT<NoInfer<{
83
- trustAllHosts: _deepseek_ai_schemastery9.default<boolean, boolean, "defined">;
84
- trustedPageAuthorities: _deepseek_ai_schemastery9.default<string[], string[], "defined">;
83
+ trustAllHosts: Schema<boolean, boolean, "defined">;
84
+ trustedPageAuthorities: Schema<string[], string[], "defined">;
85
85
  }>>, "plain">;
86
86
  /** Cordis plugin name. */
87
87
  declare const name = "dashr-web-trust";
@@ -91,8 +91,8 @@ declare const name = "dashr-web-trust";
91
91
  */
92
92
  declare const inject: string[];
93
93
  /**
94
- * Mount the authorities-leg injection: one `webserver/index-inject` listener
95
- * pushing the rendered row.
94
+ * Mount page capabilities and, when enabled, an authentication-only admission
95
+ * delegate. Both registrations are owned by this plugin fiber.
96
96
  * @param ctx - host plugin context.
97
97
  * @param config - the row config.
98
98
  */
@@ -100,12 +100,12 @@ declare function apply(ctx: Context, config: TrustConfig | undefined): void;
100
100
  declare const _default: {
101
101
  name: string;
102
102
  inject: string[];
103
- Config: _deepseek_ai_schemastery9.default<Schemastery.ObjectS<NoInfer<{
104
- trustAllHosts: _deepseek_ai_schemastery9.default<boolean, boolean, "defined">;
105
- trustedPageAuthorities: _deepseek_ai_schemastery9.default<string[], string[], "defined">;
103
+ Config: Schema<Schemastery.ObjectS<NoInfer<{
104
+ trustAllHosts: Schema<boolean, boolean, "defined">;
105
+ trustedPageAuthorities: Schema<string[], string[], "defined">;
106
106
  }>>, Schemastery.ObjectT<NoInfer<{
107
- trustAllHosts: _deepseek_ai_schemastery9.default<boolean, boolean, "defined">;
108
- trustedPageAuthorities: _deepseek_ai_schemastery9.default<string[], string[], "defined">;
107
+ trustAllHosts: Schema<boolean, boolean, "defined">;
108
+ trustedPageAuthorities: Schema<string[], string[], "defined">;
109
109
  }>>, "plain">;
110
110
  apply: typeof apply;
111
111
  };
@@ -1,2 +1,3 @@
1
- import { a as _default, c as buildTrustScript, d as name, i as TrustConfig, l as deriveDefaultPageAuthorities, n as Config, o as apply, r as MobileConfig, s as buildMobileScript, t as BootScriptRow, u as inject } from "./web-trust-D9jFaQbH.js";
1
+ import "./index-DTDXUe6m.js";
2
+ import { a as _default, c as buildTrustScript, d as name, i as TrustConfig, l as deriveDefaultPageAuthorities, n as Config, o as apply, r as MobileConfig, s as buildMobileScript, t as BootScriptRow, u as inject } from "./web-trust-Dej_RI2B.js";
2
3
  export { BootScriptRow, Config, MobileConfig, TrustConfig, apply, buildMobileScript, buildTrustScript, _default as default, deriveDefaultPageAuthorities, inject, name };
package/lib/web-trust.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import "./lib-C8_jXvwA.js";
2
- import { a as deriveDefaultPageAuthorities, c as web_trust_default, i as buildTrustScript, n as apply, o as inject, r as buildMobileScript, s as name, t as Config } from "./web-trust-jR0o70JS.js";
2
+ import { a as deriveDefaultPageAuthorities, c as web_trust_default, i as buildTrustScript, n as apply, o as inject, r as buildMobileScript, s as name, t as Config } from "./web-trust-D6gJpUMf.js";
3
3
 
4
4
  export { Config, apply, buildMobileScript, buildTrustScript, web_trust_default as default, deriveDefaultPageAuthorities, inject, name };
@@ -0,0 +1,10 @@
1
+ import { Service } from "@deepseek-ai/cordis";
2
+ import { WebServer } from "@deepseek-ai/dsh-host-webserver";
3
+
4
+ //#region src/webserver.d.ts
5
+ declare class BetterWebServer extends WebServer {
6
+ static inject: string[];
7
+ [Service.init](): Promise<void>;
8
+ }
9
+ //#endregion
10
+ export { BetterWebServer as default };
@@ -0,0 +1,19 @@
1
+ import { Service } from "@deepseek-ai/cordis";
2
+ import { WebServer } from "@deepseek-ai/dsh-host-webserver";
3
+
4
+ //#region src/webserver.ts
5
+ var BetterWebServer = class extends WebServer {
6
+ static inject = ["loader"];
7
+ async [Service.init]() {
8
+ const welcome = [...this.ctx.loader.entries()].find((entry) => entry.options.id === "dashr-welcome-notice");
9
+ if (welcome !== void 0 && !welcome.disabled) {
10
+ if (welcome.fiber === void 0) await welcome.init();
11
+ await welcome.fiber?.await();
12
+ }
13
+ this.ctx.fiber.assertActive();
14
+ await super[Service.init]();
15
+ }
16
+ };
17
+
18
+ //#endregion
19
+ export { BetterWebServer as default };
@@ -0,0 +1,18 @@
1
+ import { Context } from "@deepseek-ai/cordis";
2
+
3
+ //#region src/welcome-notice.d.ts
4
+ declare const name = "dashr-welcome-notice";
5
+ declare const inject: string[];
6
+ /** The private upstream constant has no Host export; reject changed layouts rather than guess. */
7
+ declare function parseWelcomeVersion(client: string): string;
8
+ /** Resolve from the owning DSH installation, never from this plugin's build dependencies. */
9
+ declare function readHostWelcomeVersion(installAnchor: string): string;
10
+ /** Keep the original settings namespace and native UI; project policy before startup settles. */
11
+ declare function apply(ctx: Context): Promise<(() => Promise<void>) | undefined>;
12
+ declare const _default: {
13
+ name: string;
14
+ inject: string[];
15
+ apply: typeof apply;
16
+ };
17
+ //#endregion
18
+ export { apply, _default as default, inject, name, parseWelcomeVersion, readHostWelcomeVersion };
@@ -0,0 +1,59 @@
1
+ import { createRequire } from "node:module";
2
+ import { readFileSync } from "node:fs";
3
+
4
+ //#region src/welcome-notice.ts
5
+ const name = "dashr-welcome-notice";
6
+ const inject = ["loader", "profileContext"];
7
+ const NAMESPACE = "ui-settings-general";
8
+ const FIELD = "welcomeNoticeVersion";
9
+ /** The private upstream constant has no Host export; reject changed layouts rather than guess. */
10
+ function parseWelcomeVersion(client) {
11
+ const values = [...client.matchAll(/\b(?:const|let|var)\s+WELCOME_NOTICE_VERSION\s*=\s*(['"])([^'"\\\r\n]+)\1\s*[;,]/g)];
12
+ if (values.length !== 1) throw new Error("dashr-welcome-notice: expected one WELCOME_NOTICE_VERSION in the installed Models client; check the upstream bundle layout or disable this entry");
13
+ return values[0][2];
14
+ }
15
+ /** Resolve from the owning DSH installation, never from this plugin's build dependencies. */
16
+ function readHostWelcomeVersion(installAnchor) {
17
+ return parseWelcomeVersion(readFileSync(createRequire(createRequire(installAnchor).resolve("@deepseek-ai/dsh-web-app/package.json")).resolve("@deepseek-ai/dsh-client-ui-settings-models/client"), "utf8"));
18
+ }
19
+ /** Keep the original settings namespace and native UI; project policy before startup settles. */
20
+ async function apply(ctx) {
21
+ const entry = [...ctx.loader.entries()].find((entry$1) => entry$1.options.id === NAMESPACE);
22
+ if (entry === void 0 || entry.disabled) return;
23
+ const version = readHostWelcomeVersion(ctx.profileContext.installAnchor);
24
+ const original = { ...entry.options.config ?? {} };
25
+ const unhook = ctx.on("internal/config", function(_raw, next) {
26
+ const config = next();
27
+ return this.entry?.options.id === NAMESPACE ? {
28
+ ...config,
29
+ [FIELD]: version
30
+ } : config;
31
+ }, { global: true });
32
+ try {
33
+ if (entry.fiber === void 0) await entry.init();
34
+ await entry.fiber?.await();
35
+ await entry.update({ config: {
36
+ ...original,
37
+ [FIELD]: version
38
+ } });
39
+ } catch (error) {
40
+ unhook();
41
+ throw error;
42
+ }
43
+ return async () => {
44
+ unhook();
45
+ if (entry.fiber === void 0 || entry.disabled) return;
46
+ const config = { ...entry.options.config ?? {} };
47
+ if (Object.hasOwn(original, FIELD)) config[FIELD] = original[FIELD];
48
+ else delete config[FIELD];
49
+ await entry.update({ config });
50
+ };
51
+ }
52
+ var welcome_notice_default = {
53
+ name,
54
+ inject,
55
+ apply
56
+ };
57
+
58
+ //#endregion
59
+ export { apply, welcome_notice_default as default, inject, name, parseWelcomeVersion, readHostWelcomeVersion };