better-dsh 0.3.0-e → 0.3.0-f

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 (34) hide show
  1. package/README.md +12 -11
  2. package/cordis.patch.yml +1 -29
  3. package/lib/BrowserWebSocketTransport-CgnU0Bka.js +4 -0
  4. package/lib/{BrowserWebSocketTransport-wm99h94r.js → BrowserWebSocketTransport-CokhVKFw.js} +2 -2
  5. package/lib/LaunchOptions-DljEj6Vd.js +4 -0
  6. package/lib/{LaunchOptions-DXdeJis3.js → LaunchOptions-NT3-rzpY.js} +2 -2
  7. package/lib/NodeWebSocketTransport-5Wqr0cTX.js +4 -0
  8. package/lib/{NodeWebSocketTransport-D9ysYGLM.js → NodeWebSocketTransport-DtNdogd8.js} +29 -29
  9. package/lib/{bidi-CwtLGgcA.js → bidi-CXUoxww0.js} +99 -99
  10. package/lib/client/index.js +25 -2
  11. package/lib/fs-aware/sandbox-plugin.js +1 -1
  12. package/lib/{index-browser-Bp3vxHC3.js → index-browser-DkpQrcIm.js} +104 -104
  13. package/lib/{main-CKFNYpqT.js → main-CspJGYxD.js} +14 -14
  14. package/lib/{main-BXwPLuYr.js → main-jPcGHA-q.js} +1 -1
  15. package/lib/mobile/plugin.d.ts +1 -1
  16. package/lib/{puppeteer-core-Bliv_vNf.js → puppeteer-core-D29koPVJ.js} +17 -17
  17. package/lib/url-schemes/index.d.ts +11 -11
  18. package/lib/url-schemes/index.js +16 -16
  19. package/lib/{util-BHL_dfV_.js → util-CdSJv4Yr.js} +9 -9
  20. package/lib/{wasm_bg-CNXhHjVg.js → wasm_bg-C8T5tUKB.js} +2 -2
  21. package/lib/web-password.d.ts +7 -7
  22. package/lib/{web-tree-sitter-CPrPD4J2.js → web-tree-sitter-BUIVjOZV.js} +1 -1
  23. package/lib/{web-trust-C_Y6o8Z2.d.ts → web-trust-Dej_RI2B.d.ts} +11 -11
  24. package/lib/web-trust.d.ts +2 -1
  25. package/lib/welcome-notice.d.ts +5 -7
  26. package/lib/welcome-notice.js +9 -48
  27. package/package.json +2 -14
  28. package/lib/BrowserWebSocketTransport-D1aFReu_.js +0 -4
  29. package/lib/LaunchOptions-3peHoOAx.js +0 -4
  30. package/lib/NodeWebSocketTransport-BRLjmu2R.js +0 -4
  31. package/lib/hmr.d.ts +0 -32
  32. package/lib/hmr.js +0 -49
  33. package/lib/webserver.d.ts +0 -10
  34. package/lib/webserver.js +0 -19
@@ -1,59 +1,20 @@
1
- import { createRequire } from "node:module";
2
- import { readFileSync } from "node:fs";
1
+ import { t as Schema } from "./lib-C8_jXvwA.js";
3
2
 
4
3
  //#region src/welcome-notice.ts
5
4
  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
- };
5
+ const inject = [];
6
+ const Config = Schema.object({}).volatile();
7
+ function apply(ctx) {
8
+ ctx.inject(["settings"], (child) => {
9
+ child.effect(() => child.settings.configure({ auto: false }, ctx.fiber));
10
+ });
51
11
  }
52
12
  var welcome_notice_default = {
53
13
  name,
54
14
  inject,
15
+ Config,
55
16
  apply
56
17
  };
57
18
 
58
19
  //#endregion
59
- export { apply, welcome_notice_default as default, inject, name, parseWelcomeVersion, readHostWelcomeVersion };
20
+ export { Config, apply, welcome_notice_default as default, inject, name };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "better-dsh",
3
- "version": "0.3.0-e",
3
+ "version": "0.3.0-f",
4
4
  "description": "Make your dsh ready for serious coding tasks. (Tools x Schemas)^REPL. `skill://`, `ctx://`, `agent://`, `dvc://`, `dsh://`, IPython REPL, Context as Variables, cross compactions recallable, full context revive. `hash-edit`, `dvc://browser`, subagent as function, workflow as function.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -55,14 +55,6 @@
55
55
  "./welcome-notice": {
56
56
  "types": "./lib/welcome-notice.d.ts",
57
57
  "default": "./lib/welcome-notice.js"
58
- },
59
- "./webserver": {
60
- "types": "./lib/webserver.d.ts",
61
- "default": "./lib/webserver.js"
62
- },
63
- "./hmr": {
64
- "types": "./lib/hmr.d.ts",
65
- "default": "./lib/hmr.js"
66
58
  }
67
59
  },
68
60
  "imports": {
@@ -173,8 +165,7 @@
173
165
  "@deepseek-ai/dsh-app-boot": ">=0.1.5-0 <0.3.0-0",
174
166
  "@deepseek-ai/dsh-atomic-write": ">=0.1.5-0 <0.3.0-0",
175
167
  "@deepseek-ai/dsh-cmdline": ">=0.1.5-0 <0.3.0-0",
176
- "@deepseek-ai/dsh-plugin-manager": ">=0.1.5-0 <0.3.0-0",
177
- "@deepseek-ai/dsh-hmr": ">=0.1.5-0 <0.3.0-0"
168
+ "@deepseek-ai/dsh-plugin-manager": ">=0.1.5-0 <0.3.0-0"
178
169
  },
