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:
@@ -236,7 +236,7 @@ describe('GoodBuddy Harness internal control plane', () => {
|
||||
).toBeGreaterThan(180)
|
||||
})
|
||||
|
||||
it('blocks mutating and shell tools in Ask while allowing reads', async () => {
|
||||
it('allows only the known read-only tools in Ask', async () => {
|
||||
const { listeners, handle } = stubAgentContext()
|
||||
const executeTool = listeners.get('tools/execute')!
|
||||
const next = vi.fn(async () => ({
|
||||
@@ -249,13 +249,46 @@ describe('GoodBuddy Harness internal control plane', () => {
|
||||
agent: handle.agent
|
||||
})
|
||||
|
||||
for (const name of ['write', 'edit', 'bash', 'pwsh']) {
|
||||
for (const name of [
|
||||
'write',
|
||||
'edit',
|
||||
'bash',
|
||||
'pwsh',
|
||||
'third_party_deploy'
|
||||
]) {
|
||||
await expect(
|
||||
Promise.resolve(executeTool(request(name), next))
|
||||
).rejects.toThrow('Ask 模式不允许')
|
||||
}
|
||||
for (const name of ['read', 'skill']) {
|
||||
await expect(
|
||||
Promise.resolve(executeTool(request(name), next))
|
||||
).resolves.toMatchObject({ isError: false })
|
||||
}
|
||||
})
|
||||
|
||||
it('allows every registered tool in Execute', async () => {
|
||||
const { listeners, handle, internals } = stubAgentContext()
|
||||
internals.sessions.get('session-output')!.inflight.mode =
|
||||
'execute'
|
||||
const executeTool = listeners.get('tools/execute')!
|
||||
const next = vi.fn(async () => ({
|
||||
isError: false,
|
||||
value: {},
|
||||
content: []
|
||||
}))
|
||||
|
||||
await expect(
|
||||
Promise.resolve(executeTool(request('read'), next))
|
||||
Promise.resolve(
|
||||
executeTool(
|
||||
{
|
||||
name: 'third_party_deploy',
|
||||
agent: handle.agent
|
||||
},
|
||||
next
|
||||
)
|
||||
)
|
||||
).resolves.toMatchObject({ isError: false })
|
||||
expect(next).toHaveBeenCalledOnce()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user