Skip to content

Commit 5eaa295

Browse files
committed
feat: add mainWorkspace configuration
- Introduced mainWorkspace in workspaces.ts to define the main workspace configuration. - Updated index.ts to utilize mainWorkspace in the Mastra instance.
1 parent 580c621 commit 5eaa295

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

src/mastra/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { PostgresStore } from '@mastra/pg'
1111
// Config
1212
import { log } from './config/logger'
1313
import { pgVector } from './config/pg-storage'
14+
import { mainWorkspace } from "./workspaces"
1415

1516
// Scorers
1617
// Scorers are attached to agents where appropriate (see src/mastra/evals/AGENTS.md for mapping)
@@ -154,6 +155,7 @@ import {
154155
} from './evals/scorers/custom-scorers'
155156
import type { OpenAIResponsesProviderOptions } from '@ai-sdk/openai'
156157
export const mastra = new Mastra({
158+
workspace: mainWorkspace,
157159
workflows: {
158160
weatherWorkflow,
159161
contentStudioWorkflow,

src/mastra/workspaces.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Workspace, LocalFilesystem, LocalSandbox } from '@mastra/core/workspace';
2+
3+
export const mainWorkspace = new Workspace({
4+
id: "main-Workspace",
5+
name: "MainWorkspace",
6+
filesystem: new LocalFilesystem({
7+
id: 'filesystem',
8+
basePath: './workspace',
9+
}),
10+
sandbox: new LocalSandbox({
11+
id: 'sandbox',
12+
workingDirectory: './workspace',
13+
}),
14+
skills: ['/skills'],
15+
});

0 commit comments

Comments
 (0)