mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-02 03:53:18 +00:00
chore: Bump daytona dep (#423)
* chore: Bump daytona dep * cr * cr * feat: missing deps
This commit is contained in:
parent
d51af805e2
commit
d2e981e219
6 changed files with 1409 additions and 124 deletions
|
|
@ -23,7 +23,9 @@
|
|||
"postinstall": "turbo build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@daytonaio/sdk": "^0.18.1",
|
||||
"@aws-sdk/client-s3": "^3.845.0",
|
||||
"@aws-sdk/lib-storage": "^3.845.0",
|
||||
"@daytonaio/sdk": "^0.23.0",
|
||||
"@langchain/anthropic": "^0.3.20",
|
||||
"@langchain/community": "^0.3.47",
|
||||
"@langchain/core": "^0.3.56",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { SNAPSHOT_NAME } from "@open-swe/shared/constants";
|
||||
import { CreateSandboxParams } from "@daytonaio/sdk";
|
||||
import { CreateSandboxFromImageParams } from "@daytonaio/sdk";
|
||||
|
||||
export const DEFAULT_SANDBOX_CREATE_PARAMS: CreateSandboxParams = {
|
||||
export const DEFAULT_SANDBOX_CREATE_PARAMS: CreateSandboxFromImageParams = {
|
||||
resources: {
|
||||
cpu: 2,
|
||||
memory: 4,
|
||||
|
|
@ -9,6 +9,7 @@ export const DEFAULT_SANDBOX_CREATE_PARAMS: CreateSandboxParams = {
|
|||
},
|
||||
user: "daytona",
|
||||
image: SNAPSHOT_NAME,
|
||||
autoDeleteInterval: 15, // delete after 15 minutes
|
||||
};
|
||||
|
||||
export const LANGGRAPH_USER_PERMISSIONS = [
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ import { createLogger, LogLevel } from "../logger.js";
|
|||
import { GraphConfig, TargetRepository } from "@open-swe/shared/open-swe/types";
|
||||
import { TIMEOUT_SEC } from "@open-swe/shared/constants";
|
||||
import { getSandboxErrorFields } from "../sandbox-error-fields.js";
|
||||
import { ExecuteResponse } from "@daytonaio/sdk/dist/types/ExecuteResponse.js";
|
||||
import { getRepoAbsolutePath } from "@open-swe/shared/git";
|
||||
import { ExecuteResponse } from "@daytonaio/sdk/src/types/ExecuteResponse.js";
|
||||
|
||||
class ExecuteCommandError extends Error {
|
||||
command: string;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { ExecuteResponse } from "@daytonaio/sdk/dist/types/ExecuteResponse.js";
|
||||
import { ExecuteResponse } from "@daytonaio/sdk/src/types/ExecuteResponse.js";
|
||||
|
||||
export function getSandboxErrorFields(
|
||||
error: unknown,
|
||||
|
|
|
|||
|
|
@ -33,11 +33,11 @@ export function daytonaClient(): Daytona {
|
|||
export async function stopSandbox(sandboxSessionId: string): Promise<string> {
|
||||
const sandbox = await daytonaClient().get(sandboxSessionId);
|
||||
if (
|
||||
sandbox.instance.state == SandboxState.STOPPED ||
|
||||
sandbox.instance.state == SandboxState.ARCHIVED
|
||||
sandbox.state === SandboxState.STOPPED ||
|
||||
sandbox.state === SandboxState.ARCHIVED
|
||||
) {
|
||||
return sandboxSessionId;
|
||||
} else if (sandbox.instance.state == "started") {
|
||||
} else if (sandbox.state === "started") {
|
||||
await daytonaClient().stop(sandbox);
|
||||
}
|
||||
|
||||
|
|
@ -85,8 +85,7 @@ export async function getSandboxWithErrorHandling(
|
|||
const sandbox = await daytonaClient().get(sandboxSessionId);
|
||||
|
||||
// Check sandbox state
|
||||
const sandboxInfo = await sandbox.info();
|
||||
const state = sandboxInfo.state;
|
||||
const state = sandbox.state;
|
||||
|
||||
if (state === "started") {
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue