@wisdoverse/dsh-inline-media-viewer 1.0.9 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.10
4
+
5
+ - Promote 1.0.10-alpha.1 to the stable release without runtime changes.
6
+ - Verify plugin import and host startup on DSH v0.1.2-rc.1; retain the v0.1.3-alpha.1 API adaptation.
7
+ - Browser media playback and the final DSH v0.1.3 release have not been verified.
8
+
9
+ ## 1.0.10-alpha.1
10
+
11
+ - Adapt to DSH v0.1.3-alpha.1: register host settings through `settings.register`,
12
+ register client projections through `uiConversation.events`, and use the
13
+ authenticated two-argument RPC registration contract.
14
+ - Remove the unused settings package peer dependency; consume the host-provided
15
+ settings service and add a real-dependency host registration check.
16
+
3
17
  ## 1.0.9
4
18
 
5
19
  - Collect media paths from tool-call arguments as well as the assistant's final
package/README.md CHANGED
@@ -59,12 +59,14 @@ audio/sound.mp3 → <audio controls>
59
59
 
60
60
  ## Installation
61
61
 
62
+ Targets DSH **v0.1.3-alpha.1** APIs. Host startup was also verified on **v0.1.2-rc.1**. Browser media playback and the final DSH v0.1.3 release have not been verified.
63
+
62
64
  ### From npm
63
65
 
64
66
  Install and activate the bundle in your Web profile:
65
67
 
66
68
  ```bash
67
- dsh plugin --profile web add @wisdoverse/dsh-inline-media-viewer
69
+ dsh plugin --profile web add @wisdoverse/dsh-inline-media-viewer@1.0.10
68
70
  ```
69
71
 
70
72
  Restart the Web profile after installation.
package/README.zh-CN.md CHANGED
@@ -57,12 +57,14 @@ audio/sound.mp3 → <audio controls>
57
57
 
58
58
  ## 安装
59
59
 
60
+ 适配 DSH **v0.1.3-alpha.1** API,并已在 **v0.1.2-rc.1** 验证宿主启动。浏览器媒体播放及 DSH v0.1.3 正式版尚未验证。
61
+
60
62
  ### 通过 npm 安装
61
63
 
62
64
  在 Web profile 中安装并启用 Bundle:
63
65
 
64
66
  ```bash
65
- dsh plugin --profile web add @wisdoverse/dsh-inline-media-viewer
67
+ dsh plugin --profile web add @wisdoverse/dsh-inline-media-viewer@1.0.10
66
68
  ```
67
69
 
68
70
  安装后重启 Web profile。
package/client/client.js CHANGED
@@ -542,11 +542,11 @@ window.__ModuleLoader__.load({
542
542
  }
543
543
 
544
544
  const name = "dsh-inline-media-viewer";
545
- const inject = ["slots", "connection", "settingsScope", "locale", "conversationEvents"];
545
+ const inject = ["slots", "connection", "settingsScope", "locale", "uiConversation"];
546
546
 
547
547
  function apply(ctx) {
548
548
  const connection = ctx.get("connection");
549
- ctx.conversationEvents.register(mediaMentionsDefinition);
549
+ ctx.uiConversation.events.register(mediaMentionsDefinition);
550
550
  ctx.effect(() => ctx.locale.register(SETTINGS_NS, SETTINGS_DICT), "inline-media: dictionaries");
551
551
  const t = ctx.locale.bind(SETTINGS_NS);
552
552
  const scope = ctx.settingsScope.bind({ namespace: SETTINGS_NAMESPACE });
package/index.js CHANGED
@@ -20,7 +20,6 @@
20
20
  import { readFile, realpath, stat } from "node:fs/promises";
21
21
  import { isAbsolute, resolve } from "node:path";
22
22
  import z from "@deepseek-ai/schemastery";
23
- import { installSettingsSection, settingsNamespace } from "@deepseek-ai/dsh-settings";
24
23
 
25
24
  import { COMFY_DEFAULT_ORIGIN, MAX_BYTES, comfyUrl, isInside, mimeOf, normalizeComfyOrigin, resolveSessionCwd, testing } from "./lib.js";
26
25
 
@@ -33,7 +32,7 @@ const CHANNEL = "/inline-media";
33
32
  const ENDPOINT = "read";
34
33
 
35
34
  /** Persistent user settings namespace for this plugin. */
36
- export const MEDIA_SETTINGS_NAMESPACE = settingsNamespace("inline-media");
35
+ export const MEDIA_SETTINGS_NAMESPACE = "inline-media";
37
36
 
38
37
  /** Schema of the user settings section. */
39
38
  export const MEDIA_SETTINGS_SCHEMA = z.object({
@@ -157,28 +156,19 @@ async function handleRead(ctx, endpoint, payload, signal, resolveSettings) {
157
156
  }
158
157
 
159
158
  export function apply(ctx) {
160
- let resolveSettings = () => MEDIA_SETTINGS_DEFAULTS;
159
+ const settings = ctx.settings.register(MEDIA_SETTINGS_NAMESPACE, MEDIA_SETTINGS_SCHEMA, {
160
+ base: MEDIA_SETTINGS_DEFAULTS,
161
+ });
162
+ const resolveSettings = () => settings.get();
161
163
  ctx.effect(() => {
162
164
  const dispose = ctx.connection.rpc.handle(
163
165
  CHANNEL,
164
166
  (endpoint, payload, signal) => handleRead(ctx, endpoint, payload, signal, resolveSettings),
165
- { authority: "trusted-host" },
166
167
  );
167
168
  return () => {
168
169
  void dispose();
169
170
  };
170
171
  }, "inline-media: rpc");
171
-
172
- // Register the user settings namespace (defaults + schema). The client reads
173
- // and writes this section through the settings mirror. autoRender /
174
- // displayCap / imageMaxPx are consumed client-side; comfyUrl is read here,
175
- // per request, to decide which remote URLs to proxy and where to fetch them.
176
- installSettingsSection(ctx, MEDIA_SETTINGS_NAMESPACE, MEDIA_SETTINGS_SCHEMA, MEDIA_SETTINGS_DEFAULTS, {
177
- setSource: (source) => {
178
- resolveSettings = source;
179
- },
180
- onChange: () => {},
181
- });
182
172
  }
183
173
 
184
174
  export { MIME } from "./lib.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wisdoverse/dsh-inline-media-viewer",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "Persistent inline image, video, and audio previews for DeepSeek Harness Web conversations, with workspace-confined local reads and an optional ComfyUI proxy.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -49,11 +49,11 @@
49
49
  ],
50
50
  "scripts": {
51
51
  "test": "node test.mjs",
52
- "lint": "node --check index.js && node --check lib.js && node --check test.mjs"
52
+ "test:host": "node test.mjs --host",
53
+ "lint": "node --check index.js && node --check lib.js && node --check client/client.js && node --check test.mjs"
53
54
  },
54
55
  "peerDependencies": {
55
56
  "@deepseek-ai/cordis": "^4.0.1",
56
- "@deepseek-ai/dsh-settings": "^0.1.1-rc.2",
57
57
  "@deepseek-ai/schemastery": "^3.18.1"
58
58
  },
59
59
  "dsh": {