@lijian-ui/dsh-im-gateway 0.2.2 → 0.2.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.
Files changed (3) hide show
  1. package/lib/client.js +2 -2
  2. package/lib/index.js +10 -4
  3. package/package.json +108 -108
package/lib/client.js CHANGED
@@ -1147,8 +1147,8 @@ window.__ModuleLoader__.load({
1147
1147
  message: result.error?.message ?? `${SERVICE}.${method} failed`
1148
1148
  };
1149
1149
  return {
1150
- ok: true,
1151
- ...result.value
1150
+ ...result.value,
1151
+ ok: true
1152
1152
  };
1153
1153
  } catch (err) {
1154
1154
  return {
package/lib/index.js CHANGED
@@ -4,7 +4,7 @@ import { installSettingsSection, settingsNamespace } from "@deepseek-ai/dsh-sett
4
4
  import { Service } from "@deepseek-ai/cordis";
5
5
  import Schema from "@deepseek-ai/schemastery";
6
6
  import { SessionId } from "@deepseek-ai/dsh-session";
7
- import { createUserMessage } from "@deepseek-ai/dsh-llm";
7
+ import { ReasoningEffortId, createUserMessage } from "@deepseek-ai/dsh-llm";
8
8
  import { installModelSelection } from "@deepseek-ai/dsh-agent";
9
9
  import { closeSync, existsSync, fsyncSync, linkSync, mkdirSync, openSync, readFileSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
10
10
  import crypto, { randomUUID } from "node:crypto";
@@ -1763,7 +1763,12 @@ var ImGatewayService = class extends Service {
1763
1763
  get current() {
1764
1764
  const override = gateway.modelOverrides.get(sessionId) ?? gateway.globalModelOverride;
1765
1765
  const base = defaults?.currentSelection();
1766
- return override ?? base ?? void 0;
1766
+ if (!override) return base ?? void 0;
1767
+ return {
1768
+ provider: override.provider,
1769
+ model: override.model,
1770
+ ...override.reasoningEffort === void 0 ? {} : { reasoningEffort: ReasoningEffortId(override.reasoningEffort) }
1771
+ };
1767
1772
  },
1768
1773
  set current(next) {
1769
1774
  if (next) gateway.modelOverrides.set(sessionId, {
@@ -4927,10 +4932,11 @@ function mergeStoredSecrets(current, incoming) {
4927
4932
  if (!stored) return inst;
4928
4933
  const config = { ...inst.config };
4929
4934
  for (const key of SECRET_KEYS) {
4930
- const value = config[key];
4935
+ const bag = config;
4936
+ const value = bag[key];
4931
4937
  if (value === "" || value === void 0) {
4932
4938
  const old = stored.config?.[key];
4933
- if (old !== void 0 && old !== "") config[key] = old;
4939
+ if (old !== void 0 && old !== "") bag[key] = old;
4934
4940
  }
4935
4941
  }
4936
4942
  return {
package/package.json CHANGED
@@ -1,108 +1,108 @@
1
- {
2
- "name": "@lijian-ui/dsh-im-gateway",
3
- "version": "0.2.2",
4
- "description": "Multi-channel IM gateway plugin for DeepSeek Harness (dsh): DingTalk / QQ / WeChat(iLink) with QR-scan binding, streaming replies, and a unified ctx.imGateway service. 为 DeepSeek Harness 提供钉钉/QQ/个人微信多 IM 通道接入。",
5
- "license": "MIT",
6
- "type": "module",
7
- "main": "lib/index.js",
8
- "types": "lib/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "types": "./lib/index.d.ts",
12
- "default": "./lib/index.js"
13
- },
14
- "./client": {
15
- "default": "./lib/client.js"
16
- },
17
- "./cordis.patch.yml": "./cordis.patch.yml",
18
- "./package.json": "./package.json"
19
- },
20
- "files": [
21
- "lib/**/*.js",
22
- "lib/**/*.d.ts",
23
- "cordis.patch.yml",
24
- "README.md",
25
- "README.en.md",
26
- "LICENSE"
27
- ],
28
- "scripts": {
29
- "build": "tsdown",
30
- "watch": "tsdown --watch",
31
- "typecheck": "tsc --noEmit",
32
- "test": "node --test tests/*.test.mjs",
33
- "prepare": "npm run build"
34
- },
35
- "keywords": [
36
- "deepseek-harness",
37
- "dsh",
38
- "dsh-plugin",
39
- "im-gateway",
40
- "dingtalk",
41
- "qq",
42
- "wechat",
43
- "weixin",
44
- "cordis"
45
- ],
46
- "repository": {
47
- "type": "git",
48
- "url": "git+https://github.com/lijian-ui/dsh-im-gateway.git"
49
- },
50
- "dsh": {
51
- "bundle": {
52
- "patch": "./cordis.patch.yml"
53
- },
54
- "client": {
55
- "inject": [
56
- "@deepseek-ai/dsh-client-runtime",
57
- "@deepseek-ai/dsh-client-locale",
58
- "@deepseek-ai/dsh-api-gateway"
59
- ],
60
- "platform": "web",
61
- "immediately": true
62
- }
63
- },
64
- "peerDependencies": {
65
- "@deepseek-ai/cordis": "*",
66
- "@deepseek-ai/schemastery": "*",
67
- "@deepseek-ai/dsh-agent": "0.1.0-rc.6",
68
- "@deepseek-ai/dsh-llm": "0.1.0-rc.6",
69
- "@deepseek-ai/dsh-session": "0.1.0-rc.6",
70
- "@deepseek-ai/dsh-settings": "*",
71
- "@deepseek-ai/dsh-typert-protocol": "*",
72
- "@deepseek-ai/dsh-user-approval": "0.1.0-rc.6",
73
- "@deepseek-ai/dsh-user-questions": "0.1.0-rc.6"
74
- },
75
- "dependencies": {
76
- "@tencent-connect/qqbot-connector": "^1.2.0",
77
- "@tencent-connect/qqbot-nodejs": "^1.0.4",
78
- "dingtalk-stream": "^2.1.5",
79
- "qrcode": "^1.5.4",
80
- "ws": "^8.18.0"
81
- },
82
- "devDependencies": {
83
- "@deepseek-ai/cordis": "4.0.1",
84
- "@deepseek-ai/schemastery": "3.18.1",
85
- "@deepseek-ai/dsh-agent": "0.1.0-rc.6",
86
- "@deepseek-ai/dsh-llm": "0.1.0-rc.6",
87
- "@deepseek-ai/dsh-session": "0.1.0-rc.6",
88
- "@deepseek-ai/dsh-settings": "0.1.0-rc.6",
89
- "@deepseek-ai/dsh-typert-protocol": "0.1.0-rc.6",
90
- "@deepseek-ai/dsh-user-approval": "0.1.0-rc.6",
91
- "@deepseek-ai/dsh-user-questions": "0.1.0-rc.6",
92
- "@deepseek-ai/dsh-client-connection": "0.1.0-rc.6",
93
- "@deepseek-ai/dsh-client-locale": "0.1.0-rc.6",
94
- "@deepseek-ai/dsh-client-runtime": "0.1.0-rc.6",
95
- "@deepseek-ai/dsh-client-schema-form": "0.1.0-rc.6",
96
- "@deepseek-ai/dsh-client-ui-slots": "0.1.0-rc.6",
97
- "@deepseek-ai/dsh-client-ui-settings": "0.1.0-rc.6",
98
- "@deepseek-ai/dsh-client-ui-settings-plugins": "0.1.0-rc.6",
99
- "@deepseek-ai/dsh-api-gateway": "0.1.0-rc.6",
100
- "@types/node": "^22.0.0",
101
- "@types/qrcode": "^1.5.5",
102
- "@types/react": "^18.3.0",
103
- "@types/ws": "^8.5.0",
104
- "react": "^18.2.0",
105
- "tsdown": "^0.12.0",
106
- "typescript": "^5.6.0"
107
- }
108
- }
1
+ {
2
+ "name": "@lijian-ui/dsh-im-gateway",
3
+ "version": "0.2.3",
4
+ "description": "Multi-channel IM gateway plugin for DeepSeek Harness (dsh): DingTalk / QQ / WeChat(iLink) with QR-scan binding, streaming replies, and a unified ctx.imGateway service. 为 DeepSeek Harness 提供钉钉/QQ/个人微信多 IM 通道接入。",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "lib/index.js",
8
+ "types": "lib/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./lib/index.d.ts",
12
+ "default": "./lib/index.js"
13
+ },
14
+ "./client": {
15
+ "default": "./lib/client.js"
16
+ },
17
+ "./cordis.patch.yml": "./cordis.patch.yml",
18
+ "./package.json": "./package.json"
19
+ },
20
+ "files": [
21
+ "lib/**/*.js",
22
+ "lib/**/*.d.ts",
23
+ "cordis.patch.yml",
24
+ "README.md",
25
+ "README.en.md",
26
+ "LICENSE"
27
+ ],
28
+ "scripts": {
29
+ "build": "tsdown",
30
+ "watch": "tsdown --watch",
31
+ "typecheck": "tsc --noEmit",
32
+ "test": "node --test tests/*.test.mjs",
33
+ "prepare": "npm run build"
34
+ },
35
+ "keywords": [
36
+ "deepseek-harness",
37
+ "dsh",
38
+ "dsh-plugin",
39
+ "im-gateway",
40
+ "dingtalk",
41
+ "qq",
42
+ "wechat",
43
+ "weixin",
44
+ "cordis"
45
+ ],
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "git+https://github.com/lijian-ui/dsh-im-gateway.git"
49
+ },
50
+ "dsh": {
51
+ "bundle": {
52
+ "patch": "./cordis.patch.yml"
53
+ },
54
+ "client": {
55
+ "inject": [
56
+ "@deepseek-ai/dsh-client-runtime",
57
+ "@deepseek-ai/dsh-client-locale",
58
+ "@deepseek-ai/dsh-api-gateway"
59
+ ],
60
+ "platform": "web",
61
+ "immediately": true
62
+ }
63
+ },
64
+ "peerDependencies": {
65
+ "@deepseek-ai/cordis": "*",
66
+ "@deepseek-ai/schemastery": "*",
67
+ "@deepseek-ai/dsh-agent": "0.1.1-rc.2 || 0.1.0-rc.8 || 0.1.0-rc.7 || 0.1.0-rc.6",
68
+ "@deepseek-ai/dsh-llm": "0.1.1-rc.2 || 0.1.0-rc.8 || 0.1.0-rc.7 || 0.1.0-rc.6",
69
+ "@deepseek-ai/dsh-session": "0.1.1-rc.2 || 0.1.0-rc.8 || 0.1.0-rc.7 || 0.1.0-rc.6",
70
+ "@deepseek-ai/dsh-settings": "*",
71
+ "@deepseek-ai/dsh-typert-protocol": "*",
72
+ "@deepseek-ai/dsh-user-approval": "0.1.1-rc.2 || 0.1.0-rc.8 || 0.1.0-rc.7 || 0.1.0-rc.6",
73
+ "@deepseek-ai/dsh-user-questions": "0.1.1-rc.2 || 0.1.0-rc.8 || 0.1.0-rc.7 || 0.1.0-rc.6"
74
+ },
75
+ "dependencies": {
76
+ "@tencent-connect/qqbot-connector": "^1.2.0",
77
+ "@tencent-connect/qqbot-nodejs": "^1.0.4",
78
+ "dingtalk-stream": "^2.1.5",
79
+ "qrcode": "^1.5.4",
80
+ "ws": "^8.18.0"
81
+ },
82
+ "devDependencies": {
83
+ "@deepseek-ai/cordis": "4.0.1",
84
+ "@deepseek-ai/dsh-agent": "0.1.1-rc.2",
85
+ "@deepseek-ai/dsh-api-gateway": "0.1.1-rc.2",
86
+ "@deepseek-ai/dsh-client-connection": "0.1.1-rc.2",
87
+ "@deepseek-ai/dsh-client-locale": "0.1.1-rc.2",
88
+ "@deepseek-ai/dsh-client-runtime": "0.1.1-rc.2",
89
+ "@deepseek-ai/dsh-client-ui-settings": "0.1.1-rc.2",
90
+ "@deepseek-ai/dsh-client-ui-settings-plugins": "0.1.1-rc.2",
91
+ "@deepseek-ai/dsh-client-ui-slots": "0.1.1-rc.2",
92
+ "@deepseek-ai/dsh-llm": "0.1.1-rc.2",
93
+ "@deepseek-ai/dsh-session": "0.1.1-rc.2",
94
+ "@deepseek-ai/dsh-settings": "0.1.1-rc.2",
95
+ "@deepseek-ai/dsh-typert-protocol": "0.1.1-rc.2",
96
+ "@deepseek-ai/dsh-typert-registry": "0.1.1-rc.2",
97
+ "@deepseek-ai/dsh-user-approval": "0.1.1-rc.2",
98
+ "@deepseek-ai/dsh-user-questions": "0.1.1-rc.2",
99
+ "@deepseek-ai/schemastery": "3.18.1",
100
+ "@types/node": "^22.0.0",
101
+ "@types/qrcode": "^1.5.5",
102
+ "@types/react": "^18.3.0",
103
+ "@types/ws": "^8.5.0",
104
+ "react": "^18.2.0",
105
+ "tsdown": "^0.12.0",
106
+ "typescript": "^5.6.0"
107
+ }
108
+ }