feat: add DSH plugin marketplace and shared MCP

GoodBuddy could share Skills across runtimes, but custom MCP remained limited and DeepSeek Harness could not manage third-party extensions. The app now provides a default-off DSH npm marketplace with managed installation, configuration, failure isolation, and packaged npm support, while assigned custom MCP is available to managed OpenCode, Continue Agent, and DeepSeek Harness in Execute.

Third-party DSH install scripts, initialization, and tools run with the current user's permissions. Ask remains read-only at dispatch, and turning off the marketplace hides management without disabling installed plugins.

Release note: 新增默认关闭的 DSH 插件市场,并让自定义 MCP 可分配给 OpenCode、Continue 和 DeepSeek Harness;安装第三方插件前会明确提示当前用户权限边界。
This commit is contained in:
mesalogo
2026-08-16 11:47:11 +08:00
parent 9e6f664e06
commit ff61b5f81d
67 changed files with 9337 additions and 443 deletions
@@ -45,12 +45,7 @@ const DELTA_BATCH_CHARACTERS = 4 * 1024
const DELTA_BATCH_INTERVAL_MS = 100
const MAX_SUMMARY_CHARACTERS = 4_000
const MAX_MCP_PROXY_RESULT_BYTES = 256 * 1024
const ASK_BLOCKED_TOOL_NAMES = new Set([
'bash',
'pwsh',
'write',
'edit'
])
const ASK_READ_ONLY_TOOL_NAMES = new Set(['read', 'skill'])
const GOODBUDDY_EXECUTION_GUIDANCE = [
'GoodBuddy controlled execution rules:',
'- In Execute mode, act through the available tools instead of writing a long implementation plan.',
@@ -656,10 +651,10 @@ export class GoodBuddyHarnessControlPlane {
record &&
record.handle.agent === exec.agent &&
record.inflight?.mode === 'ask' &&
ASK_BLOCKED_TOOL_NAMES.has(exec.name)
!ASK_READ_ONLY_TOOL_NAMES.has(exec.name)
) {
throw new Error(
`Ask 模式不允许执行修改或命令工具:${exec.name}`
`Ask 模式不允许执行非只读工具:${exec.name}`
)
}
return next()
@@ -710,7 +705,10 @@ export class GoodBuddyHarnessControlPlane {
type: 'tool',
callId: toolResult?.toolCallId ?? 'unknown-tool-call',
name: 'tool',
state: event.data.error ? 'failed' : 'completed',
state:
event.data.error || toolResult?.isError === true
? 'failed'
: 'completed',
output: boundedJson(event.data.message.content)
})
}