@rezti/dsh-rez-suite 0.1.66 → 0.1.68

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
@@ -5,15 +5,17 @@
5
5
  升级:
6
6
 
7
7
  ```bash
8
- dsh plugin --profile web add @rezti/dsh-rez-suite@0.1.66
8
+ dsh plugin --profile web add @rezti/dsh-rez-suite@0.1.68
9
9
  ```
10
10
 
11
11
  不要用裸 `plugin update`,不要写 `latest`(新 profile 有 24 小时发布冷却,当天可能装不上)。不要装 **0.1.46**(GitHub 子依赖会被 DSH 拦住)。不要装 **0.1.51**(误用 `npm publish` 把 `workspace:` 打进包了)。
12
12
 
13
13
 
14
- ## 0.1.66 · 2026-09-13
14
+ ## 0.1.68 · 2026-09-13
15
15
 
16
- **修 Linux/旧 profile 起不来。** 子包曾钉死旧 `sso@0.1.9/0.1.14/0.1.15`(仍 `import installSettingsSection`),在官方 dsh 0.1.5 必炸。本版子包改依赖 `sso@^0.1.18`;`cordis.patch.yml` 用包名解析 sso(不再用嵌套相对路径)。装 **`@0.1.66`**,并清 `profiles/web/node_modules`。
16
+ **修 dsh 0.1.5 网页/微信 401。** 官方改成进程级 `?token=` + HttpOnly cookie,裸开 `:3080` 会提示 authentication required;个人微信 bridge 原先 RPC 不带 cookie → `session.create` 401。本版 suite 启动时写 `~/.dsh/dsh-web.url`(完整带 token 地址);wechat `@0.1.19` 用该文件换 cookie 再调 `/api`。装 **`@0.1.68`** 后重启 `dsh web`,浏览器请打开终端打印的完整 URL(或等价地打开一次该文件里的地址)。
17
+
18
+ **附:旧 sso 钉死。** 若 profile 仍嵌着旧子包,清 `profiles/web/node_modules` 再装本版。
17
19
 
18
20
  ## 0.1.64 · 2026-09-13
19
21
 
package/cordis.patch.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  # 用户只装这一包:`dsh plugin --profile web add @rezti/dsh-rez-suite`
2
- # 升级只记这一条:`dsh plugin --profile web add @rezti/dsh-rez-suite@0.1.66`
2
+ # 升级只记这一条:`dsh plugin --profile web add @rezti/dsh-rez-suite@0.1.68`
3
3
  # 不要再单独 add 子包,会重复注册。
4
4
  #
5
5
  # MCP rows are started by the domain plugins after rezSso resolves secrets.
package/lib/client.js CHANGED
@@ -1011,16 +1011,16 @@ function ChannelTable({ kind, lang }) {
1011
1011
  //#region src/changelog.ts
1012
1012
  const SUITE_CHANGELOG = [
1013
1013
  {
1014
- version: "0.1.66",
1014
+ version: "0.1.68",
1015
1015
  date: "2026-09-13",
1016
1016
  sections: [{
1017
1017
  title: {
1018
- zh: "修旧 sso 钉死导致 0.1.5 起不来",
1019
- en: "Fix old pinned sso crashing on dsh 0.1.5"
1018
+ zh: " dsh 0.1.5 网页/微信 401",
1019
+ en: "Fix dsh 0.1.5 web/WeChat 401"
1020
1020
  },
1021
1021
  items: [{
1022
- zh: "子包改依赖 sso@^0.1.18;cordis.patch 用包名加载 sso。请装 @0.1.66 并删 profiles/web/node_modules。",
1023
- en: "Subpackages depend on sso@^0.1.18; cordis.patch loads sso by package name. Install @0.1.66 and delete profiles/web/node_modules."
1022
+ zh: "suite 写入 ~/.dsh/dsh-web.url;wechat@0.1.19 ?token= 换 cookie 再 RPC。请装 @0.1.68,重启 dsh web,用终端打印的完整 URL 打开网页。",
1023
+ en: "Suite writes ~/.dsh/dsh-web.url; wechat@0.1.19 exchanges ?token= for a cookie before RPC. Install @0.1.68, restart dsh web, open the full printed URL."
1024
1024
  }]
1025
1025
  }]
1026
1026
  },
package/lib/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { createRequire } from "node:module";
2
2
  import { homedir } from "node:os";
3
3
  import { dirname, join, relative } from "node:path";
4
- import { REZ_CREDENTIAL_REFS, REZ_DEFAULT_CONNECTIONS, REZ_SYSTEMS, lastMcpStartError, loadRezConnections, mergeConnections, readManagedCredential, secretConfigured, startMcpWhenSecret, writeManagedCredential } from "@rezti/dsh-rez-sso";
5
4
  import { chmodSync, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, statSync, writeFileSync } from "node:fs";
5
+ import { REZ_CREDENTIAL_REFS, REZ_DEFAULT_CONNECTIONS, REZ_SYSTEMS, lastMcpStartError, loadRezConnections, mergeConnections, readManagedCredential, secretConfigured, startMcpWhenSecret, writeManagedCredential } from "@rezti/dsh-rez-sso";
6
6
  import { spawn, spawnSync } from "node:child_process";
7
7
  import { fileURLToPath } from "node:url";
8
8
  import { DatabaseSync } from "node:sqlite";
@@ -10185,6 +10185,24 @@ function apply(ctx, config) {
10185
10185
  }
10186
10186
  });
10187
10187
  });
