-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
This issue was created from Discord post 1473270947413885040:
Workspace options like skills, instructions, model, tools, and memory all support dynamic functions that receive requestContext:
skills: (context) => { ... } // :white_check_mark: dynamicBut filesystem only accepts a static instance:
// no way to resolve dynamically per request
filesystem: new LocalFilesystem({
basePath: './workspace',
readOnly: false,
})Use case: We run a multi-role agent on a shared workspace. Each role should be scoped to a different filesystem root or have different read/write permissions. Today we're forced to create separate Workspace instances per role at the run time.
Requested: Allow filesystem to accept a function that receives requestContext, matching the pattern of every other dynamic option:
const workspace = new Workspace({
filesystem: ({ requestContext }) => {
const role = requestContext.get('agent-role');
return new LocalFilesystem({
basePath: `/workspaces/${role}`,
});
},
// ...
});This would let a single Workspace instance dynamically scope filesystem access per request different base paths, different permissions, or even different filesystem implementations (local vs S3).