fix: resolve import path issues in bash_execute tool

- Fix import path for sandbox-context from '../../../' to '../../'
- Resolves CI failures: 'Cannot find module ../../../context/sandbox-context'
- Fixes type resolution: sandbox variable now resolves to Sandbox type
- All unit tests pass (8/8) and lint passes locally

Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
This commit is contained in:
Devin AI 2025-07-22 14:28:28 +00:00
parent 9be8174945
commit 6a11f76490
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
import { RuntimeContext } from '@mastra/core/runtime-context'; import { RuntimeContext } from '@mastra/core/runtime-context';
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import { z } from 'zod'; import { z } from 'zod';
import { type SandboxContext, SandboxContextKey } from '../../../context/sandbox-context'; import { type SandboxContext, SandboxContextKey } from '../../context/sandbox-context';
import { bashExecute } from './bash-execute-tool'; import { bashExecute } from './bash-execute-tool';
vi.mock('@buster/sandbox', () => ({ vi.mock('@buster/sandbox', () => ({

View File

@ -3,7 +3,7 @@ import type { RuntimeContext } from '@mastra/core/runtime-context';
import { createTool } from '@mastra/core/tools'; import { createTool } from '@mastra/core/tools';
import { wrapTraced } from 'braintrust'; import { wrapTraced } from 'braintrust';
import { z } from 'zod'; import { z } from 'zod';
import { type SandboxContext, SandboxContextKey } from '../../../context/sandbox-context'; import { type SandboxContext, SandboxContextKey } from '../../context/sandbox-context';
const bashCommandSchema = z.object({ const bashCommandSchema = z.object({
command: z.string().describe('The bash command to execute'), command: z.string().describe('The bash command to execute'),