10188
+ ctx.registry.inject(["connection"], (inner) => {
10189
+ const writeAuthUrl = () => {
10190
+ try {
10191
+ const port = ctx.webServer.port;
10192
+ const base = `http://127.0.0.1:${String(port)}`;
10193
+ const url = inner.connection.authenticatedUrl(base);
10194
+ const home = process.env.DSH_HOME ?? join(homedir(), ".dsh");
10195
+ mkdirSync(home, { recursive: true });
10196
+ writeFileSync(join(home, "dsh-web.url"), url + "\n", { mode: 384 });
10197
+ } catch (error) {
10198
+ console.warn("[dsh-rez-suite] could not write dsh-web.url:", error);
10199
+ }
10200
+ };
10201
+ writeAuthUrl();
10202
+ const timer = setInterval(writeAuthUrl, 6e4);
10203
+ timer.unref?.();
10204
+ return () => clearInterval(timer);
10205
+ });
10188
10206
  sync();
10189
10207
  }
10190
10208
  function joinTokenDb() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rezti/dsh-rez-suite",
3
- "description": "ReZ-TI one-package install for DeepSeek Harness. Update with: dsh plugin --profile web add @rezti/dsh-rez-suite@0.1.66",
4
- "version": "0.1.66",
3
+ "description": "ReZ-TI one-package install for DeepSeek Harness. Update with: dsh plugin --profile web add @rezti/dsh-rez-suite@0.1.68",
4
+ "version": "0.1.68",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": "^22.19.0 || >=24.0.0"
@@ -48,7 +48,7 @@
48
48
  "@rezti/dsh-rez-tapd": "^0.1.2",
49
49
  "@rezti/dsh-rez-token-manager": "^0.1.5",
50
50
  "@rezti/dsh-rez-vision": "^0.1.4",
51
- "@rezti/dsh-rez-wechat": "^0.1.18",
51
+ "@rezti/dsh-rez-wechat": "^0.1.19",
52
52
  "@rezti/dsh-web-file-uploader": "0.2.3",
53
53
  "@wecom/cli": "1.1.0",
54
54
  "zod": "^4.4.3"
package/src/changelog.ts CHANGED
@@ -21,15 +21,15 @@ export interface ChangelogRelease {
21
21
 
22
22
  export const SUITE_CHANGELOG: readonly ChangelogRelease[] = [
23
23
  {
24
- version: '0.1.66',
24
+ version: '0.1.68',
25
25
  date: '2026-09-13',
26
26
  sections: [
27
27
  {
28
- title: { zh: '修旧 sso 钉死导致 0.1.5 起不来', en: 'Fix old pinned sso crashing on dsh 0.1.5' },
28
+ title: { zh: ' dsh 0.1.5 网页/微信 401', en: 'Fix dsh 0.1.5 web/WeChat 401' },
29
29
  items: [
30
30
  {
31
- zh: '子包改依赖 sso@^0.1.18;cordis.patch 用包名加载 sso。请装 @0.1.66 并删 profiles/web/node_modules。',
32
- en: 'Subpackages depend on sso@^0.1.18; cordis.patch loads sso by package name. Install @0.1.66 and delete profiles/web/node_modules.',
31
+ zh: 'suite 写入 ~/.dsh/dsh-web.url;wechat@0.1.19 ?token= 换 cookie 再 RPC。请装 @0.1.68,重启 dsh web,用终端打印的完整 URL 打开网页。',
32
+ en: 'Suite writes ~/.dsh/dsh-web.url; wechat@0.1.19 exchanges ?token= for a cookie before RPC. Install @0.1.68, restart dsh web, open the full printed URL.',
33
33
  },
34
34
  ],
35
35
  },
package/src/index.ts CHANGED
@@ -10,7 +10,9 @@
10
10
  import type { Context } from '@deepseek-ai/cordis'
11
11
  import { homedir } from 'node:os'
12
12
  import { join } from 'node:path'
13
+ import { mkdirSync, writeFileSync } from 'node:fs'
13
14
  import type {} from '@deepseek-ai/dsh-settings'
15
+ import type {} from '@deepseek-ai/dsh-client-connection'
14
16
  import z from '@deepseek-ai/schemastery'
15
17
  import type {} from '@deepseek-ai/dsh-host-webserver'
16
18
  import type {} from '@deepseek-ai/dsh-system-prompt'
@@ -258,6 +260,26 @@ export function apply(ctx: Context, config?: RezConfig): void {
258
260
  })
259
261
  })
260
262
 
263
+ // dsh 0.1.5+ requires a per-process ?token= URL; write it for the WeChat bridge.
264
+ ctx.registry.inject(['connection'], (inner) => {
265
+ const writeAuthUrl = (): void => {
266
+ try {
267
+ const port = ctx.webServer.port
268
+ const base = `http://127.0.0.1:${String(port)}`
269
+ const url = inner.connection.authenticatedUrl(base)
270
+ const home = process.env.DSH_HOME ?? join(homedir(), '.dsh')
271
+ mkdirSync(home, { recursive: true })
272
+ writeFileSync(join(home, 'dsh-web.url'), url + '\n', { mode: 0o600 })
273
+ } catch (error) {
274
+ console.warn('[dsh-rez-suite] could not write dsh-web.url:', error)
275
+ }
276
+ }
277
+ writeAuthUrl()
278
+ const timer = setInterval(writeAuthUrl, 60_000)
279
+ timer.unref?.()
280
+ return () => clearInterval(timer)
281
+ })
282
+
261
283
  sync()
262
284
  }
263
285