Skip to content

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

Ask about a folder in the team workspace by its real path too

Fei24115fa9fa516777
diff --git a/ds-bot/src/host/folders.js b/ds-bot/src/host/folders.js
index 78fb1f5d..6b91b8d3 100644
--- a/ds-bot/src/host/folders.js
+++ b/ds-bot/src/host/folders.js
@@ -84,7 +84,7 @@ export function install(rt) {
// `sessions` are the Sessions that would work there; the default policy counts too,
// since the Sessions made there later start under it. Throws when it is not allowed.
async function approveFolder(exec, { path, sessions = [], who }) {
- const team = teamFolder()
+ const team = await realTeam()
const policy = ctx.get?.('sandboxPolicy')
if (path === undefined || (team !== undefined && within(path, team)) || policy === undefined) return
const agents = await Promise.all(sessions.map(id => rt.resolveAgent(id)))
diff --git a/ds-bot/test/work-dir.test.js b/ds-bot/test/work-dir.test.js
index a5e0167c..d9461702 100644
--- a/ds-bot/test/work-dir.test.js
+++ b/ds-bot/test/work-dir.test.js
@@ -735,17 +735,23 @@ test('the folder is checked as DSH gets it, spaces and all', { skip: process.pla
test('a Bot changes back to the team workspace when the team workspace is known by a link', async (t) => {
const { service } = folderService()
- const { requests, services } = approvalServices('allowed-once')
+ const { requests, services } = approvalServices('rejected')
const { ctx, call, agentOf, root, team, project, state, stop } = await start({ services: { ...services, workingDirectory: service } })
t.after(stop)
const link = join(root, 'team-link')
symlinkSync(team, link, 'junction')
ctx.workspaceRegistry.get('w1').path = link
+ mkdirSync(join(team, 'site'))
+ // The team workspace widens nothing, so nobody is asked, also for a folder inside it.
assert.equal((await call('update-bot', { id: 'b', workDir: project })).ok, true)
await until(() => state().bots.b.sessionId === 's1')
+ assert.equal((await changeDirectory(ctx, service, agentOf('s1'), join(team, 'site'))).ran, true)
+ assert.equal(state().bots.b.workDir, join(team, 'site'))
+
+ assert.equal((await call('update-bot', { id: 'b', workDir: project })).ok, true)
+ await until(() => state().bots.b.workDir === project)
const back = await changeDirectory(ctx, service, agentOf('s1'), team)
assert.equal(back.ran, true)
assert.equal(state().bots.b.workDir, undefined)
- // The user set the first folder, and the team workspace widens nothing, so nobody is asked.
assert.equal(requests.length, 0)
})