179
170
  "peerDependenciesMeta": {
180
171
  "@deepseek-ai/cordis": {
@@ -362,9 +353,6 @@
362
353
  },
363
354
  "@deepseek-ai/dsh-plugin-manager": {
364
355
  "optional": true
365
- },
366
- "@deepseek-ai/dsh-hmr": {
367
- "optional": true
368
356
  }
369
357
  },
370
358
  "devDependencies": {
@@ -1,4 +0,0 @@
1
- import "./util-BHL_dfV_.js";
2
- import { t as BrowserWebSocketTransport } from "./BrowserWebSocketTransport-wm99h94r.js";
3
-
4
- export { BrowserWebSocketTransport };
@@ -1,4 +0,0 @@
1
- import "./main-CKFNYpqT.js";
2
- import { t as convertPuppeteerChannelToBrowsersChannel } from "./LaunchOptions-DXdeJis3.js";
3
-
4
- export { convertPuppeteerChannelToBrowsersChannel };
@@ -1,4 +0,0 @@
1
- import "./util-BHL_dfV_.js";
2
- import { t as NodeWebSocketTransport } from "./NodeWebSocketTransport-D9ysYGLM.js";
3
-
4
- export { NodeWebSocketTransport };
package/lib/hmr.d.ts DELETED
@@ -1,32 +0,0 @@
1
- import Hmr, { HmrConfig } from "@deepseek-ai/dsh-hmr";
2
- import { Context } from "@deepseek-ai/cordis";
3
-
4
- //#region src/hmr.d.ts
5
-
6
- /**
7
- * Native runExclusive keeps a boolean in ALS. HTTP servers created while
8
- * replacing webServer inherit that boolean after the transaction finishes,
9
- * so subsequent native Plugin Manager requests are refused as nested.
10
- *
11
- * The public runExclusive/watchConfig APIs expose no selective context reset.
12
- * AsyncLocalStorage.snapshot() also resets AgentRegistry initiator attribution
13
- * and its teardown lineage, so it cannot safely repair this host transaction.
14
- * This compatibility bridge reads the native TS-private `executing` storage
15
- * after checking its runtime shape. It never replaces that storage or changes
16
- * upstream files: only exit() clears its inherited value while the unchanged
17
- * native method establishes the next transaction. Native queue, closing,
18
- * exact watchers, module reload and disposal retain their original semantics.
19
- *
20
- * The mutable token rejects nesting only while its operation is still active;
21
- * resources created by that operation can initiate later transactions.
22
- * A native implementation change fails initialization explicitly instead of
23
- * silently dropping queue or lifecycle guarantees.
24
- */
25
- declare class BetterHmr extends Hmr {
26
- private readonly nativeTransactions;
27
- private readonly liveTransactions;
28
- constructor(ctx: Context, config: HmrConfig);
29
- runExclusive<T>(operation: () => Promise<T>): Promise<T>;
30
- }
31
- //#endregion
32
- export { BetterHmr as default };
package/lib/hmr.js DELETED
@@ -1,49 +0,0 @@
1
- import { AsyncLocalStorage } from "node:async_hooks";
2
- import Hmr from "@deepseek-ai/dsh-hmr";
3
-
4
- //#region src/hmr.ts
5
- /**
6
- * Native runExclusive keeps a boolean in ALS. HTTP servers created while
7
- * replacing webServer inherit that boolean after the transaction finishes,
8
- * so subsequent native Plugin Manager requests are refused as nested.
9
- *
10
- * The public runExclusive/watchConfig APIs expose no selective context reset.
11
- * AsyncLocalStorage.snapshot() also resets AgentRegistry initiator attribution
12
- * and its teardown lineage, so it cannot safely repair this host transaction.
13
- * This compatibility bridge reads the native TS-private `executing` storage
14
- * after checking its runtime shape. It never replaces that storage or changes
15
- * upstream files: only exit() clears its inherited value while the unchanged
16
- * native method establishes the next transaction. Native queue, closing,
17
- * exact watchers, module reload and disposal retain their original semantics.
18
- *
19
- * The mutable token rejects nesting only while its operation is still active;
20
- * resources created by that operation can initiate later transactions.
21
- * A native implementation change fails initialization explicitly instead of
22
- * silently dropping queue or lifecycle guarantees.
23
- */
24
- var BetterHmr = class extends Hmr {
25
- nativeTransactions;
26
- liveTransactions = new AsyncLocalStorage();
27
- constructor(ctx, config) {
28
- super(ctx, config);
29
- const storage = this.executing;
30
- if (!(storage instanceof AsyncLocalStorage) || typeof storage.getStore !== "function" || typeof storage.exit !== "function" || typeof storage.run !== "function") throw new Error("Better Dash HMR cannot reset this native HMR transaction context: expected executing AsyncLocalStorage");
31
- this.nativeTransactions = storage;
32
- }
33
- runExclusive(operation) {
34
- if (this.liveTransactions.getStore()?.active) return Promise.reject(/* @__PURE__ */ new Error("HMR transactions cannot be nested"));
35
- return this.nativeTransactions.exit(() => super.runExclusive(() => {
36
- const token = { active: true };
37
- return this.liveTransactions.run(token, async () => {
38
- try {
39
- return await operation();
40
- } finally {
41
- token.active = false;
42
- }
43
- });
44
- }));
45
- }
46
- };
47
-
48
- //#endregion
49
- export { BetterHmr as default };
@@ -1,10 +0,0 @@
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 };
package/lib/webserver.js DELETED
@@ -1,19 +0,0 @@
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 };