@mcviseron/dsh-qq-bridge 0.3.9 → 0.3.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/lib/index.js +4 -0
- package/lib/install.js +6 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -134,6 +134,7 @@ export function apply(ctx, rawConfig) {
|
|
|
134
134
|
detached: true,
|
|
135
135
|
stdio: 'ignore',
|
|
136
136
|
windowsHide: true,
|
|
137
|
+
creationflags: process.platform === 'win32' ? 0x08000000 : 0,
|
|
137
138
|
})
|
|
138
139
|
child.on('error', (error) => log(`bot supervisor spawn failed: ${error.message}`))
|
|
139
140
|
child.unref()
|
|
@@ -834,6 +835,9 @@ export function apply(ctx, rawConfig) {
|
|
|
834
835
|
detached: true,
|
|
835
836
|
stdio: 'ignore',
|
|
836
837
|
windowsHide: true,
|
|
838
|
+
// detached 会在 Windows 上给子进程一个新控制台,windowsHide 压不住它:
|
|
839
|
+
// 用户会看到一个黑窗口,关掉它就等于把机器人杀了。CREATE_NO_WINDOW 才真正无窗。
|
|
840
|
+
creationflags: process.platform === 'win32' ? 0x08000000 : 0,
|
|
837
841
|
})
|
|
838
842
|
child.on('error', (error) => log(`bot autostart failed: ${error.message}`))
|
|
839
843
|
child.unref()
|
package/lib/install.js
CHANGED
|
@@ -30,7 +30,12 @@ export function runCommand(command, args, options = {}) {
|
|
|
30
30
|
if (error) fail(error)
|
|
31
31
|
else done(value)
|
|
32
32
|
}
|
|
33
|
-
const child = spawn(command, args, {
|
|
33
|
+
const child = spawn(command, args, {
|
|
34
|
+
cwd: options.cwd,
|
|
35
|
+
windowsHide: true,
|
|
36
|
+
shell: false,
|
|
37
|
+
creationflags: process.platform === 'win32' ? 0x08000000 : 0,
|
|
38
|
+
})
|
|
34
39
|
const timer = setTimeout(() => {
|
|
35
40
|
child.kill()
|
|
36
41
|
settle(new Error(`${command} 超时(${options.timeoutMs ?? 120000}ms)`))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcviseron/dsh-qq-bridge",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.10",
|
|
4
4
|
"description": "DeepSeek Harness plugin: bridge QQ conversations (driven by an external viseron-botpy bot) to DSH sessions — injects user messages, captures assistant replies, streams C2C answers, and relays tool approvals to the bot owner.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|