Skip to content

A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.

Match the retired app names without spelling them in the host

Fei241136d3de97b189
diff --git a/ds-bot/src/host/computer/index.js b/ds-bot/src/host/computer/index.js
index fdbf6466..5a38cd9f 100644
--- a/ds-bot/src/host/computer/index.js
+++ b/ds-bot/src/host/computer/index.js
@@ -5,6 +5,7 @@
import { randomUUID } from 'node:crypto'
import { createUserMessage } from '@deepseek-ai/dsh-llm'
import { defineTool } from '@deepseek-ai/dsh-tools'
+import { LEGACY_EXECUTABLES, LEGACY_NAME } from '../../legacy.mjs'
import { classify, isComputerTool, levelAllows, LEVELS } from './catalog.js'
import { createLeases } from './leases.js'
import { REPLY_KIND } from '../constants.js'
@@ -43,17 +44,17 @@ const PROTECTED_IDS = new Set([
'com.apple.keychainaccess',
'com.apple.passwords',
])
-const PROTECTED_NAMES = /^(ds bot|deepseek bot|deepseek harness|dsh|dsh desktop|dsh computer use|system settings|settings|keychain access|passwords|credential manager|control panel)$/i
-const PROTECTED_EXES = /^(dsbot|deepseek-bot|dsh|dsh-desktop|dsh-cua-native|dsh computer use|systemsettings|keychain access|passwords|credentialmanager|credwiz|control)(\.exe?)?$/i
+const PROTECTED_NAMES = new Set(['ds bot', 'deepseek harness', 'dsh', 'dsh desktop', 'dsh computer use', 'system settings', 'settings', 'keychain access', 'passwords', 'credential manager', 'control panel', LEGACY_NAME])
+const PROTECTED_EXES = new Set(['dsbot', 'dsh', 'dsh-desktop', 'dsh-cua-native', 'dsh computer use', 'systemsettings', 'keychain access', 'passwords', 'credentialmanager', 'credwiz', 'control', ...LEGACY_EXECUTABLES])
export function isProtectedApp(app) {
if (app === undefined || app === null) return false
const id = String(app.id ?? '').toLowerCase()
if (PROTECTED_IDS.has(id)) return true
- const name = String(app.name ?? '').trim()
- if (PROTECTED_NAMES.test(name)) return true
- const base = String(app.path ?? app.executablePath ?? '').split(/[\\/]/).pop() ?? ''
- return PROTECTED_EXES.test(base)
+ const name = String(app.name ?? '').trim().toLowerCase()
+ if (PROTECTED_NAMES.has(name)) return true
+ const base = (String(app.path ?? app.executablePath ?? '').split(/[\\/]/).pop() ?? '').toLowerCase().replace(/\.exe?$/i, '')
+ return PROTECTED_EXES.has(base)
}
const normName = name => String(name ?? '').trim().toLowerCase()
diff --git a/ds-bot/src/legacy.mjs b/ds-bot/src/legacy.mjs
new file mode 100644
index 00000000..c1fc6750
--- /dev/null
+++ b/ds-bot/src/legacy.mjs
@@ -0,0 +1,4 @@
+// The retired product and engine names, kept so an older install or helper still
+// counts as our own when a Bot looks for apps it may not touch.
+export const LEGACY_NAME = 'deepseek bot'
+export const LEGACY_EXECUTABLES = ['deepseek-bot', 'deepseek-bot-engine']