fix: Rename from open-swe to openswe (#809)

* fix: Rename from open-swe to openswe

* del tmp file, format and lint
This commit is contained in:
Brace Sproul 2025-08-27 12:33:26 -07:00 • committed by GitHub
parent 46d795c41b
commit 504be7c563
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
168 changed files with 446 additions and 450 deletions

View file

@ -2,7 +2,7 @@
- Always use Yarn as the package manager - never use npm or other package managers - Always use Yarn as the package manager - never use npm or other package managers
- Run all general commands (e.g. not for starting a server) from the repository root using Turbo orchestration (yarn build, yarn lint, yarn format) - Run all general commands (e.g. not for starting a server) from the repository root using Turbo orchestration (yarn build, yarn lint, yarn format)
- Before creating new utilities or shared functions, search in packages/shared/src to see if one already exists - Before creating new utilities or shared functions, search in packages/shared/src to see if one already exists
- When importing from the shared package, use the @open-swe/shared namespace with specific module paths - When importing from the shared package, use the @openswe/shared namespace with specific module paths
- Follow strict TypeScript practices - the codebase uses strict mode across all packages - Follow strict TypeScript practices - the codebase uses strict mode across all packages
- Use ESLint and Prettier for code quality - run yarn lint:fix and yarn format before committing - Use ESLint and Prettier for code quality - run yarn lint:fix and yarn format before committing
- Console logging is prohibited in the open-swe app (ESLint error) - use the `createLogger` function to create a new logger instance instead - Console logging is prohibited in the open-swe app (ESLint error) - use the `createLogger` function to create a new logger instance instead
@ -26,7 +26,7 @@ This is a Yarn workspace monorepo with Turbo build orchestration containing thre
**packages/shared**: Common utilities package **packages/shared**: Common utilities package
- Central workspace dependency providing shared types, constants, and utilities - Central workspace dependency providing shared types, constants, and utilities
- Exports modules via @open-swe/shared namespace (e.g., @open-swe/shared/open-swe/types) - Exports modules via @openswe/shared namespace (e.g., @openswe/shared/open-swe/types)
- Must be built before other packages can import from it - Must be built before other packages can import from it
- Contains crypto utilities, GraphState types, and open-swe specific modules - Contains crypto utilities, GraphState types, and open-swe specific modules
@ -49,7 +49,7 @@ This is a Yarn workspace monorepo with Turbo build orchestration containing thre
- TypeScript with strict mode across all packages - TypeScript with strict mode across all packages
- Jest with ts-jest for testing framework - Jest with ts-jest for testing framework
**Workspace Structure**: Dependencies are managed on a per-package basis, meaning dependencies should only be installed in their specific app/package. Individual packages reference the shared package via @open-swe/shared workspace dependency. **Workspace Structure**: Dependencies are managed on a per-package basis, meaning dependencies should only be installed in their specific app/package. Individual packages reference the shared package via @openswe/shared workspace dependency.
</dependencies_and_installation> </dependencies_and_installation>
<testing_instructions> <testing_instructions>

View file

@ -1,5 +1,5 @@
{ {
"name": "@open-swe/cli", "name": "@openswe/cli",
"version": "0.0.0", "version": "0.0.0",
"license": "MIT", "license": "MIT",
"private": true, "private": true,
@ -18,7 +18,7 @@
}, },
"dependencies": { "dependencies": {
"@langchain/langgraph-sdk": "^0.0.95", "@langchain/langgraph-sdk": "^0.0.95",
"@open-swe/shared": "*", "@openswe/shared": "*",
"commander": "^12.0.0", "commander": "^12.0.0",
"dotenv": "^16.6.1", "dotenv": "^16.6.1",
"ink": "^6.0.1", "ink": "^6.0.1",

View file

@ -6,8 +6,8 @@ import {
isToolMessage, isToolMessage,
} from "@langchain/core/messages"; } from "@langchain/core/messages";
import { getMessageContentString } from "@open-swe/shared/messages"; import { getMessageContentString } from "@openswe/shared/messages";
import { createWriteTechnicalNotesToolFields } from "@open-swe/shared/open-swe/tools"; import { createWriteTechnicalNotesToolFields } from "@openswe/shared/open-swe/tools";
export type ToolCall = { export type ToolCall = {
name: string; name: string;

View file

@ -1,5 +1,5 @@
import { Client, StreamMode } from "@langchain/langgraph-sdk"; import { Client, StreamMode } from "@langchain/langgraph-sdk";
import { LOCAL_MODE_HEADER } from "@open-swe/shared/constants"; import { LOCAL_MODE_HEADER } from "@openswe/shared/constants";
import { formatDisplayLog } from "./logger.js"; import { formatDisplayLog } from "./logger.js";
const LANGGRAPH_URL = process.env.LANGGRAPH_URL || "http://localhost:2024"; const LANGGRAPH_URL = process.env.LANGGRAPH_URL || "http://localhost:2024";

View file

@ -7,7 +7,7 @@ import {
OPEN_SWE_STREAM_MODE, OPEN_SWE_STREAM_MODE,
LOCAL_MODE_HEADER, LOCAL_MODE_HEADER,
OPEN_SWE_V2_GRAPH_ID, OPEN_SWE_V2_GRAPH_ID,
} from "@open-swe/shared/constants"; } from "@openswe/shared/constants";
import { formatDisplayLog } from "./logger.js"; import { formatDisplayLog } from "./logger.js";
const LANGGRAPH_URL = process.env.LANGGRAPH_URL || "http://localhost:2024"; const LANGGRAPH_URL = process.env.LANGGRAPH_URL || "http://localhost:2024";

View file

@ -1,5 +1,5 @@
{ {
"name": "@open-swe/docs", "name": "@openswe/docs",
"author": "LangChain", "author": "LangChain",
"repository": "https://github.com/langchain-ai/open-swe", "repository": "https://github.com/langchain-ai/open-swe",
"private": true, "private": true,

View file

@ -36,7 +36,7 @@ The monorepo is organized into two main directories:
- Centralized location for shared types, constants, and utilities - Centralized location for shared types, constants, and utilities
- Used by both the agent and web applications - Used by both the agent and web applications
- Exports modules via `@open-swe/shared` namespace - Exports modules via `@openswe/shared` namespace
- Contains crypto utilities, GraphState types, and Open SWE specific modules - Contains crypto utilities, GraphState types, and Open SWE specific modules
<Note> <Note>
@ -134,7 +134,7 @@ The `apps/open-swe` package includes a critical `postinstall` hook:
### Why This Matters ### Why This Matters
1. **Deployment Compatibility**: The LangGraph Platform needs all dependencies built and available 1. **Deployment Compatibility**: The LangGraph Platform needs all dependencies built and available
2. **Shared Package Access**: The agent imports utilities from `@open-swe/shared` which must be compiled 2. **Shared Package Access**: The agent imports utilities from `@openswe/shared` which must be compiled
3. **Build Order**: Ensures the shared package is built before the agent attempts to use it 3. **Build Order**: Ensures the shared package is built before the agent attempts to use it
<Tip> <Tip>

View file

@ -1,5 +1,5 @@
{ {
"name": "@open-swe/agent-v2", "name": "@openswe/agent-v2",
"homepage": "https://github.com/langchain-ai/open-swe/blob/main/README.md", "homepage": "https://github.com/langchain-ai/open-swe/blob/main/README.md",
"repository": { "repository": {
"type": "git", "type": "git",
@ -24,7 +24,7 @@
}, },
"dependencies": { "dependencies": {
"@langchain/core": "^0.3.65", "@langchain/core": "^0.3.65",
"@open-swe/shared": "*", "@openswe/shared": "*",
"deepagents": "0.0.0-rc.2" "deepagents": "0.0.0-rc.2"
}, },
"devDependencies": { "devDependencies": {

View file

@ -2,7 +2,7 @@ import "@langchain/langgraph/zod";
import { ChatAnthropic } from "@langchain/anthropic"; import { ChatAnthropic } from "@langchain/anthropic";
import { z } from "zod"; import { z } from "zod";
import { StructuredOutputParser } from "@langchain/core/output_parsers"; import { StructuredOutputParser } from "@langchain/core/output_parsers";
import { getMessageContentString } from "@open-swe/shared/messages"; import { getMessageContentString } from "@openswe/shared/messages";
export const CommandSafetyValidationSchema = z.object({ export const CommandSafetyValidationSchema = z.object({
is_safe: z.boolean().describe("Whether the command is safe to execute"), is_safe: z.boolean().describe("Whether the command is safe to execute"),

View file

@ -2,11 +2,11 @@ import "dotenv/config";
import { OpenSWEInput, CodeTestDetails } from "./open-swe-types.js"; import { OpenSWEInput, CodeTestDetails } from "./open-swe-types.js";
import { Daytona, Sandbox } from "@daytonaio/sdk"; import { Daytona, Sandbox } from "@daytonaio/sdk";
import { createLogger, LogLevel } from "../src/utils/logger.js"; import { createLogger, LogLevel } from "../src/utils/logger.js";
import { TIMEOUT_SEC } from "@open-swe/shared/constants"; import { TIMEOUT_SEC } from "@openswe/shared/constants";
import { DEFAULT_SANDBOX_CREATE_PARAMS } from "../src/constants.js"; import { DEFAULT_SANDBOX_CREATE_PARAMS } from "../src/constants.js";
import { TargetRepository } from "@open-swe/shared/open-swe/types"; import { TargetRepository } from "@openswe/shared/open-swe/types";
import { cloneRepo } from "../src/utils/github/git.js"; import { cloneRepo } from "../src/utils/github/git.js";
import { getRepoAbsolutePath } from "@open-swe/shared/git"; import { getRepoAbsolutePath } from "@openswe/shared/git";
import { SimpleEvaluationResult } from "langsmith/vitest"; import { SimpleEvaluationResult } from "langsmith/vitest";
import { runRuffLint, runMyPyTypeCheck } from "./tests.js"; import { runRuffLint, runMyPyTypeCheck } from "./tests.js";
import { setupEnv, ENV_CONSTANTS } from "../src/utils/env-setup.js"; import { setupEnv, ENV_CONSTANTS } from "../src/utils/env-setup.js";

View file

@ -5,12 +5,12 @@ import * as ls from "langsmith/vitest";
import { formatInputs } from "./prompts.js"; import { formatInputs } from "./prompts.js";
import { createLogger, LogLevel } from "../src/utils/logger.js"; import { createLogger, LogLevel } from "../src/utils/logger.js";
import { evaluator } from "./evaluator.js"; import { evaluator } from "./evaluator.js";
import { MANAGER_GRAPH_ID, GITHUB_PAT } from "@open-swe/shared/constants"; import { MANAGER_GRAPH_ID, GITHUB_PAT } from "@openswe/shared/constants";
import { createLangGraphClient } from "../src/utils/langgraph-client.js"; import { createLangGraphClient } from "../src/utils/langgraph-client.js";
import { encryptSecret } from "@open-swe/shared/crypto"; import { encryptSecret } from "@openswe/shared/crypto";
import { ManagerGraphState } from "@open-swe/shared/open-swe/manager/types"; import { ManagerGraphState } from "@openswe/shared/open-swe/manager/types";
import { PlannerGraphState } from "@open-swe/shared/open-swe/planner/types"; import { PlannerGraphState } from "@openswe/shared/open-swe/planner/types";
import { GraphState } from "@open-swe/shared/open-swe/types"; import { GraphState } from "@openswe/shared/open-swe/types";
import { withRetry } from "./utils/retry.js"; import { withRetry } from "./utils/retry.js";
const logger = createLogger(LogLevel.DEBUG, "Evaluator"); const logger = createLogger(LogLevel.DEBUG, "Evaluator");

View file

@ -1,8 +1,8 @@
import { OpenSWEInput } from "./open-swe-types.js"; import { OpenSWEInput } from "./open-swe-types.js";
import { TargetRepository } from "@open-swe/shared/open-swe/types"; import { TargetRepository } from "@openswe/shared/open-swe/types";
import { HumanMessage } from "@langchain/core/messages"; import { HumanMessage } from "@langchain/core/messages";
import { Octokit } from "@octokit/rest"; import { Octokit } from "@octokit/rest";
import { ManagerGraphUpdate } from "@open-swe/shared/open-swe/manager/types"; import { ManagerGraphUpdate } from "@openswe/shared/open-swe/manager/types";
async function getRepoReadmeContents( async function getRepoReadmeContents(
targetRepository: TargetRepository, targetRepository: TargetRepository,

View file

@ -5,8 +5,8 @@ import { createLogger, LogLevel } from "../src/utils/logger.js";
import { DEFAULT_SANDBOX_CREATE_PARAMS } from "../src/constants.js"; import { DEFAULT_SANDBOX_CREATE_PARAMS } from "../src/constants.js";
import { readFileSync } from "fs"; import { readFileSync } from "fs";
import { cloneRepo, checkoutFilesFromCommit } from "../src/utils/github/git.js"; import { cloneRepo, checkoutFilesFromCommit } from "../src/utils/github/git.js";
import { TargetRepository } from "@open-swe/shared/open-swe/types"; import { TargetRepository } from "@openswe/shared/open-swe/types";
import { getRepoAbsolutePath } from "@open-swe/shared/git"; import { getRepoAbsolutePath } from "@openswe/shared/git";
import { setupEnv } from "../src/utils/env-setup.js"; import { setupEnv } from "../src/utils/env-setup.js";
import { PRData, PRProcessResult } from "./types.js"; import { PRData, PRProcessResult } from "./types.js";
import { runPytestOnFiles } from "./utils.js"; import { runPytestOnFiles } from "./utils.js";

View file

@ -1,5 +1,5 @@
{ {
"name": "@open-swe/agent", "name": "@openswe/agent",
"homepage": "https://github.com/langchain-ai/open-swe/blob/main/README.md", "homepage": "https://github.com/langchain-ai/open-swe/blob/main/README.md",
"repository": { "repository": {
"type": "git", "type": "git",
@ -38,7 +38,7 @@
"@octokit/core": "^7.0.2", "@octokit/core": "^7.0.2",
"@octokit/rest": "^22.0.0", "@octokit/rest": "^22.0.0",
"@octokit/webhooks": "^14.0.2", "@octokit/webhooks": "^14.0.2",
"@open-swe/shared": "*", "@openswe/shared": "*",
"bcrypt": "^6.0.0", "bcrypt": "^6.0.0",
"diff": "^8.0.1", "diff": "^8.0.1",
"hono": "^4.8.3", "hono": "^4.8.3",

View file

@ -1,8 +1,8 @@
/* eslint-disable no-console */ /* eslint-disable no-console */
import "dotenv/config"; import "dotenv/config";
import { Client } from "@langchain/langgraph-sdk"; import { Client } from "@langchain/langgraph-sdk";
import { ManagerGraphState } from "@open-swe/shared/open-swe/manager/types"; import { ManagerGraphState } from "@openswe/shared/open-swe/manager/types";
import { PlannerGraphState } from "@open-swe/shared/open-swe/planner/types"; import { PlannerGraphState } from "@openswe/shared/open-swe/planner/types";
interface TraceUrls { interface TraceUrls {
managerTraceUrl: string; managerTraceUrl: string;

View file

@ -12,7 +12,7 @@ import {
calculateConversationHistoryTokenCount, calculateConversationHistoryTokenCount,
getMessagesSinceLastSummary, getMessagesSinceLastSummary,
} from "../utils/tokens.js"; } from "../utils/tokens.js";
import { GraphState } from "@open-swe/shared/open-swe/types"; import { GraphState } from "@openswe/shared/open-swe/types";
describe("calculateConversationHistoryTokenCount", () => { describe("calculateConversationHistoryTokenCount", () => {
it("should return 0 for empty messages array", async () => { it("should return 0 for empty messages array", async () => {

View file

@ -1,4 +1,4 @@
import { DAYTONA_SNAPSHOT_NAME } from "@open-swe/shared/constants"; import { DAYTONA_SNAPSHOT_NAME } from "@openswe/shared/constants";
import { CreateSandboxFromSnapshotParams } from "@daytonaio/sdk"; import { CreateSandboxFromSnapshotParams } from "@daytonaio/sdk";
export const DEFAULT_SANDBOX_CREATE_PARAMS: CreateSandboxFromSnapshotParams = { export const DEFAULT_SANDBOX_CREATE_PARAMS: CreateSandboxFromSnapshotParams = {

View file

@ -1,6 +1,6 @@
import { END, START, StateGraph } from "@langchain/langgraph"; import { END, START, StateGraph } from "@langchain/langgraph";
import { GraphConfiguration } from "@open-swe/shared/open-swe/types"; import { GraphConfiguration } from "@openswe/shared/open-swe/types";
import { ManagerGraphStateObj } from "@open-swe/shared/open-swe/manager/types"; import { ManagerGraphStateObj } from "@openswe/shared/open-swe/manager/types";
import { import {
initializeGithubIssue, initializeGithubIssue,
classifyMessage, classifyMessage,

View file

@ -1,8 +1,8 @@
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { import {
ManagerGraphState, ManagerGraphState,
ManagerGraphUpdate, ManagerGraphUpdate,
} from "@open-swe/shared/open-swe/manager/types"; } from "@openswe/shared/open-swe/manager/types";
import { createLangGraphClient } from "../../../../utils/langgraph-client.js"; import { createLangGraphClient } from "../../../../utils/langgraph-client.js";
import { import {
BaseMessage, BaseMessage,
@ -15,9 +15,9 @@ import {
loadModel, loadModel,
supportsParallelToolCallsParam, supportsParallelToolCallsParam,
} from "../../../../utils/llms/index.js"; } from "../../../../utils/llms/index.js";
import { LLMTask } from "@open-swe/shared/open-swe/llm-task"; import { LLMTask } from "@openswe/shared/open-swe/llm-task";
import { Command, END } from "@langchain/langgraph"; import { Command, END } from "@langchain/langgraph";
import { getMessageContentString } from "@open-swe/shared/messages"; import { getMessageContentString } from "@openswe/shared/messages";
import { import {
createIssue, createIssue,
createIssueComment, createIssueComment,
@ -36,14 +36,14 @@ import { HumanResponse } from "@langchain/langgraph/prebuilt";
import { import {
OPEN_SWE_STREAM_MODE, OPEN_SWE_STREAM_MODE,
PLANNER_GRAPH_ID, PLANNER_GRAPH_ID,
} from "@open-swe/shared/constants"; } from "@openswe/shared/constants";
import { createLogger, LogLevel } from "../../../../utils/logger.js"; import { createLogger, LogLevel } from "../../../../utils/logger.js";
import { createClassificationPromptAndToolSchema } from "./utils.js"; import { createClassificationPromptAndToolSchema } from "./utils.js";
import { RequestSource } from "../../../../constants.js"; import { RequestSource } from "../../../../constants.js";
import { StreamMode, Thread } from "@langchain/langgraph-sdk"; import { StreamMode, Thread } from "@langchain/langgraph-sdk";
import { isLocalMode } from "@open-swe/shared/open-swe/local-mode"; import { isLocalMode } from "@openswe/shared/open-swe/local-mode";
import { PlannerGraphState } from "@open-swe/shared/open-swe/planner/types"; import { PlannerGraphState } from "@openswe/shared/open-swe/planner/types";
import { GraphState } from "@open-swe/shared/open-swe/types"; import { GraphState } from "@openswe/shared/open-swe/types";
import { Client } from "@langchain/langgraph-sdk"; import { Client } from "@langchain/langgraph-sdk";
import { shouldCreateIssue } from "../../../../utils/should-create-issue.js"; import { shouldCreateIssue } from "../../../../utils/should-create-issue.js";
const logger = createLogger(LogLevel.INFO, "ClassifyMessage"); const logger = createLogger(LogLevel.INFO, "ClassifyMessage");

View file

@ -1,4 +1,4 @@
import { TaskPlan } from "@open-swe/shared/open-swe/types"; import { TaskPlan } from "@openswe/shared/open-swe/types";
import { import {
AIMessage, AIMessage,
BaseMessage, BaseMessage,
@ -10,13 +10,13 @@ import {
import { z } from "zod"; import { z } from "zod";
import { removeLastHumanMessage } from "../../../../utils/message/modify-array.js"; import { removeLastHumanMessage } from "../../../../utils/message/modify-array.js";
import { formatPlanPrompt } from "../../../../utils/plan-prompt.js"; import { formatPlanPrompt } from "../../../../utils/plan-prompt.js";
import { getActivePlanItems } from "@open-swe/shared/open-swe/tasks"; import { getActivePlanItems } from "@openswe/shared/open-swe/tasks";
import { import {
getHumanMessageString, getHumanMessageString,
getToolMessageString, getToolMessageString,
getUnknownMessageString, getUnknownMessageString,
} from "../../../../utils/message/content.js"; } from "../../../../utils/message/content.js";
import { getMessageContentString } from "@open-swe/shared/messages"; import { getMessageContentString } from "@openswe/shared/messages";
import { ThreadStatus } from "@langchain/langgraph-sdk"; import { ThreadStatus } from "@langchain/langgraph-sdk";
import { import {
CLASSIFICATION_SYSTEM_PROMPT, CLASSIFICATION_SYSTEM_PROMPT,

View file

@ -1,9 +1,9 @@
import { v4 as uuidv4 } from "uuid"; import { v4 as uuidv4 } from "uuid";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { import {
ManagerGraphState, ManagerGraphState,
ManagerGraphUpdate, ManagerGraphUpdate,
} from "@open-swe/shared/open-swe/manager/types"; } from "@openswe/shared/open-swe/manager/types";
import { createIssueFieldsFromMessages } from "../utils/generate-issue-fields.js"; import { createIssueFieldsFromMessages } from "../utils/generate-issue-fields.js";
import { import {
GITHUB_INSTALLATION_ID, GITHUB_INSTALLATION_ID,
@ -12,7 +12,7 @@ import {
LOCAL_MODE_HEADER, LOCAL_MODE_HEADER,
MANAGER_GRAPH_ID, MANAGER_GRAPH_ID,
OPEN_SWE_STREAM_MODE, OPEN_SWE_STREAM_MODE,
} from "@open-swe/shared/constants"; } from "@openswe/shared/constants";
import { createLangGraphClient } from "../../../utils/langgraph-client.js"; import { createLangGraphClient } from "../../../utils/langgraph-client.js";
import { createIssue } from "../../../utils/github/api.js"; import { createIssue } from "../../../utils/github/api.js";
import { getGitHubTokensFromConfig } from "../../../utils/github-tokens.js"; import { getGitHubTokensFromConfig } from "../../../utils/github-tokens.js";
@ -26,9 +26,9 @@ import {
} from "../../../utils/github/issue-messages.js"; } from "../../../utils/github/issue-messages.js";
import { getBranchName } from "../../../utils/github/git.js"; import { getBranchName } from "../../../utils/github/git.js";
import { getDefaultHeaders } from "../../../utils/default-headers.js"; import { getDefaultHeaders } from "../../../utils/default-headers.js";
import { getCustomConfigurableFields } from "@open-swe/shared/open-swe/utils/config"; import { getCustomConfigurableFields } from "@openswe/shared/open-swe/utils/config";
import { StreamMode } from "@langchain/langgraph-sdk"; import { StreamMode } from "@langchain/langgraph-sdk";
import { isLocalMode } from "@open-swe/shared/open-swe/local-mode"; import { isLocalMode } from "@openswe/shared/open-swe/local-mode";
import { regenerateInstallationToken } from "../../../utils/github/regenerate-token.js"; import { regenerateInstallationToken } from "../../../utils/github/regenerate-token.js";
import { createLogger, LogLevel } from "../../../utils/logger.js"; import { createLogger, LogLevel } from "../../../utils/logger.js";
import { shouldCreateIssue } from "../../../utils/should-create-issue.js"; import { shouldCreateIssue } from "../../../utils/should-create-issue.js";

View file

@ -1,15 +1,15 @@
import { v4 as uuidv4 } from "uuid"; import { v4 as uuidv4 } from "uuid";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { import {
ManagerGraphState, ManagerGraphState,
ManagerGraphUpdate, ManagerGraphUpdate,
} from "@open-swe/shared/open-swe/manager/types"; } from "@openswe/shared/open-swe/manager/types";
import { getGitHubTokensFromConfig } from "../../../utils/github-tokens.js"; import { getGitHubTokensFromConfig } from "../../../utils/github-tokens.js";
import { HumanMessage, isHumanMessage } from "@langchain/core/messages"; import { HumanMessage, isHumanMessage } from "@langchain/core/messages";
import { getIssue } from "../../../utils/github/api.js"; import { getIssue } from "../../../utils/github/api.js";
import { extractTasksFromIssueContent } from "../../../utils/github/issue-task.js"; import { extractTasksFromIssueContent } from "../../../utils/github/issue-task.js";
import { getMessageContentFromIssue } from "../../../utils/github/issue-messages.js"; import { getMessageContentFromIssue } from "../../../utils/github/issue-messages.js";
import { isLocalMode } from "@open-swe/shared/open-swe/local-mode"; import { isLocalMode } from "@openswe/shared/open-swe/local-mode";
/** /**
* The initialize function will do nothing if there's already a human message * The initialize function will do nothing if there's already a human message

View file

@ -1,10 +1,10 @@
import { v4 as uuidv4 } from "uuid"; import { v4 as uuidv4 } from "uuid";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { isLocalMode } from "@open-swe/shared/open-swe/local-mode"; import { isLocalMode } from "@openswe/shared/open-swe/local-mode";
import { import {
ManagerGraphState, ManagerGraphState,
ManagerGraphUpdate, ManagerGraphUpdate,
} from "@open-swe/shared/open-swe/manager/types"; } from "@openswe/shared/open-swe/manager/types";
import { createLangGraphClient } from "../../../utils/langgraph-client.js"; import { createLangGraphClient } from "../../../utils/langgraph-client.js";
import { import {
OPEN_SWE_STREAM_MODE, OPEN_SWE_STREAM_MODE,
@ -13,12 +13,12 @@ import {
GITHUB_INSTALLATION_ID, GITHUB_INSTALLATION_ID,
GITHUB_INSTALLATION_TOKEN_COOKIE, GITHUB_INSTALLATION_TOKEN_COOKIE,
GITHUB_PAT, GITHUB_PAT,
} from "@open-swe/shared/constants"; } from "@openswe/shared/constants";
import { createLogger, LogLevel } from "../../../utils/logger.js"; import { createLogger, LogLevel } from "../../../utils/logger.js";
import { getBranchName } from "../../../utils/github/git.js"; import { getBranchName } from "../../../utils/github/git.js";
import { PlannerGraphUpdate } from "@open-swe/shared/open-swe/planner/types"; import { PlannerGraphUpdate } from "@openswe/shared/open-swe/planner/types";
import { getDefaultHeaders } from "../../../utils/default-headers.js"; import { getDefaultHeaders } from "../../../utils/default-headers.js";
import { getCustomConfigurableFields } from "@open-swe/shared/open-swe/utils/config"; import { getCustomConfigurableFields } from "@openswe/shared/open-swe/utils/config";
import { getRecentUserRequest } from "../../../utils/user-request.js"; import { getRecentUserRequest } from "../../../utils/user-request.js";
import { StreamMode } from "@langchain/langgraph-sdk"; import { StreamMode } from "@langchain/langgraph-sdk";
import { regenerateInstallationToken } from "../../../utils/github/regenerate-token.js"; import { regenerateInstallationToken } from "../../../utils/github/regenerate-token.js";

View file

@ -1,11 +1,11 @@
import { BaseMessage } from "@langchain/core/messages"; import { BaseMessage } from "@langchain/core/messages";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { z } from "zod"; import { z } from "zod";
import { import {
loadModel, loadModel,
supportsParallelToolCallsParam, supportsParallelToolCallsParam,
} from "../../../utils/llms/index.js"; } from "../../../utils/llms/index.js";
import { LLMTask } from "@open-swe/shared/open-swe/llm-task"; import { LLMTask } from "@openswe/shared/open-swe/llm-task";
import { getMessageString } from "../../../utils/message/content.js"; import { getMessageString } from "../../../utils/message/content.js";
export async function createIssueFieldsFromMessages( export async function createIssueFieldsFromMessages(

View file

@ -2,8 +2,8 @@ import { END, START, StateGraph } from "@langchain/langgraph";
import { import {
PlannerGraphState, PlannerGraphState,
PlannerGraphStateObj, PlannerGraphStateObj,
} from "@open-swe/shared/open-swe/planner/types"; } from "@openswe/shared/open-swe/planner/types";
import { GraphConfiguration } from "@open-swe/shared/open-swe/types"; import { GraphConfiguration } from "@openswe/shared/open-swe/types";
import { import {
generateAction, generateAction,
generatePlan, generatePlan,

View file

@ -2,18 +2,18 @@ import { Command } from "@langchain/langgraph";
import { import {
PlannerGraphState, PlannerGraphState,
PlannerGraphUpdate, PlannerGraphUpdate,
} from "@open-swe/shared/open-swe/planner/types"; } from "@openswe/shared/open-swe/planner/types";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { z } from "zod"; import { z } from "zod";
import { import {
loadModel, loadModel,
supportsParallelToolCallsParam, supportsParallelToolCallsParam,
} from "../../../utils/llms/index.js"; } from "../../../utils/llms/index.js";
import { LLMTask } from "@open-swe/shared/open-swe/llm-task"; import { LLMTask } from "@openswe/shared/open-swe/llm-task";
import { getMissingMessages } from "../../../utils/github/issue-messages.js"; import { getMissingMessages } from "../../../utils/github/issue-messages.js";
import { getMessageString } from "../../../utils/message/content.js"; import { getMessageString } from "../../../utils/message/content.js";
import { isHumanMessage } from "@langchain/core/messages"; import { isHumanMessage } from "@langchain/core/messages";
import { getMessageContentString } from "@open-swe/shared/messages"; import { getMessageContentString } from "@openswe/shared/messages";
import { filterHiddenMessages } from "../../../utils/message/filter-hidden.js"; import { filterHiddenMessages } from "../../../utils/message/filter-hidden.js";
import { createLogger, LogLevel } from "../../../utils/logger.js"; import { createLogger, LogLevel } from "../../../utils/logger.js";
import { trackCachePerformance } from "../../../utils/caching.js"; import { trackCachePerformance } from "../../../utils/caching.js";

View file

@ -3,7 +3,7 @@ import {
loadModel, loadModel,
supportsParallelToolCallsParam, supportsParallelToolCallsParam,
} from "../../../../utils/llms/index.js"; } from "../../../../utils/llms/index.js";
import { LLMTask } from "@open-swe/shared/open-swe/llm-task"; import { LLMTask } from "@openswe/shared/open-swe/llm-task";
import { import {
createGetURLContentTool, createGetURLContentTool,
createShellTool, createShellTool,
@ -12,20 +12,20 @@ import {
import { import {
PlannerGraphState, PlannerGraphState,
PlannerGraphUpdate, PlannerGraphUpdate,
} from "@open-swe/shared/open-swe/planner/types"; } from "@openswe/shared/open-swe/planner/types";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { createLogger, LogLevel } from "../../../../utils/logger.js"; import { createLogger, LogLevel } from "../../../../utils/logger.js";
import { getMessageContentString } from "@open-swe/shared/messages"; import { getMessageContentString } from "@openswe/shared/messages";
import { import {
formatFollowupMessagePrompt, formatFollowupMessagePrompt,
isFollowupRequest, isFollowupRequest,
} from "../../utils/followup.js"; } from "../../utils/followup.js";
import { SYSTEM_PROMPT } from "./prompt.js"; import { SYSTEM_PROMPT } from "./prompt.js";
import { getRepoAbsolutePath } from "@open-swe/shared/git"; import { getRepoAbsolutePath } from "@openswe/shared/git";
import { import {
isLocalMode, isLocalMode,
getLocalWorkingDirectory, getLocalWorkingDirectory,
} from "@open-swe/shared/open-swe/local-mode"; } from "@openswe/shared/open-swe/local-mode";
import { getMissingMessages } from "../../../../utils/github/issue-messages.js"; import { getMissingMessages } from "../../../../utils/github/issue-messages.js";
import { getPlansFromIssue } from "../../../../utils/github/issue-task.js"; import { getPlansFromIssue } from "../../../../utils/github/issue-task.js";
import { createGrepTool } from "../../../../tools/grep.js"; import { createGrepTool } from "../../../../tools/grep.js";

View file

@ -1,16 +1,16 @@
import { v4 as uuidv4 } from "uuid"; import { v4 as uuidv4 } from "uuid";
import { isAIMessage, ToolMessage } from "@langchain/core/messages"; import { isAIMessage, ToolMessage } from "@langchain/core/messages";
import { createSessionPlanToolFields } from "../../../../tools/index.js"; import { createSessionPlanToolFields } from "../../../../tools/index.js";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { import {
loadModel, loadModel,
supportsParallelToolCallsParam, supportsParallelToolCallsParam,
} from "../../../../utils/llms/index.js"; } from "../../../../utils/llms/index.js";
import { LLMTask } from "@open-swe/shared/open-swe/llm-task"; import { LLMTask } from "@openswe/shared/open-swe/llm-task";
import { import {
PlannerGraphState, PlannerGraphState,
PlannerGraphUpdate, PlannerGraphUpdate,
} from "@open-swe/shared/open-swe/planner/types"; } from "@openswe/shared/open-swe/planner/types";
import { formatUserRequestPrompt } from "../../../../utils/user-request.js"; import { formatUserRequestPrompt } from "../../../../utils/user-request.js";
import { import {
formatFollowupMessagePrompt, formatFollowupMessagePrompt,
@ -21,11 +21,11 @@ import { z } from "zod";
import { formatCustomRulesPrompt } from "../../../../utils/custom-rules.js"; import { formatCustomRulesPrompt } from "../../../../utils/custom-rules.js";
import { getScratchpad } from "../../utils/scratchpad-notes.js"; import { getScratchpad } from "../../utils/scratchpad-notes.js";
import { SCRATCHPAD_PROMPT, SYSTEM_PROMPT } from "./prompt.js"; import { SCRATCHPAD_PROMPT, SYSTEM_PROMPT } from "./prompt.js";
import { DO_NOT_RENDER_ID_PREFIX } from "@open-swe/shared/constants"; import { DO_NOT_RENDER_ID_PREFIX } from "@openswe/shared/constants";
import { filterMessagesWithoutContent } from "../../../../utils/message/content.js"; import { filterMessagesWithoutContent } from "../../../../utils/message/content.js";
import { getModelManager } from "../../../../utils/llms/model-manager.js"; import { getModelManager } from "../../../../utils/llms/model-manager.js";
import { trackCachePerformance } from "../../../../utils/caching.js"; import { trackCachePerformance } from "../../../../utils/caching.js";
import { isLocalMode } from "@open-swe/shared/open-swe/local-mode"; import { isLocalMode } from "@openswe/shared/open-swe/local-mode";
function formatSystemPrompt(state: PlannerGraphState): string { function formatSystemPrompt(state: PlannerGraphState): string {
// It's a followup if there's more than one human message. // It's a followup if there's more than one human message.

View file

@ -1,22 +1,22 @@
import { v4 as uuidv4 } from "uuid"; import { v4 as uuidv4 } from "uuid";
import { z } from "zod"; import { z } from "zod";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { import {
PlannerGraphState, PlannerGraphState,
PlannerGraphUpdate, PlannerGraphUpdate,
} from "@open-swe/shared/open-swe/planner/types"; } from "@openswe/shared/open-swe/planner/types";
import { import {
loadModel, loadModel,
supportsParallelToolCallsParam, supportsParallelToolCallsParam,
} from "../../../utils/llms/index.js"; } from "../../../utils/llms/index.js";
import { LLMTask } from "@open-swe/shared/open-swe/llm-task"; import { LLMTask } from "@openswe/shared/open-swe/llm-task";
import { getMessageString } from "../../../utils/message/content.js"; import { getMessageString } from "../../../utils/message/content.js";
import { formatUserRequestPrompt } from "../../../utils/user-request.js"; import { formatUserRequestPrompt } from "../../../utils/user-request.js";
import { formatCustomRulesPrompt } from "../../../utils/custom-rules.js"; import { formatCustomRulesPrompt } from "../../../utils/custom-rules.js";
import { getScratchpad } from "../utils/scratchpad-notes.js"; import { getScratchpad } from "../utils/scratchpad-notes.js";
import { ToolMessage } from "@langchain/core/messages"; import { ToolMessage } from "@langchain/core/messages";
import { DO_NOT_RENDER_ID_PREFIX } from "@open-swe/shared/constants"; import { DO_NOT_RENDER_ID_PREFIX } from "@openswe/shared/constants";
import { createWriteTechnicalNotesToolFields } from "@open-swe/shared/open-swe/tools"; import { createWriteTechnicalNotesToolFields } from "@openswe/shared/open-swe/tools";
import { trackCachePerformance } from "../../../utils/caching.js"; import { trackCachePerformance } from "../../../utils/caching.js";
import { getModelManager } from "../../../utils/llms/model-manager.js"; import { getModelManager } from "../../../utils/llms/model-manager.js";

View file

@ -1,7 +1,7 @@
import { import {
PlannerGraphState, PlannerGraphState,
PlannerGraphUpdate, PlannerGraphUpdate,
} from "@open-swe/shared/open-swe/planner/types"; } from "@openswe/shared/open-swe/planner/types";
import { Command } from "@langchain/langgraph"; import { Command } from "@langchain/langgraph";
import { getGitHubTokensFromConfig } from "../../../utils/github-tokens.js"; import { getGitHubTokensFromConfig } from "../../../utils/github-tokens.js";
import { getIssue, getIssueComments } from "../../../utils/github/api.js"; import { getIssue, getIssueComments } from "../../../utils/github/api.js";
@ -13,14 +13,14 @@ import {
isHumanMessage, isHumanMessage,
RemoveMessage, RemoveMessage,
} from "@langchain/core/messages"; } from "@langchain/core/messages";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { import {
getMessageContentFromIssue, getMessageContentFromIssue,
getUntrackedComments, getUntrackedComments,
} from "../../../utils/github/issue-messages.js"; } from "../../../utils/github/issue-messages.js";
import { filterHiddenMessages } from "../../../utils/message/filter-hidden.js"; import { filterHiddenMessages } from "../../../utils/message/filter-hidden.js";
import { DO_NOT_RENDER_ID_PREFIX } from "@open-swe/shared/constants"; import { DO_NOT_RENDER_ID_PREFIX } from "@openswe/shared/constants";
import { isLocalMode } from "@open-swe/shared/open-swe/local-mode"; import { isLocalMode } from "@openswe/shared/open-swe/local-mode";
import { shouldCreateIssue } from "../../../utils/should-create-issue.js"; import { shouldCreateIssue } from "../../../utils/should-create-issue.js";
export async function prepareGraphState( export async function prepareGraphState(

View file

@ -7,14 +7,14 @@ import {
GraphConfig, GraphConfig,
TaskPlan, TaskPlan,
PlanItem, PlanItem,
} from "@open-swe/shared/open-swe/types"; } from "@openswe/shared/open-swe/types";
import { import {
ActionRequest, ActionRequest,
HumanInterrupt, HumanInterrupt,
HumanResponse, HumanResponse,
} from "@langchain/langgraph/prebuilt"; } from "@langchain/langgraph/prebuilt";
import { getSandboxWithErrorHandling } from "../../../utils/sandbox.js"; import { getSandboxWithErrorHandling } from "../../../utils/sandbox.js";
import { createNewTask } from "@open-swe/shared/open-swe/tasks"; import { createNewTask } from "@openswe/shared/open-swe/tasks";
import { import {
getInitialUserRequest, getInitialUserRequest,
getRecentUserRequest, getRecentUserRequest,
@ -29,8 +29,8 @@ import {
GITHUB_INSTALLATION_ID, GITHUB_INSTALLATION_ID,
GITHUB_INSTALLATION_TOKEN_COOKIE, GITHUB_INSTALLATION_TOKEN_COOKIE,
GITHUB_PAT, GITHUB_PAT,
} from "@open-swe/shared/constants"; } from "@openswe/shared/constants";
import { PlannerGraphState } from "@open-swe/shared/open-swe/planner/types"; import { PlannerGraphState } from "@openswe/shared/open-swe/planner/types";
import { createLangGraphClient } from "../../../utils/langgraph-client.js"; import { createLangGraphClient } from "../../../utils/langgraph-client.js";
import { import {
addProposedPlanToIssue, addProposedPlanToIssue,
@ -40,10 +40,10 @@ import { createLogger, LogLevel } from "../../../utils/logger.js";
import { import {
ACCEPTED_PLAN_NODE_ID, ACCEPTED_PLAN_NODE_ID,
CustomNodeEvent, CustomNodeEvent,
} from "@open-swe/shared/open-swe/custom-node-events"; } from "@openswe/shared/open-swe/custom-node-events";
import { getDefaultHeaders } from "../../../utils/default-headers.js"; import { getDefaultHeaders } from "../../../utils/default-headers.js";
import { getCustomConfigurableFields } from "@open-swe/shared/open-swe/utils/config"; import { getCustomConfigurableFields } from "@openswe/shared/open-swe/utils/config";
import { isLocalMode } from "@open-swe/shared/open-swe/local-mode"; import { isLocalMode } from "@openswe/shared/open-swe/local-mode";
import { import {
postGitHubIssueComment, postGitHubIssueComment,
cleanTaskItems, cleanTaskItems,

View file

@ -7,17 +7,17 @@ import {
import { import {
isLocalMode, isLocalMode,
getLocalWorkingDirectory, getLocalWorkingDirectory,
} from "@open-swe/shared/open-swe/local-mode"; } from "@openswe/shared/open-swe/local-mode";
import { import {
createGetURLContentTool, createGetURLContentTool,
createShellTool, createShellTool,
createSearchDocumentForTool, createSearchDocumentForTool,
} from "../../../tools/index.js"; } from "../../../tools/index.js";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { import {
PlannerGraphState, PlannerGraphState,
PlannerGraphUpdate, PlannerGraphUpdate,
} from "@open-swe/shared/open-swe/planner/types"; } from "@openswe/shared/open-swe/planner/types";
import { createLogger, LogLevel } from "../../../utils/logger.js"; import { createLogger, LogLevel } from "../../../utils/logger.js";
import { import {
safeSchemaToString, safeSchemaToString,
@ -29,14 +29,14 @@ import {
getChangedFilesStatus, getChangedFilesStatus,
stashAndClearChanges, stashAndClearChanges,
} from "../../../utils/github/git.js"; } from "../../../utils/github/git.js";
import { getRepoAbsolutePath } from "@open-swe/shared/git"; import { getRepoAbsolutePath } from "@openswe/shared/git";
import { createScratchpadTool } from "../../../tools/scratchpad.js"; import { createScratchpadTool } from "../../../tools/scratchpad.js";
import { getMcpTools } from "../../../utils/mcp-client.js"; import { getMcpTools } from "../../../utils/mcp-client.js";
import { getSandboxWithErrorHandling } from "../../../utils/sandbox.js"; import { getSandboxWithErrorHandling } from "../../../utils/sandbox.js";
import { shouldDiagnoseError } from "../../../utils/tool-message-error.js"; import { shouldDiagnoseError } from "../../../utils/tool-message-error.js";
import { Command } from "@langchain/langgraph"; import { Command } from "@langchain/langgraph";
import { filterHiddenMessages } from "../../../utils/message/filter-hidden.js"; import { filterHiddenMessages } from "../../../utils/message/filter-hidden.js";
import { DO_NOT_RENDER_ID_PREFIX } from "@open-swe/shared/constants"; import { DO_NOT_RENDER_ID_PREFIX } from "@openswe/shared/constants";
import { processToolCallContent } from "../../../utils/tool-output-processing.js"; import { processToolCallContent } from "../../../utils/tool-output-processing.js";
import { createViewTool } from "../../../tools/builtin-tools/view.js"; import { createViewTool } from "../../../tools/builtin-tools/view.js";

View file

@ -1,5 +1,5 @@
import { getActivePlanItems } from "@open-swe/shared/open-swe/tasks"; import { getActivePlanItems } from "@openswe/shared/open-swe/tasks";
import { TaskPlan } from "@open-swe/shared/open-swe/types"; import { TaskPlan } from "@openswe/shared/open-swe/types";
const previousCompletedPlanPrompt = `Here is the list of tasks from the previous session. You've already completed all of these tasks. Use the tasks, and task summaries as context when generating a new plan: const previousCompletedPlanPrompt = `Here is the list of tasks from the previous session. You've already completed all of these tasks. Use the tasks, and task summaries as context when generating a new plan:
{PREVIOUS_PLAN} {PREVIOUS_PLAN}

View file

@ -1,5 +1,5 @@
import { BaseMessage, isAIMessage } from "@langchain/core/messages"; import { BaseMessage, isAIMessage } from "@langchain/core/messages";
import { createScratchpadFields } from "@open-swe/shared/open-swe/tools"; import { createScratchpadFields } from "@openswe/shared/open-swe/tools";
import z from "zod"; import z from "zod";
export function getScratchpad(messages: BaseMessage[]): string[] { export function getScratchpad(messages: BaseMessage[]): string[] {

View file

@ -4,7 +4,7 @@ import {
GraphConfig, GraphConfig,
GraphConfiguration, GraphConfiguration,
GraphState, GraphState,
} from "@open-swe/shared/open-swe/types"; } from "@openswe/shared/open-swe/types";
import { import {
generateAction, generateAction,
takeAction, takeAction,
@ -20,8 +20,8 @@ import { BaseMessage, isAIMessage } from "@langchain/core/messages";
import { initializeSandbox } from "../shared/initialize-sandbox.js"; import { initializeSandbox } from "../shared/initialize-sandbox.js";
import { graph as reviewerGraph } from "../reviewer/index.js"; import { graph as reviewerGraph } from "../reviewer/index.js";
import { getRemainingPlanItems } from "../../utils/current-task.js"; import { getRemainingPlanItems } from "../../utils/current-task.js";
import { getActivePlanItems } from "@open-swe/shared/open-swe/tasks"; import { getActivePlanItems } from "@openswe/shared/open-swe/tasks";
import { createMarkTaskCompletedToolFields } from "@open-swe/shared/open-swe/tools"; import { createMarkTaskCompletedToolFields } from "@openswe/shared/open-swe/tools";
function lastMessagesMissingToolCalls( function lastMessagesMissingToolCalls(
messages: BaseMessage[], messages: BaseMessage[],

View file

@ -9,23 +9,23 @@ import {
GraphState, GraphState,
GraphUpdate, GraphUpdate,
PlanItem, PlanItem,
} from "@open-swe/shared/open-swe/types"; } from "@openswe/shared/open-swe/types";
import { createDiagnoseErrorToolFields } from "@open-swe/shared/open-swe/tools"; import { createDiagnoseErrorToolFields } from "@openswe/shared/open-swe/tools";
import { formatPlanPromptWithSummaries } from "../../../utils/plan-prompt.js"; import { formatPlanPromptWithSummaries } from "../../../utils/plan-prompt.js";
import { getMessageString } from "../../../utils/message/content.js"; import { getMessageString } from "../../../utils/message/content.js";
import { getMessageContentString } from "@open-swe/shared/messages"; import { getMessageContentString } from "@openswe/shared/messages";
import { import {
loadModel, loadModel,
supportsParallelToolCallsParam, supportsParallelToolCallsParam,
} from "../../../utils/llms/index.js"; } from "../../../utils/llms/index.js";
import { LLMTask } from "@open-swe/shared/open-swe/llm-task"; import { LLMTask } from "@openswe/shared/open-swe/llm-task";
import { z } from "zod"; import { z } from "zod";
import { createLogger, LogLevel } from "../../../utils/logger.js"; import { createLogger, LogLevel } from "../../../utils/logger.js";
import { import {
getCompletedPlanItems, getCompletedPlanItems,
getCurrentPlanItem, getCurrentPlanItem,
} from "../../../utils/current-task.js"; } from "../../../utils/current-task.js";
import { getActivePlanItems } from "@open-swe/shared/open-swe/tasks"; import { getActivePlanItems } from "@openswe/shared/open-swe/tasks";
const logger = createLogger(LogLevel.INFO, "DiagnoseError"); const logger = createLogger(LogLevel.INFO, "DiagnoseError");

View file

@ -3,10 +3,10 @@ import {
GraphState, GraphState,
GraphUpdate, GraphUpdate,
PlanItem, PlanItem,
} from "@open-swe/shared/open-swe/types"; } from "@openswe/shared/open-swe/types";
import { loadModel } from "../../../utils/llms/index.js"; import { loadModel } from "../../../utils/llms/index.js";
import { LLMTask } from "@open-swe/shared/open-swe/llm-task"; import { LLMTask } from "@openswe/shared/open-swe/llm-task";
import { getMessageContentString } from "@open-swe/shared/messages"; import { getMessageContentString } from "@openswe/shared/messages";
import { getMessageString } from "../../../utils/message/content.js"; import { getMessageString } from "../../../utils/message/content.js";
import { createLogger, LogLevel } from "../../../utils/logger.js"; import { createLogger, LogLevel } from "../../../utils/logger.js";
import { formatUserRequestPrompt } from "../../../utils/user-request.js"; import { formatUserRequestPrompt } from "../../../utils/user-request.js";
@ -14,11 +14,11 @@ import {
completeTask, completeTask,
getActivePlanItems, getActivePlanItems,
getActiveTask, getActiveTask,
} from "@open-swe/shared/open-swe/tasks"; } from "@openswe/shared/open-swe/tasks";
import { addTaskPlanToIssue } from "../../../utils/github/issue-task.js"; import { addTaskPlanToIssue } from "../../../utils/github/issue-task.js";
import { trackCachePerformance } from "../../../utils/caching.js"; import { trackCachePerformance } from "../../../utils/caching.js";
import { getModelManager } from "../../../utils/llms/model-manager.js"; import { getModelManager } from "../../../utils/llms/model-manager.js";
import { isLocalMode } from "@open-swe/shared/open-swe/local-mode"; import { isLocalMode } from "@openswe/shared/open-swe/local-mode";
import { Command, END } from "@langchain/langgraph"; import { Command, END } from "@langchain/langgraph";
const logger = createLogger(LogLevel.INFO, "GenerateConclusionNode"); const logger = createLogger(LogLevel.INFO, "GenerateConclusionNode");

View file

@ -4,14 +4,14 @@ import {
GraphConfig, GraphConfig,
GraphUpdate, GraphUpdate,
TaskPlan, TaskPlan,
} from "@open-swe/shared/open-swe/types"; } from "@openswe/shared/open-swe/types";
import { import {
getModelManager, getModelManager,
loadModel, loadModel,
Provider, Provider,
supportsParallelToolCallsParam, supportsParallelToolCallsParam,
} from "../../../../utils/llms/index.js"; } from "../../../../utils/llms/index.js";
import { LLMTask } from "@open-swe/shared/open-swe/llm-task"; import { LLMTask } from "@openswe/shared/open-swe/llm-task";
import { import {
createShellTool, createShellTool,
createApplyPatchTool, createApplyPatchTool,
@ -25,8 +25,8 @@ import { formatPlanPrompt } from "../../../../utils/plan-prompt.js";
import { stopSandbox } from "../../../../utils/sandbox.js"; import { stopSandbox } from "../../../../utils/sandbox.js";
import { createLogger, LogLevel } from "../../../../utils/logger.js"; import { createLogger, LogLevel } from "../../../../utils/logger.js";
import { getCurrentPlanItem } from "../../../../utils/current-task.js"; import { getCurrentPlanItem } from "../../../../utils/current-task.js";
import { getMessageContentString } from "@open-swe/shared/messages"; import { getMessageContentString } from "@openswe/shared/messages";
import { getActivePlanItems } from "@open-swe/shared/open-swe/tasks"; import { getActivePlanItems } from "@openswe/shared/open-swe/tasks";
import { import {
CODE_REVIEW_PROMPT, CODE_REVIEW_PROMPT,
DEPENDENCIES_INSTALLED_PROMPT, DEPENDENCIES_INSTALLED_PROMPT,
@ -35,7 +35,7 @@ import {
STATIC_ANTHROPIC_SYSTEM_INSTRUCTIONS, STATIC_ANTHROPIC_SYSTEM_INSTRUCTIONS,
STATIC_SYSTEM_INSTRUCTIONS, STATIC_SYSTEM_INSTRUCTIONS,
} from "./prompt.js"; } from "./prompt.js";
import { getRepoAbsolutePath } from "@open-swe/shared/git"; import { getRepoAbsolutePath } from "@openswe/shared/git";
import { getMissingMessages } from "../../../../utils/github/issue-messages.js"; import { getMissingMessages } from "../../../../utils/github/issue-messages.js";
import { getPlansFromIssue } from "../../../../utils/github/issue-task.js"; import { getPlansFromIssue } from "../../../../utils/github/issue-task.js";
import { createGrepTool } from "../../../../tools/grep.js"; import { createGrepTool } from "../../../../tools/grep.js";
@ -52,7 +52,7 @@ import {
convertMessagesToCacheControlledMessages, convertMessagesToCacheControlledMessages,
trackCachePerformance, trackCachePerformance,
} from "../../../../utils/caching.js"; } from "../../../../utils/caching.js";
import { createMarkTaskCompletedToolFields } from "@open-swe/shared/open-swe/tools"; import { createMarkTaskCompletedToolFields } from "@openswe/shared/open-swe/tools";
import { import {
BaseMessage, BaseMessage,
BaseMessageLike, BaseMessageLike,

View file

@ -1,4 +1,4 @@
import { createMarkTaskCompletedToolFields } from "@open-swe/shared/open-swe/tools"; import { createMarkTaskCompletedToolFields } from "@openswe/shared/open-swe/tools";
import { GITHUB_WORKFLOWS_PERMISSIONS_PROMPT } from "../../../shared/prompts.js"; import { GITHUB_WORKFLOWS_PERMISSIONS_PROMPT } from "../../../shared/prompts.js";
const IDENTITY_PROMPT = `<identity> const IDENTITY_PROMPT = `<identity>

View file

@ -4,21 +4,21 @@ import {
GraphConfig, GraphConfig,
GraphState, GraphState,
GraphUpdate, GraphUpdate,
} from "@open-swe/shared/open-swe/types"; } from "@openswe/shared/open-swe/types";
import { Command } from "@langchain/langgraph"; import { Command } from "@langchain/langgraph";
import { isLocalMode } from "@open-swe/shared/open-swe/local-mode"; import { isLocalMode } from "@openswe/shared/open-swe/local-mode";
import { import {
completePlanItem, completePlanItem,
getActivePlanItems, getActivePlanItems,
getActiveTask, getActiveTask,
} from "@open-swe/shared/open-swe/tasks"; } from "@openswe/shared/open-swe/tasks";
import { import {
getCurrentPlanItem, getCurrentPlanItem,
getRemainingPlanItems, getRemainingPlanItems,
} from "../../../utils/current-task.js"; } from "../../../utils/current-task.js";
import { isAIMessage, ToolMessage } from "@langchain/core/messages"; import { isAIMessage, ToolMessage } from "@langchain/core/messages";
import { addTaskPlanToIssue } from "../../../utils/github/issue-task.js"; import { addTaskPlanToIssue } from "../../../utils/github/issue-task.js";
import { createMarkTaskCompletedToolFields } from "@open-swe/shared/open-swe/tools"; import { createMarkTaskCompletedToolFields } from "@openswe/shared/open-swe/tools";
import { import {
calculateConversationHistoryTokenCount, calculateConversationHistoryTokenCount,
getMessagesSinceLastSummary, getMessagesSinceLastSummary,

View file

@ -6,7 +6,7 @@ import {
GraphUpdate, GraphUpdate,
PlanItem, PlanItem,
TaskPlan, TaskPlan,
} from "@open-swe/shared/open-swe/types"; } from "@openswe/shared/open-swe/types";
import { import {
checkoutBranchAndCommit, checkoutBranchAndCommit,
getChangedFilesStatus, getChangedFilesStatus,
@ -22,7 +22,7 @@ import {
loadModel, loadModel,
supportsParallelToolCallsParam, supportsParallelToolCallsParam,
} from "../../../utils/llms/index.js"; } from "../../../utils/llms/index.js";
import { LLMTask } from "@open-swe/shared/open-swe/llm-task"; import { LLMTask } from "@openswe/shared/open-swe/llm-task";
import { formatPlanPromptWithSummaries } from "../../../utils/plan-prompt.js"; import { formatPlanPromptWithSummaries } from "../../../utils/plan-prompt.js";
import { formatUserRequestPrompt } from "../../../utils/user-request.js"; import { formatUserRequestPrompt } from "../../../utils/user-request.js";
import { AIMessage, BaseMessage, ToolMessage } from "@langchain/core/messages"; import { AIMessage, BaseMessage, ToolMessage } from "@langchain/core/messages";
@ -34,8 +34,8 @@ import { getGitHubTokensFromConfig } from "../../../utils/github-tokens.js";
import { import {
getActivePlanItems, getActivePlanItems,
getPullRequestNumberFromActiveTask, getPullRequestNumberFromActiveTask,
} from "@open-swe/shared/open-swe/tasks"; } from "@openswe/shared/open-swe/tasks";
import { createOpenPrToolFields } from "@open-swe/shared/open-swe/tools"; import { createOpenPrToolFields } from "@openswe/shared/open-swe/tools";
import { trackCachePerformance } from "../../../utils/caching.js"; import { trackCachePerformance } from "../../../utils/caching.js";
import { getModelManager } from "../../../utils/llms/model-manager.js"; import { getModelManager } from "../../../utils/llms/model-manager.js";
import { import {
@ -43,8 +43,8 @@ import {
GitHubPullRequestList, GitHubPullRequestList,
GitHubPullRequestUpdate, GitHubPullRequestUpdate,
} from "../../../utils/github/types.js"; } from "../../../utils/github/types.js";
import { getRepoAbsolutePath } from "@open-swe/shared/git"; import { getRepoAbsolutePath } from "@openswe/shared/git";
import { GITHUB_USER_LOGIN_HEADER } from "@open-swe/shared/constants"; import { GITHUB_USER_LOGIN_HEADER } from "@openswe/shared/constants";
import { shouldCreateIssue } from "../../../utils/should-create-issue.js"; import { shouldCreateIssue } from "../../../utils/should-create-issue.js";
const logger = createLogger(LogLevel.INFO, "Open PR"); const logger = createLogger(LogLevel.INFO, "Open PR");

View file

@ -4,13 +4,13 @@ import {
GraphConfig, GraphConfig,
GraphState, GraphState,
GraphUpdate, GraphUpdate,
} from "@open-swe/shared/open-swe/types"; } from "@openswe/shared/open-swe/types";
import { HumanInterrupt, HumanResponse } from "@langchain/langgraph/prebuilt"; import { HumanInterrupt, HumanResponse } from "@langchain/langgraph/prebuilt";
import { END, interrupt, Command } from "@langchain/langgraph"; import { END, interrupt, Command } from "@langchain/langgraph";
import { import {
DO_NOT_RENDER_ID_PREFIX, DO_NOT_RENDER_ID_PREFIX,
GITHUB_USER_LOGIN_HEADER, GITHUB_USER_LOGIN_HEADER,
} from "@open-swe/shared/constants"; } from "@openswe/shared/constants";
import { import {
getSandboxWithErrorHandling, getSandboxWithErrorHandling,
stopSandbox, stopSandbox,
@ -19,10 +19,10 @@ import { getOpenSweAppUrl } from "../../../utils/url-helpers.js";
import { import {
CustomNodeEvent, CustomNodeEvent,
REQUEST_HELP_NODE_ID, REQUEST_HELP_NODE_ID,
} from "@open-swe/shared/open-swe/custom-node-events"; } from "@openswe/shared/open-swe/custom-node-events";
import { postGitHubIssueComment } from "../../../utils/github/plan.js"; import { postGitHubIssueComment } from "../../../utils/github/plan.js";
import { shouldCreateIssue } from "../../../utils/should-create-issue.js"; import { shouldCreateIssue } from "../../../utils/should-create-issue.js";
import { isLocalMode } from "@open-swe/shared/open-swe/local-mode"; import { isLocalMode } from "@openswe/shared/open-swe/local-mode";
const constructDescription = (helpRequest: string): string => { const constructDescription = (helpRequest: string): string => {
return `The agent has requested help. Here is the help request: return `The agent has requested help. Here is the help request:

View file

@ -4,9 +4,9 @@ import {
GraphState, GraphState,
GraphUpdate, GraphUpdate,
PlanItem, PlanItem,
} from "@open-swe/shared/open-swe/types"; } from "@openswe/shared/open-swe/types";
import { loadModel } from "../../../utils/llms/index.js"; import { loadModel } from "../../../utils/llms/index.js";
import { LLMTask } from "@open-swe/shared/open-swe/llm-task"; import { LLMTask } from "@openswe/shared/open-swe/llm-task";
import { import {
AIMessage, AIMessage,
BaseMessage, BaseMessage,
@ -15,10 +15,10 @@ import {
} from "@langchain/core/messages"; } from "@langchain/core/messages";
import { formatPlanPrompt } from "../../../utils/plan-prompt.js"; import { formatPlanPrompt } from "../../../utils/plan-prompt.js";
import { createLogger, LogLevel } from "../../../utils/logger.js"; import { createLogger, LogLevel } from "../../../utils/logger.js";
import { getMessageContentString } from "@open-swe/shared/messages"; import { getMessageContentString } from "@openswe/shared/messages";
import { getMessageString } from "../../../utils/message/content.js"; import { getMessageString } from "../../../utils/message/content.js";
import { getActivePlanItems } from "@open-swe/shared/open-swe/tasks"; import { getActivePlanItems } from "@openswe/shared/open-swe/tasks";
import { createConversationHistorySummaryToolFields } from "@open-swe/shared/open-swe/tools"; import { createConversationHistorySummaryToolFields } from "@openswe/shared/open-swe/tools";
import { formatUserRequestPrompt } from "../../../utils/user-request.js"; import { formatUserRequestPrompt } from "../../../utils/user-request.js";
import { getMessagesSinceLastSummary } from "../../../utils/tokens.js"; import { getMessagesSinceLastSummary } from "../../../utils/tokens.js";
import { trackCachePerformance } from "../../../utils/caching.js"; import { trackCachePerformance } from "../../../utils/caching.js";

View file

@ -14,7 +14,7 @@ import {
GraphConfig, GraphConfig,
GraphUpdate, GraphUpdate,
TaskPlan, TaskPlan,
} from "@open-swe/shared/open-swe/types"; } from "@openswe/shared/open-swe/types";
import { import {
checkoutBranchAndCommit, checkoutBranchAndCommit,
getChangedFilesStatus, getChangedFilesStatus,
@ -31,16 +31,16 @@ import {
getCodebaseTree, getCodebaseTree,
} from "../../../utils/tree.js"; } from "../../../utils/tree.js";
import { createInstallDependenciesTool } from "../../../tools/install-dependencies.js"; import { createInstallDependenciesTool } from "../../../tools/install-dependencies.js";
import { isLocalMode } from "@open-swe/shared/open-swe/local-mode"; import { isLocalMode } from "@openswe/shared/open-swe/local-mode";
import { createGrepTool } from "../../../tools/grep.js"; import { createGrepTool } from "../../../tools/grep.js";
import { getMcpTools } from "../../../utils/mcp-client.js"; import { getMcpTools } from "../../../utils/mcp-client.js";
import { shouldDiagnoseError } from "../../../utils/tool-message-error.js"; import { shouldDiagnoseError } from "../../../utils/tool-message-error.js";
import { getGitHubTokensFromConfig } from "../../../utils/github-tokens.js"; import { getGitHubTokensFromConfig } from "../../../utils/github-tokens.js";
import { processToolCallContent } from "../../../utils/tool-output-processing.js"; import { processToolCallContent } from "../../../utils/tool-output-processing.js";
import { getActiveTask } from "@open-swe/shared/open-swe/tasks"; import { getActiveTask } from "@openswe/shared/open-swe/tasks";
import { createPullRequestToolCallMessage } from "../../../utils/message/create-pr-message.js"; import { createPullRequestToolCallMessage } from "../../../utils/message/create-pr-message.js";
import { filterUnsafeCommands } from "../../../utils/command-evaluation.js"; import { filterUnsafeCommands } from "../../../utils/command-evaluation.js";
import { getRepoAbsolutePath } from "@open-swe/shared/git"; import { getRepoAbsolutePath } from "@openswe/shared/git";
import { import {
createReplyToCommentTool, createReplyToCommentTool,
createReplyToReviewCommentTool, createReplyToReviewCommentTool,

View file

@ -5,17 +5,17 @@ import {
PlanItem, PlanItem,
GraphUpdate, GraphUpdate,
CustomRules, CustomRules,
} from "@open-swe/shared/open-swe/types"; } from "@openswe/shared/open-swe/types";
import { import {
loadModel, loadModel,
supportsParallelToolCallsParam, supportsParallelToolCallsParam,
} from "../../../utils/llms/index.js"; } from "../../../utils/llms/index.js";
import { LLMTask } from "@open-swe/shared/open-swe/llm-task"; import { LLMTask } from "@openswe/shared/open-swe/llm-task";
import { z } from "zod"; import { z } from "zod";
import { import {
getActiveTask, getActiveTask,
updateTaskPlanItems, updateTaskPlanItems,
} from "@open-swe/shared/open-swe/tasks"; } from "@openswe/shared/open-swe/tasks";
import { import {
AIMessage, AIMessage,
BaseMessage, BaseMessage,
@ -25,13 +25,13 @@ import {
import { getMessageString } from "../../../utils/message/content.js"; import { getMessageString } from "../../../utils/message/content.js";
import { formatPlanPrompt } from "../../../utils/plan-prompt.js"; import { formatPlanPrompt } from "../../../utils/plan-prompt.js";
import { createLogger, LogLevel } from "../../../utils/logger.js"; import { createLogger, LogLevel } from "../../../utils/logger.js";
import { createUpdatePlanToolFields } from "@open-swe/shared/open-swe/tools"; import { createUpdatePlanToolFields } from "@openswe/shared/open-swe/tools";
import { formatCustomRulesPrompt } from "../../../utils/custom-rules.js"; import { formatCustomRulesPrompt } from "../../../utils/custom-rules.js";
import { trackCachePerformance } from "../../../utils/caching.js"; import { trackCachePerformance } from "../../../utils/caching.js";
import { getModelManager } from "../../../utils/llms/model-manager.js"; import { getModelManager } from "../../../utils/llms/model-manager.js";
import { addTaskPlanToIssue } from "../../../utils/github/issue-task.js"; import { addTaskPlanToIssue } from "../../../utils/github/issue-task.js";
import { shouldCreateIssue } from "../../../utils/should-create-issue.js"; import { shouldCreateIssue } from "../../../utils/should-create-issue.js";
import { isLocalMode } from "@open-swe/shared/open-swe/local-mode"; import { isLocalMode } from "@openswe/shared/open-swe/local-mode";
const logger = createLogger(LogLevel.INFO, "UpdatePlanNode"); const logger = createLogger(LogLevel.INFO, "UpdatePlanNode");

View file

@ -2,8 +2,8 @@ import { END, START, StateGraph } from "@langchain/langgraph";
import { import {
ReviewerGraphState, ReviewerGraphState,
ReviewerGraphStateObj, ReviewerGraphStateObj,
} from "@open-swe/shared/open-swe/reviewer/types"; } from "@openswe/shared/open-swe/reviewer/types";
import { GraphConfiguration } from "@open-swe/shared/open-swe/types"; import { GraphConfiguration } from "@openswe/shared/open-swe/types";
import { import {
finalReview, finalReview,
generateReviewActions, generateReviewActions,

View file

@ -2,27 +2,27 @@ import { v4 as uuidv4 } from "uuid";
import { import {
ReviewerGraphState, ReviewerGraphState,
ReviewerGraphUpdate, ReviewerGraphUpdate,
} from "@open-swe/shared/open-swe/reviewer/types"; } from "@openswe/shared/open-swe/reviewer/types";
import { formatUserRequestPrompt } from "../../../utils/user-request.js"; import { formatUserRequestPrompt } from "../../../utils/user-request.js";
import { formatPlanPromptWithSummaries } from "../../../utils/plan-prompt.js"; import { formatPlanPromptWithSummaries } from "../../../utils/plan-prompt.js";
import { import {
getActivePlanItems, getActivePlanItems,
getActiveTask, getActiveTask,
updateTaskPlanItems, updateTaskPlanItems,
} from "@open-swe/shared/open-swe/tasks"; } from "@openswe/shared/open-swe/tasks";
import { import {
createCodeReviewMarkTaskCompletedFields, createCodeReviewMarkTaskCompletedFields,
createCodeReviewMarkTaskNotCompleteFields, createCodeReviewMarkTaskNotCompleteFields,
} from "@open-swe/shared/open-swe/tools"; } from "@openswe/shared/open-swe/tools";
import { isLocalMode } from "@open-swe/shared/open-swe/local-mode"; import { isLocalMode } from "@openswe/shared/open-swe/local-mode";
import { createLogger, LogLevel } from "../../../utils/logger.js"; import { createLogger, LogLevel } from "../../../utils/logger.js";
import { import {
loadModel, loadModel,
supportsParallelToolCallsParam, supportsParallelToolCallsParam,
} from "../../../utils/llms/index.js"; } from "../../../utils/llms/index.js";
import { LLMTask } from "@open-swe/shared/open-swe/llm-task"; import { LLMTask } from "@openswe/shared/open-swe/llm-task";
import { GraphConfig, PlanItem } from "@open-swe/shared/open-swe/types"; import { GraphConfig, PlanItem } from "@openswe/shared/open-swe/types";
import { z } from "zod"; import { z } from "zod";
import { addTaskPlanToIssue } from "../../../utils/github/issue-task.js"; import { addTaskPlanToIssue } from "../../../utils/github/issue-task.js";
import { getMessageString } from "../../../utils/message/content.js"; import { getMessageString } from "../../../utils/message/content.js";

View file

@ -4,16 +4,16 @@ import {
Provider, Provider,
supportsParallelToolCallsParam, supportsParallelToolCallsParam,
} from "../../../../utils/llms/index.js"; } from "../../../../utils/llms/index.js";
import { LLMTask } from "@open-swe/shared/open-swe/llm-task"; import { LLMTask } from "@openswe/shared/open-swe/llm-task";
import { import {
ReviewerGraphState, ReviewerGraphState,
ReviewerGraphUpdate, ReviewerGraphUpdate,
} from "@open-swe/shared/open-swe/reviewer/types"; } from "@openswe/shared/open-swe/reviewer/types";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { createLogger, LogLevel } from "../../../../utils/logger.js"; import { createLogger, LogLevel } from "../../../../utils/logger.js";
import { getMessageContentString } from "@open-swe/shared/messages"; import { getMessageContentString } from "@openswe/shared/messages";
import { PREVIOUS_REVIEW_PROMPT, SYSTEM_PROMPT } from "./prompt.js"; import { PREVIOUS_REVIEW_PROMPT, SYSTEM_PROMPT } from "./prompt.js";
import { getRepoAbsolutePath } from "@open-swe/shared/git"; import { getRepoAbsolutePath } from "@openswe/shared/git";
import { import {
createGrepTool, createGrepTool,
createShellTool, createShellTool,
@ -21,7 +21,7 @@ import {
} from "../../../../tools/index.js"; } from "../../../../tools/index.js";
import { formatCustomRulesPrompt } from "../../../../utils/custom-rules.js"; import { formatCustomRulesPrompt } from "../../../../utils/custom-rules.js";
import { formatUserRequestPrompt } from "../../../../utils/user-request.js"; import { formatUserRequestPrompt } from "../../../../utils/user-request.js";
import { getActivePlanItems } from "@open-swe/shared/open-swe/tasks"; import { getActivePlanItems } from "@openswe/shared/open-swe/tasks";
import { formatPlanPromptWithSummaries } from "../../../../utils/plan-prompt.js"; import { formatPlanPromptWithSummaries } from "../../../../utils/plan-prompt.js";
import { import {
formatCodeReviewPrompt, formatCodeReviewPrompt,

View file

@ -1,14 +1,14 @@
import { import {
ReviewerGraphState, ReviewerGraphState,
ReviewerGraphUpdate, ReviewerGraphUpdate,
} from "@open-swe/shared/open-swe/reviewer/types"; } from "@openswe/shared/open-swe/reviewer/types";
import { getSandboxWithErrorHandling } from "../../../utils/sandbox.js"; import { getSandboxWithErrorHandling } from "../../../utils/sandbox.js";
import { getRepoAbsolutePath } from "@open-swe/shared/git"; import { getRepoAbsolutePath } from "@openswe/shared/git";
import { createLogger, LogLevel } from "../../../utils/logger.js"; import { createLogger, LogLevel } from "../../../utils/logger.js";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { AIMessage, ToolMessage } from "@langchain/core/messages"; import { AIMessage, ToolMessage } from "@langchain/core/messages";
import { v4 as uuidv4 } from "uuid"; import { v4 as uuidv4 } from "uuid";
import { createReviewStartedToolFields } from "@open-swe/shared/open-swe/tools"; import { createReviewStartedToolFields } from "@openswe/shared/open-swe/tools";
import { getSandboxErrorFields } from "../../../utils/sandbox-error-fields.js"; import { getSandboxErrorFields } from "../../../utils/sandbox-error-fields.js";
import { Sandbox } from "@daytonaio/sdk"; import { Sandbox } from "@daytonaio/sdk";
import { createShellExecutor } from "../../../utils/shell-executor/index.js"; import { createShellExecutor } from "../../../utils/shell-executor/index.js";

View file

@ -9,11 +9,11 @@ import {
createInstallDependenciesTool, createInstallDependenciesTool,
createShellTool, createShellTool,
} from "../../../tools/index.js"; } from "../../../tools/index.js";
import { GraphConfig, TaskPlan } from "@open-swe/shared/open-swe/types"; import { GraphConfig, TaskPlan } from "@openswe/shared/open-swe/types";
import { import {
ReviewerGraphState, ReviewerGraphState,
ReviewerGraphUpdate, ReviewerGraphUpdate,
} from "@open-swe/shared/open-swe/reviewer/types"; } from "@openswe/shared/open-swe/reviewer/types";
import { createLogger, LogLevel } from "../../../utils/logger.js"; import { createLogger, LogLevel } from "../../../utils/logger.js";
import { zodSchemaToString } from "../../../utils/zod-to-string.js"; import { zodSchemaToString } from "../../../utils/zod-to-string.js";
import { formatBadArgsError } from "../../../utils/zod-to-string.js"; import { formatBadArgsError } from "../../../utils/zod-to-string.js";
@ -24,17 +24,17 @@ import {
getChangedFilesStatus, getChangedFilesStatus,
} from "../../../utils/github/git.js"; } from "../../../utils/github/git.js";
import { getSandboxWithErrorHandling } from "../../../utils/sandbox.js"; import { getSandboxWithErrorHandling } from "../../../utils/sandbox.js";
import { isLocalMode } from "@open-swe/shared/open-swe/local-mode"; import { isLocalMode } from "@openswe/shared/open-swe/local-mode";
import { Command } from "@langchain/langgraph"; import { Command } from "@langchain/langgraph";
import { shouldDiagnoseError } from "../../../utils/tool-message-error.js"; import { shouldDiagnoseError } from "../../../utils/tool-message-error.js";
import { filterHiddenMessages } from "../../../utils/message/filter-hidden.js"; import { filterHiddenMessages } from "../../../utils/message/filter-hidden.js";
import { getGitHubTokensFromConfig } from "../../../utils/github-tokens.js"; import { getGitHubTokensFromConfig } from "../../../utils/github-tokens.js";
import { createScratchpadTool } from "../../../tools/scratchpad.js"; import { createScratchpadTool } from "../../../tools/scratchpad.js";
import { getActiveTask } from "@open-swe/shared/open-swe/tasks"; import { getActiveTask } from "@openswe/shared/open-swe/tasks";
import { createPullRequestToolCallMessage } from "../../../utils/message/create-pr-message.js"; import { createPullRequestToolCallMessage } from "../../../utils/message/create-pr-message.js";
import { createViewTool } from "../../../tools/builtin-tools/view.js"; import { createViewTool } from "../../../tools/builtin-tools/view.js";
import { filterUnsafeCommands } from "../../../utils/command-evaluation.js"; import { filterUnsafeCommands } from "../../../utils/command-evaluation.js";
import { getRepoAbsolutePath } from "@open-swe/shared/git"; import { getRepoAbsolutePath } from "@openswe/shared/git";
const logger = createLogger(LogLevel.INFO, "TakeReviewAction"); const logger = createLogger(LogLevel.INFO, "TakeReviewAction");

View file

@ -4,10 +4,10 @@ import {
isToolMessage, isToolMessage,
ToolMessage, ToolMessage,
} from "@langchain/core/messages"; } from "@langchain/core/messages";
import { createDiagnoseErrorToolFields } from "@open-swe/shared/open-swe/tools"; import { createDiagnoseErrorToolFields } from "@openswe/shared/open-swe/tools";
import { z } from "zod"; import { z } from "zod";
import { ModelTokenData, GraphConfig } from "@open-swe/shared/open-swe/types"; import { ModelTokenData, GraphConfig } from "@openswe/shared/open-swe/types";
import { createLogger, LogLevel } from "../../utils/logger.js"; import { createLogger, LogLevel } from "../../utils/logger.js";
import { getAllLastFailedActions } from "../../utils/tool-message-error.js"; import { getAllLastFailedActions } from "../../utils/tool-message-error.js";
import { getMessageString } from "../../utils/message/content.js"; import { getMessageString } from "../../utils/message/content.js";
@ -15,7 +15,7 @@ import {
loadModel, loadModel,
supportsParallelToolCallsParam, supportsParallelToolCallsParam,
} from "../../utils/llms/index.js"; } from "../../utils/llms/index.js";
import { LLMTask } from "@open-swe/shared/open-swe/llm-task"; import { LLMTask } from "@openswe/shared/open-swe/llm-task";
import { trackCachePerformance } from "../../utils/caching.js"; import { trackCachePerformance } from "../../utils/caching.js";
import { getModelManager } from "../../utils/llms/model-manager.js"; import { getModelManager } from "../../utils/llms/model-manager.js";

View file

@ -1,12 +1,12 @@
import { v4 as uuidv4 } from "uuid"; import { v4 as uuidv4 } from "uuid";
import * as crypto from "crypto"; import * as crypto from "crypto";
import { getRepoAbsolutePath } from "@open-swe/shared/git"; import { getRepoAbsolutePath } from "@openswe/shared/git";
import { getGitHubTokensFromConfig } from "../../utils/github-tokens.js"; import { getGitHubTokensFromConfig } from "../../utils/github-tokens.js";
import { import {
CustomRules, CustomRules,
GraphConfig, GraphConfig,
TargetRepository, TargetRepository,
} from "@open-swe/shared/open-swe/types"; } from "@openswe/shared/open-swe/types";
import { createLogger, LogLevel } from "../../utils/logger.js"; import { createLogger, LogLevel } from "../../utils/logger.js";
import { daytonaClient } from "../../utils/sandbox.js"; import { daytonaClient } from "../../utils/sandbox.js";
import { cloneRepo, pullLatestChanges } from "../../utils/github/git.js"; import { cloneRepo, pullLatestChanges } from "../../utils/github/git.js";
@ -14,11 +14,11 @@ import {
FAILED_TO_GENERATE_TREE_MESSAGE, FAILED_TO_GENERATE_TREE_MESSAGE,
getCodebaseTree, getCodebaseTree,
} from "../../utils/tree.js"; } from "../../utils/tree.js";
import { DO_NOT_RENDER_ID_PREFIX } from "@open-swe/shared/constants"; import { DO_NOT_RENDER_ID_PREFIX } from "@openswe/shared/constants";
import { import {
CustomNodeEvent, CustomNodeEvent,
INITIALIZE_NODE_ID, INITIALIZE_NODE_ID,
} from "@open-swe/shared/open-swe/custom-node-events"; } from "@openswe/shared/open-swe/custom-node-events";
import { Sandbox } from "@daytonaio/sdk"; import { Sandbox } from "@daytonaio/sdk";
import { AIMessage, BaseMessage } from "@langchain/core/messages"; import { AIMessage, BaseMessage } from "@langchain/core/messages";
import { DEFAULT_SANDBOX_CREATE_PARAMS } from "../../constants.js"; import { DEFAULT_SANDBOX_CREATE_PARAMS } from "../../constants.js";
@ -27,7 +27,7 @@ import { withRetry } from "../../utils/retry.js";
import { import {
isLocalMode, isLocalMode,
getLocalWorkingDirectory, getLocalWorkingDirectory,
} from "@open-swe/shared/open-swe/local-mode"; } from "@openswe/shared/open-swe/local-mode";
const logger = createLogger(LogLevel.INFO, "InitializeSandbox"); const logger = createLogger(LogLevel.INFO, "InitializeSandbox");

View file

@ -6,7 +6,7 @@ import {
getOpenSWEMaxAutoAcceptLabel, getOpenSWEMaxAutoAcceptLabel,
} from "../../utils/github/label.js"; } from "../../utils/github/label.js";
import { RequestSource } from "../../constants.js"; import { RequestSource } from "../../constants.js";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
class IssueWebhookHandler extends WebhookHandlerBase { class IssueWebhookHandler extends WebhookHandlerBase {
constructor() { constructor() {

View file

@ -3,7 +3,7 @@ import {
WebhookHandlerContext, WebhookHandlerContext,
} from "./webhook-handler-base.js"; } from "./webhook-handler-base.js";
import { RequestSource } from "../../constants.js"; import { RequestSource } from "../../constants.js";
import { ManagerGraphUpdate } from "@open-swe/shared/open-swe/manager/types"; import { ManagerGraphUpdate } from "@openswe/shared/open-swe/manager/types";
import { import {
mentionsGitHubUserForTrigger, mentionsGitHubUserForTrigger,
extractLinkedIssues, extractLinkedIssues,
@ -18,7 +18,7 @@ import {
SimpleTriggerComment, SimpleTriggerComment,
} from "./types.js"; } from "./types.js";
import { GitHubPullRequestGet } from "../../utils/github/types.js"; import { GitHubPullRequestGet } from "../../utils/github/types.js";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { GITHUB_TRIGGER_USERNAME } from "./constants.js"; import { GITHUB_TRIGGER_USERNAME } from "./constants.js";
export interface PRWebhookContext extends WebhookHandlerContext { export interface PRWebhookContext extends WebhookHandlerContext {

View file

@ -2,7 +2,7 @@ import {
createReplyToCommentToolFields, createReplyToCommentToolFields,
createReplyToReviewCommentToolFields, createReplyToReviewCommentToolFields,
createReplyToReviewToolFields, createReplyToReviewToolFields,
} from "@open-swe/shared/open-swe/tools"; } from "@openswe/shared/open-swe/tools";
import { import {
PullRequestReviewTriggerData, PullRequestReviewTriggerData,
SimpleIssue, SimpleIssue,

View file

@ -16,10 +16,10 @@ import {
GITHUB_INSTALLATION_ID, GITHUB_INSTALLATION_ID,
MANAGER_GRAPH_ID, MANAGER_GRAPH_ID,
OPEN_SWE_STREAM_MODE, OPEN_SWE_STREAM_MODE,
} from "@open-swe/shared/constants"; } from "@openswe/shared/constants";
import { encryptSecret } from "@open-swe/shared/crypto"; import { encryptSecret } from "@openswe/shared/crypto";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { ManagerGraphUpdate } from "@open-swe/shared/open-swe/manager/types"; import { ManagerGraphUpdate } from "@openswe/shared/open-swe/manager/types";
import { StreamMode } from "@langchain/langgraph-sdk"; import { StreamMode } from "@langchain/langgraph-sdk";
import { extractContentWithoutDetailsFromIssueBody } from "../../utils/github/issue-messages.js"; import { extractContentWithoutDetailsFromIssueBody } from "../../utils/github/issue-messages.js";

View file

@ -1,13 +1,13 @@
import { v4 as uuidv4 } from "uuid"; import { v4 as uuidv4 } from "uuid";
import { createLogger, LogLevel } from "../../utils/logger.js"; import { createLogger, LogLevel } from "../../utils/logger.js";
import { GitHubApp } from "../../utils/github-app.js"; import { GitHubApp } from "../../utils/github-app.js";
import { isAllowedUser } from "@open-swe/shared/github/allowed-users"; import { isAllowedUser } from "@openswe/shared/github/allowed-users";
import { HumanMessage } from "@langchain/core/messages"; import { HumanMessage } from "@langchain/core/messages";
import { ManagerGraphUpdate } from "@open-swe/shared/open-swe/manager/types"; import { ManagerGraphUpdate } from "@openswe/shared/open-swe/manager/types";
import { RequestSource } from "../../constants.js"; import { RequestSource } from "../../constants.js";
import { getOpenSweAppUrl } from "../../utils/url-helpers.js"; import { getOpenSweAppUrl } from "../../utils/url-helpers.js";
import { createRunFromWebhook, createDevMetadataComment } from "./utils.js"; import { createRunFromWebhook, createDevMetadataComment } from "./utils.js";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { Octokit } from "@octokit/core"; import { Octokit } from "@octokit/core";
export interface WebhookHandlerContext { export interface WebhookHandlerContext {

View file

@ -3,7 +3,7 @@ import {
verifyGithubUser, verifyGithubUser,
GithubUser, GithubUser,
verifyGithubUserId, verifyGithubUserId,
} from "@open-swe/shared/github/verify-user"; } from "@openswe/shared/github/verify-user";
import { import {
GITHUB_INSTALLATION_ID, GITHUB_INSTALLATION_ID,
GITHUB_INSTALLATION_NAME, GITHUB_INSTALLATION_NAME,
@ -12,8 +12,8 @@ import {
GITHUB_USER_ID_HEADER, GITHUB_USER_ID_HEADER,
GITHUB_USER_LOGIN_HEADER, GITHUB_USER_LOGIN_HEADER,
LOCAL_MODE_HEADER, LOCAL_MODE_HEADER,
} from "@open-swe/shared/constants"; } from "@openswe/shared/constants";
import { decryptSecret } from "@open-swe/shared/crypto"; import { decryptSecret } from "@openswe/shared/crypto";
import { verifyGitHubWebhookOrThrow } from "./github.js"; import { verifyGitHubWebhookOrThrow } from "./github.js";
import { createWithOwnerMetadata, createOwnerFilter } from "./utils.js"; import { createWithOwnerMetadata, createOwnerFilter } from "./utils.js";
import { LANGGRAPH_USER_PERMISSIONS } from "../constants.js"; import { LANGGRAPH_USER_PERMISSIONS } from "../constants.js";

View file

@ -1,17 +1,17 @@
import { tool } from "@langchain/core/tools"; import { tool } from "@langchain/core/tools";
import { applyPatch } from "diff"; import { applyPatch } from "diff";
import { GraphState, GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphState, GraphConfig } from "@openswe/shared/open-swe/types";
import { readFile, writeFile } from "../utils/read-write.js"; import { readFile, writeFile } from "../utils/read-write.js";
import { fixGitPatch } from "../utils/diff.js"; import { fixGitPatch } from "../utils/diff.js";
import { createLogger, LogLevel } from "../utils/logger.js"; import { createLogger, LogLevel } from "../utils/logger.js";
import { createApplyPatchToolFields } from "@open-swe/shared/open-swe/tools"; import { createApplyPatchToolFields } from "@openswe/shared/open-swe/tools";
import { getRepoAbsolutePath } from "@open-swe/shared/git"; import { getRepoAbsolutePath } from "@openswe/shared/git";
import { getSandboxSessionOrThrow } from "./utils/get-sandbox-id.js"; import { getSandboxSessionOrThrow } from "./utils/get-sandbox-id.js";
import { Sandbox } from "@daytonaio/sdk"; import { Sandbox } from "@daytonaio/sdk";
import { import {
isLocalMode, isLocalMode,
getLocalWorkingDirectory, getLocalWorkingDirectory,
} from "@open-swe/shared/open-swe/local-mode"; } from "@openswe/shared/open-swe/local-mode";
import { createShellExecutor } from "../utils/shell-executor/shell-executor.js"; import { createShellExecutor } from "../utils/shell-executor/shell-executor.js";
import { join } from "path"; import { join } from "path";
import { v4 as uuidv4 } from "uuid"; import { v4 as uuidv4 } from "uuid";

View file

@ -1,7 +1,7 @@
import { Sandbox } from "@daytonaio/sdk"; import { Sandbox } from "@daytonaio/sdk";
import { readFile, writeFile } from "../../utils/read-write.js"; import { readFile, writeFile } from "../../utils/read-write.js";
import { getSandboxErrorFields } from "../../utils/sandbox-error-fields.js"; import { getSandboxErrorFields } from "../../utils/sandbox-error-fields.js";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { createShellExecutor } from "../../utils/shell-executor/index.js"; import { createShellExecutor } from "../../utils/shell-executor/index.js";
interface ViewCommandInputs { interface ViewCommandInputs {

View file

@ -1,10 +1,10 @@
import { join } from "path"; import { join } from "path";
import { tool } from "@langchain/core/tools"; import { tool } from "@langchain/core/tools";
import { GraphState, GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphState, GraphConfig } from "@openswe/shared/open-swe/types";
import { createLogger, LogLevel } from "../../utils/logger.js"; import { createLogger, LogLevel } from "../../utils/logger.js";
import { getRepoAbsolutePath } from "@open-swe/shared/git"; import { getRepoAbsolutePath } from "@openswe/shared/git";
import { getSandboxSessionOrThrow } from "../utils/get-sandbox-id.js"; import { getSandboxSessionOrThrow } from "../utils/get-sandbox-id.js";
import { createTextEditorToolFields } from "@open-swe/shared/open-swe/tools"; import { createTextEditorToolFields } from "@openswe/shared/open-swe/tools";
import { import {
handleViewCommand, handleViewCommand,
handleStrReplaceCommand, handleStrReplaceCommand,
@ -14,8 +14,8 @@ import {
import { import {
isLocalMode, isLocalMode,
getLocalWorkingDirectory, getLocalWorkingDirectory,
} from "@open-swe/shared/open-swe/local-mode"; } from "@openswe/shared/open-swe/local-mode";
import { TIMEOUT_SEC } from "@open-swe/shared/constants"; import { TIMEOUT_SEC } from "@openswe/shared/constants";
import { getLocalShellExecutor } from "../../utils/shell-executor/index.js"; import { getLocalShellExecutor } from "../../utils/shell-executor/index.js";
const logger = createLogger(LogLevel.INFO, "TextEditorTool"); const logger = createLogger(LogLevel.INFO, "TextEditorTool");

View file

@ -1,16 +1,16 @@
import { join } from "path"; import { join } from "path";
import { tool } from "@langchain/core/tools"; import { tool } from "@langchain/core/tools";
import { GraphState, GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphState, GraphConfig } from "@openswe/shared/open-swe/types";
import { createLogger, LogLevel } from "../../utils/logger.js"; import { createLogger, LogLevel } from "../../utils/logger.js";
import { getRepoAbsolutePath } from "@open-swe/shared/git"; import { getRepoAbsolutePath } from "@openswe/shared/git";
import { getSandboxSessionOrThrow } from "../utils/get-sandbox-id.js"; import { getSandboxSessionOrThrow } from "../utils/get-sandbox-id.js";
import { createViewToolFields } from "@open-swe/shared/open-swe/tools"; import { createViewToolFields } from "@openswe/shared/open-swe/tools";
import { handleViewCommand } from "./handlers.js"; import { handleViewCommand } from "./handlers.js";
import { import {
isLocalMode, isLocalMode,
getLocalWorkingDirectory, getLocalWorkingDirectory,
} from "@open-swe/shared/open-swe/local-mode"; } from "@openswe/shared/open-swe/local-mode";
import { TIMEOUT_SEC } from "@open-swe/shared/constants"; import { TIMEOUT_SEC } from "@openswe/shared/constants";
import { createShellExecutor } from "../../utils/shell-executor/index.js"; import { createShellExecutor } from "../../utils/shell-executor/index.js";
const logger = createLogger(LogLevel.INFO, "ViewTool"); const logger = createLogger(LogLevel.INFO, "ViewTool");

View file

@ -1,9 +1,9 @@
import { tool } from "@langchain/core/tools"; import { tool } from "@langchain/core/tools";
import { z } from "zod"; import { z } from "zod";
import { loadModel } from "../utils/llms/index.js"; import { loadModel } from "../utils/llms/index.js";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { createLogger, LogLevel } from "../utils/logger.js"; import { createLogger, LogLevel } from "../utils/logger.js";
import { LLMTask } from "@open-swe/shared/open-swe/llm-task"; import { LLMTask } from "@openswe/shared/open-swe/llm-task";
const logger = createLogger(LogLevel.INFO, "CommandSafetyEvaluator"); const logger = createLogger(LogLevel.INFO, "CommandSafetyEvaluator");

View file

@ -1,9 +1,9 @@
import path from "path"; import path from "path";
import { tool } from "@langchain/core/tools"; import { tool } from "@langchain/core/tools";
import { createWriteDefaultTsConfigToolFields } from "@open-swe/shared/open-swe/tools"; import { createWriteDefaultTsConfigToolFields } from "@openswe/shared/open-swe/tools";
import { GraphConfig, GraphState } from "@open-swe/shared/open-swe/types"; import { GraphConfig, GraphState } from "@openswe/shared/open-swe/types";
import { createShellExecutor } from "../utils/shell-executor/index.js"; import { createShellExecutor } from "../utils/shell-executor/index.js";
import { TIMEOUT_SEC } from "@open-swe/shared/constants"; import { TIMEOUT_SEC } from "@openswe/shared/constants";
import { getSandboxErrorFields } from "../utils/sandbox-error-fields.js"; import { getSandboxErrorFields } from "../utils/sandbox-error-fields.js";
const DEFAULT_TS_CONFIG = { const DEFAULT_TS_CONFIG = {

View file

@ -1,17 +1,17 @@
import { tool } from "@langchain/core/tools"; import { tool } from "@langchain/core/tools";
import { GraphState, GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphState, GraphConfig } from "@openswe/shared/open-swe/types";
import { getSandboxErrorFields } from "../utils/sandbox-error-fields.js"; import { getSandboxErrorFields } from "../utils/sandbox-error-fields.js";
import { createLogger, LogLevel } from "../utils/logger.js"; import { createLogger, LogLevel } from "../utils/logger.js";
import { TIMEOUT_SEC } from "@open-swe/shared/constants"; import { TIMEOUT_SEC } from "@openswe/shared/constants";
import { getRepoAbsolutePath } from "@open-swe/shared/git"; import { getRepoAbsolutePath } from "@openswe/shared/git";
import { import {
isLocalMode, isLocalMode,
getLocalWorkingDirectory, getLocalWorkingDirectory,
} from "@open-swe/shared/open-swe/local-mode"; } from "@openswe/shared/open-swe/local-mode";
import { import {
createGrepToolFields, createGrepToolFields,
formatGrepCommand, formatGrepCommand,
} from "@open-swe/shared/open-swe/tools"; } from "@openswe/shared/open-swe/tools";
import { createShellExecutor } from "../utils/shell-executor/index.js"; import { createShellExecutor } from "../utils/shell-executor/index.js";
import { wrapScript } from "../utils/wrap-script.js"; import { wrapScript } from "../utils/wrap-script.js";

View file

@ -7,7 +7,7 @@ export {
createUpdatePlanToolFields, createUpdatePlanToolFields,
createSessionPlanToolFields, createSessionPlanToolFields,
createRequestHumanHelpToolFields, createRequestHumanHelpToolFields,
} from "@open-swe/shared/open-swe/tools"; } from "@openswe/shared/open-swe/tools";
export * from "./grep.js"; export * from "./grep.js";
export * from "./install-dependencies.js"; export * from "./install-dependencies.js";
export * from "./default-tsconfig.js"; export * from "./default-tsconfig.js";

View file

@ -1,13 +1,13 @@
import { tool } from "@langchain/core/tools"; import { tool } from "@langchain/core/tools";
import { GraphState, GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphState, GraphConfig } from "@openswe/shared/open-swe/types";
import { getSandboxErrorFields } from "../utils/sandbox-error-fields.js"; import { getSandboxErrorFields } from "../utils/sandbox-error-fields.js";
import { createLogger, LogLevel } from "../utils/logger.js"; import { createLogger, LogLevel } from "../utils/logger.js";
import { TIMEOUT_SEC } from "@open-swe/shared/constants"; import { TIMEOUT_SEC } from "@openswe/shared/constants";
import { createInstallDependenciesToolFields } from "@open-swe/shared/open-swe/tools"; import { createInstallDependenciesToolFields } from "@openswe/shared/open-swe/tools";
import { getRepoAbsolutePath } from "@open-swe/shared/git"; import { getRepoAbsolutePath } from "@openswe/shared/git";
import { getSandboxSessionOrThrow } from "./utils/get-sandbox-id.js"; import { getSandboxSessionOrThrow } from "./utils/get-sandbox-id.js";
import { createShellExecutor } from "../utils/shell-executor/index.js"; import { createShellExecutor } from "../utils/shell-executor/index.js";
import { isLocalMode } from "@open-swe/shared/open-swe/local-mode"; import { isLocalMode } from "@openswe/shared/open-swe/local-mode";
const logger = createLogger(LogLevel.INFO, "InstallDependenciesTool"); const logger = createLogger(LogLevel.INFO, "InstallDependenciesTool");

View file

@ -3,9 +3,9 @@ import {
createReplyToCommentToolFields, createReplyToCommentToolFields,
createReplyToReviewCommentToolFields, createReplyToReviewCommentToolFields,
createReplyToReviewToolFields, createReplyToReviewToolFields,
} from "@open-swe/shared/open-swe/tools"; } from "@openswe/shared/open-swe/tools";
import { getGitHubTokensFromConfig } from "../utils/github-tokens.js"; import { getGitHubTokensFromConfig } from "../utils/github-tokens.js";
import { GraphConfig, GraphState } from "@open-swe/shared/open-swe/types"; import { GraphConfig, GraphState } from "@openswe/shared/open-swe/types";
import { import {
quoteReplyToPullRequestComment, quoteReplyToPullRequestComment,
quoteReplyToReview, quoteReplyToReview,
@ -13,7 +13,7 @@ import {
} from "../utils/github/api.js"; } from "../utils/github/api.js";
import { getRecentUserRequest } from "../utils/user-request.js"; import { getRecentUserRequest } from "../utils/user-request.js";
import { RequestSource } from "../constants.js"; import { RequestSource } from "../constants.js";
import { GITHUB_USER_LOGIN_HEADER } from "@open-swe/shared/constants"; import { GITHUB_USER_LOGIN_HEADER } from "@openswe/shared/constants";
export function shouldIncludeReviewCommentTool( export function shouldIncludeReviewCommentTool(
state: GraphState, state: GraphState,

View file

@ -1,5 +1,5 @@
import { tool } from "@langchain/core/tools"; import { tool } from "@langchain/core/tools";
import { createScratchpadFields } from "@open-swe/shared/open-swe/tools"; import { createScratchpadFields } from "@openswe/shared/open-swe/tools";
export function createScratchpadTool(whenMessage: string) { export function createScratchpadTool(whenMessage: string) {
const scratchpadTool = tool( const scratchpadTool = tool(

View file

@ -1,11 +1,11 @@
import { tool } from "@langchain/core/tools"; import { tool } from "@langchain/core/tools";
import { createLogger, LogLevel } from "../../utils/logger.js"; import { createLogger, LogLevel } from "../../utils/logger.js";
import { createSearchDocumentForToolFields } from "@open-swe/shared/open-swe/tools"; import { createSearchDocumentForToolFields } from "@openswe/shared/open-swe/tools";
import { FireCrawlLoader } from "@langchain/community/document_loaders/web/firecrawl"; import { FireCrawlLoader } from "@langchain/community/document_loaders/web/firecrawl";
import { loadModel } from "../../utils/llms/index.js"; import { loadModel } from "../../utils/llms/index.js";
import { LLMTask } from "@open-swe/shared/open-swe/llm-task"; import { LLMTask } from "@openswe/shared/open-swe/llm-task";
import { GraphConfig, GraphState } from "@open-swe/shared/open-swe/types"; import { GraphConfig, GraphState } from "@openswe/shared/open-swe/types";
import { getMessageContentString } from "@open-swe/shared/messages"; import { getMessageContentString } from "@openswe/shared/messages";
import { DOCUMENT_SEARCH_PROMPT } from "./prompt.js"; import { DOCUMENT_SEARCH_PROMPT } from "./prompt.js";
import { parseUrl } from "../../utils/url-parser.js"; import { parseUrl } from "../../utils/url-parser.js";
import { z } from "zod"; import { z } from "zod";

View file

@ -1,8 +1,8 @@
import { tool } from "@langchain/core/tools"; import { tool } from "@langchain/core/tools";
import { GraphState, GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphState, GraphConfig } from "@openswe/shared/open-swe/types";
import { getSandboxErrorFields } from "../utils/sandbox-error-fields.js"; import { getSandboxErrorFields } from "../utils/sandbox-error-fields.js";
import { TIMEOUT_SEC } from "@open-swe/shared/constants"; import { TIMEOUT_SEC } from "@openswe/shared/constants";
import { createShellToolFields } from "@open-swe/shared/open-swe/tools"; import { createShellToolFields } from "@openswe/shared/open-swe/tools";
import { createShellExecutor } from "../utils/shell-executor/index.js"; import { createShellExecutor } from "../utils/shell-executor/index.js";
const DEFAULT_ENV = { const DEFAULT_ENV = {

View file

@ -1,8 +1,8 @@
import { tool } from "@langchain/core/tools"; import { tool } from "@langchain/core/tools";
import { createLogger, LogLevel } from "../utils/logger.js"; import { createLogger, LogLevel } from "../utils/logger.js";
import { createGetURLContentToolFields } from "@open-swe/shared/open-swe/tools"; import { createGetURLContentToolFields } from "@openswe/shared/open-swe/tools";
import { FireCrawlLoader } from "@langchain/community/document_loaders/web/firecrawl"; import { FireCrawlLoader } from "@langchain/community/document_loaders/web/firecrawl";
import { GraphState } from "@open-swe/shared/open-swe/types"; import { GraphState } from "@openswe/shared/open-swe/types";
import { parseUrl } from "../utils/url-parser.js"; import { parseUrl } from "../utils/url-parser.js";
const logger = createLogger(LogLevel.INFO, "GetURLContentTool"); const logger = createLogger(LogLevel.INFO, "GetURLContentTool");

View file

@ -1,5 +1,5 @@
import { getCurrentTaskInput } from "@langchain/langgraph"; import { getCurrentTaskInput } from "@langchain/langgraph";
import { GraphState } from "@open-swe/shared/open-swe/types"; import { GraphState } from "@openswe/shared/open-swe/types";
import { createLogger, LogLevel } from "../../utils/logger.js"; import { createLogger, LogLevel } from "../../utils/logger.js";
import { daytonaClient } from "../../utils/sandbox.js"; import { daytonaClient } from "../../utils/sandbox.js";
import { Sandbox } from "@daytonaio/sdk"; import { Sandbox } from "@daytonaio/sdk";

View file

@ -9,9 +9,9 @@ import {
MessageContent, MessageContent,
ToolMessage, ToolMessage,
} from "@langchain/core/messages"; } from "@langchain/core/messages";
import { CacheMetrics, ModelTokenData } from "@open-swe/shared/open-swe/types"; import { CacheMetrics, ModelTokenData } from "@openswe/shared/open-swe/types";
import { createLogger, LogLevel } from "./logger.js"; import { createLogger, LogLevel } from "./logger.js";
import { calculateCostSavings } from "@open-swe/shared/caching"; import { calculateCostSavings } from "@openswe/shared/caching";
const logger = createLogger(LogLevel.INFO, "Caching"); const logger = createLogger(LogLevel.INFO, "Caching");

View file

@ -1,6 +1,6 @@
import { createLogger, LogLevel } from "./logger.js"; import { createLogger, LogLevel } from "./logger.js";
import { createCommandSafetyEvaluator } from "../tools/command-safety-evaluator.js"; import { createCommandSafetyEvaluator } from "../tools/command-safety-evaluator.js";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { import {
formatGrepCommand, formatGrepCommand,
formatShellCommand, formatShellCommand,
@ -14,7 +14,7 @@ import {
createSearchDocumentForToolFields, createSearchDocumentForToolFields,
createGetURLContentToolFields, createGetURLContentToolFields,
createTextEditorToolFields, createTextEditorToolFields,
} from "@open-swe/shared/open-swe/tools"; } from "@openswe/shared/open-swe/tools";
import { ToolCall } from "@langchain/core/messages/tool"; import { ToolCall } from "@langchain/core/messages/tool";
import { z } from "zod"; import { z } from "zod";

View file

@ -1,4 +1,4 @@
import { PlanItem } from "@open-swe/shared/open-swe/types"; import { PlanItem } from "@openswe/shared/open-swe/types";
export function getCurrentPlanItem(plan: PlanItem[]): PlanItem { export function getCurrentPlanItem(plan: PlanItem[]): PlanItem {
return ( return (

View file

@ -1,14 +1,14 @@
import { CustomRules } from "@open-swe/shared/open-swe/types"; import { CustomRules } from "@openswe/shared/open-swe/types";
import { Sandbox } from "@daytonaio/sdk"; import { Sandbox } from "@daytonaio/sdk";
import { createLogger, LogLevel } from "./logger.js"; import { createLogger, LogLevel } from "./logger.js";
import { getSandboxErrorFields } from "./sandbox-error-fields.js"; import { getSandboxErrorFields } from "./sandbox-error-fields.js";
import { import {
isLocalMode, isLocalMode,
getLocalWorkingDirectory, getLocalWorkingDirectory,
} from "@open-swe/shared/open-swe/local-mode"; } from "@openswe/shared/open-swe/local-mode";
import { promises as fs } from "fs"; import { promises as fs } from "fs";
import { join } from "path"; import { join } from "path";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { createShellExecutor } from "./shell-executor/shell-executor.js"; import { createShellExecutor } from "./shell-executor/shell-executor.js";
const logger = createLogger(LogLevel.INFO, "CustomRules"); const logger = createLogger(LogLevel.INFO, "CustomRules");

View file

@ -1,4 +1,4 @@
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { import {
GITHUB_INSTALLATION_TOKEN_COOKIE, GITHUB_INSTALLATION_TOKEN_COOKIE,
GITHUB_TOKEN_COOKIE, GITHUB_TOKEN_COOKIE,
@ -7,7 +7,7 @@ import {
GITHUB_INSTALLATION_NAME, GITHUB_INSTALLATION_NAME,
GITHUB_PAT, GITHUB_PAT,
GITHUB_INSTALLATION_ID, GITHUB_INSTALLATION_ID,
} from "@open-swe/shared/constants"; } from "@openswe/shared/constants";
export function getDefaultHeaders(config: GraphConfig): Record<string, string> { export function getDefaultHeaders(config: GraphConfig): Record<string, string> {
const githubPat = config.configurable?.[GITHUB_PAT]; const githubPat = config.configurable?.[GITHUB_PAT];

View file

@ -1,6 +1,6 @@
import { Sandbox } from "@daytonaio/sdk"; import { Sandbox } from "@daytonaio/sdk";
import { createLogger, LogLevel } from "./logger.js"; import { createLogger, LogLevel } from "./logger.js";
import { TIMEOUT_SEC } from "@open-swe/shared/constants"; import { TIMEOUT_SEC } from "@openswe/shared/constants";
const logger = createLogger(LogLevel.INFO, "EnvSetup"); const logger = createLogger(LogLevel.INFO, "EnvSetup");

View file

@ -1,5 +1,5 @@
import { GITHUB_PAT } from "@open-swe/shared/constants"; import { GITHUB_PAT } from "@openswe/shared/constants";
import { decryptSecret } from "@open-swe/shared/crypto"; import { decryptSecret } from "@openswe/shared/crypto";
/** /**
* Simple helper to check if request has GitHub PAT and return decrypted value * Simple helper to check if request has GitHub PAT and return decrypted value

View file

@ -2,9 +2,9 @@ import {
GITHUB_TOKEN_COOKIE, GITHUB_TOKEN_COOKIE,
GITHUB_INSTALLATION_TOKEN_COOKIE, GITHUB_INSTALLATION_TOKEN_COOKIE,
GITHUB_INSTALLATION_ID, GITHUB_INSTALLATION_ID,
} from "@open-swe/shared/constants"; } from "@openswe/shared/constants";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { decryptSecret } from "@open-swe/shared/crypto"; import { decryptSecret } from "@openswe/shared/crypto";
import { getGitHubPatFromConfig } from "./github-pat.js"; import { getGitHubPatFromConfig } from "./github-pat.js";
export function getGitHubTokensFromConfig(config: GraphConfig): { export function getGitHubTokensFromConfig(config: GraphConfig): {

View file

@ -10,11 +10,11 @@ import {
GitHubReviewComment, GitHubReviewComment,
} from "./types.js"; } from "./types.js";
import { getOpenSWELabel } from "./label.js"; import { getOpenSWELabel } from "./label.js";
import { getInstallationToken } from "@open-swe/shared/github/auth"; import { getInstallationToken } from "@openswe/shared/github/auth";
import { getConfig } from "@langchain/langgraph"; import { getConfig } from "@langchain/langgraph";
import { GITHUB_INSTALLATION_ID } from "@open-swe/shared/constants"; import { GITHUB_INSTALLATION_ID } from "@openswe/shared/constants";
import { updateConfig } from "../update-config.js"; import { updateConfig } from "../update-config.js";
import { encryptSecret } from "@open-swe/shared/crypto"; import { encryptSecret } from "@openswe/shared/crypto";
const logger = createLogger(LogLevel.INFO, "GitHub-API"); const logger = createLogger(LogLevel.INFO, "GitHub-API");

View file

@ -4,22 +4,22 @@ import {
GraphConfig, GraphConfig,
TargetRepository, TargetRepository,
TaskPlan, TaskPlan,
} from "@open-swe/shared/open-swe/types"; } from "@openswe/shared/open-swe/types";
import { TIMEOUT_SEC } from "@open-swe/shared/constants"; import { TIMEOUT_SEC } from "@openswe/shared/constants";
import { getSandboxErrorFields } from "../sandbox-error-fields.js"; import { getSandboxErrorFields } from "../sandbox-error-fields.js";
import { getRepoAbsolutePath } from "@open-swe/shared/git"; import { getRepoAbsolutePath } from "@openswe/shared/git";
import { ExecuteResponse } from "@daytonaio/sdk/src/types/ExecuteResponse.js"; import { ExecuteResponse } from "@daytonaio/sdk/src/types/ExecuteResponse.js";
import { withRetry } from "../retry.js"; import { withRetry } from "../retry.js";
import { import {
addPullRequestNumberToActiveTask, addPullRequestNumberToActiveTask,
getActiveTask, getActiveTask,
getPullRequestNumberFromActiveTask, getPullRequestNumberFromActiveTask,
} from "@open-swe/shared/open-swe/tasks"; } from "@openswe/shared/open-swe/tasks";
import { createPullRequest, getBranch } from "./api.js"; import { createPullRequest, getBranch } from "./api.js";
import { addTaskPlanToIssue } from "./issue-task.js"; import { addTaskPlanToIssue } from "./issue-task.js";
import { DEFAULT_EXCLUDED_PATTERNS } from "./constants.js"; import { DEFAULT_EXCLUDED_PATTERNS } from "./constants.js";
import { escapeRegExp } from "../string-utils.js"; import { escapeRegExp } from "../string-utils.js";
import { isLocalMode } from "@open-swe/shared/open-swe/local-mode"; import { isLocalMode } from "@openswe/shared/open-swe/local-mode";
import { createShellExecutor } from "../shell-executor/index.js"; import { createShellExecutor } from "../shell-executor/index.js";
import { shouldCreateIssue } from "../should-create-issue.js"; import { shouldCreateIssue } from "../should-create-issue.js";

View file

@ -6,10 +6,10 @@ import {
} from "@langchain/core/messages"; } from "@langchain/core/messages";
import { GitHubIssue, GitHubIssueComment } from "./types.js"; import { GitHubIssue, GitHubIssueComment } from "./types.js";
import { getIssue, getIssueComments } from "./api.js"; import { getIssue, getIssueComments } from "./api.js";
import { GraphConfig, TargetRepository } from "@open-swe/shared/open-swe/types"; import { GraphConfig, TargetRepository } from "@openswe/shared/open-swe/types";
import { getGitHubTokensFromConfig } from "../github-tokens.js"; import { getGitHubTokensFromConfig } from "../github-tokens.js";
import { DETAILS_CLOSE_TAG, DETAILS_OPEN_TAG } from "./issue-task.js"; import { DETAILS_CLOSE_TAG, DETAILS_OPEN_TAG } from "./issue-task.js";
import { isLocalMode } from "@open-swe/shared/open-swe/local-mode"; import { isLocalMode } from "@openswe/shared/open-swe/local-mode";
export function getUntrackedComments( export function getUntrackedComments(
existingMessages: BaseMessage[], existingMessages: BaseMessage[],

View file

@ -2,11 +2,11 @@ import {
GraphConfig, GraphConfig,
TargetRepository, TargetRepository,
TaskPlan, TaskPlan,
} from "@open-swe/shared/open-swe/types"; } from "@openswe/shared/open-swe/types";
import { getIssue, updateIssue } from "./api.js"; import { getIssue, updateIssue } from "./api.js";
import { getGitHubTokensFromConfig } from "../github-tokens.js"; import { getGitHubTokensFromConfig } from "../github-tokens.js";
import { createLogger, LogLevel } from "../logger.js"; import { createLogger, LogLevel } from "../logger.js";
import { isLocalMode } from "@open-swe/shared/open-swe/local-mode"; import { isLocalMode } from "@openswe/shared/open-swe/local-mode";
const logger = createLogger(LogLevel.INFO, "IssueTaskString"); const logger = createLogger(LogLevel.INFO, "IssueTaskString");
export const TASK_OPEN_TAG = "<open-swe-do-not-edit-task-plan>"; export const TASK_OPEN_TAG = "<open-swe-do-not-edit-task-plan>";

View file

@ -1,4 +1,4 @@
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { getGitHubTokensFromConfig } from "../github-tokens.js"; import { getGitHubTokensFromConfig } from "../github-tokens.js";
import { import {
createIssueComment, createIssueComment,
@ -6,7 +6,7 @@ import {
updateIssueComment, updateIssueComment,
} from "./api.js"; } from "./api.js";
import { createLogger, LogLevel } from "../logger.js"; import { createLogger, LogLevel } from "../logger.js";
import { isLocalMode } from "@open-swe/shared/open-swe/local-mode"; import { isLocalMode } from "@openswe/shared/open-swe/local-mode";
const logger = createLogger(LogLevel.INFO, "GitHubPlan"); const logger = createLogger(LogLevel.INFO, "GitHubPlan");

View file

@ -1,5 +1,5 @@
import { encryptSecret } from "@open-swe/shared/crypto"; import { encryptSecret } from "@openswe/shared/crypto";
import { getInstallationToken } from "@open-swe/shared/github/auth"; import { getInstallationToken } from "@openswe/shared/github/auth";
export async function regenerateInstallationToken( export async function regenerateInstallationToken(
installationId: string | undefined, installationId: string | undefined,

View file

@ -1,4 +1,4 @@
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { getModelManager, Provider } from "./model-manager.js"; import { getModelManager, Provider } from "./model-manager.js";
import { FallbackRunnable } from "../runtime-fallback.js"; import { FallbackRunnable } from "../runtime-fallback.js";
import { BindToolsInput } from "@langchain/core/language_models/chat_models"; import { BindToolsInput } from "@langchain/core/language_models/chat_models";
@ -6,7 +6,7 @@ import { BaseMessageLike } from "@langchain/core/messages";
import { import {
LLMTask, LLMTask,
TASK_TO_CONFIG_DEFAULTS_MAP, TASK_TO_CONFIG_DEFAULTS_MAP,
} from "@open-swe/shared/open-swe/llm-task"; } from "@openswe/shared/open-swe/llm-task";
export async function loadModel( export async function loadModel(
config: GraphConfig, config: GraphConfig,

View file

@ -2,15 +2,15 @@ import {
ConfigurableModel, ConfigurableModel,
initChatModel, initChatModel,
} from "langchain/chat_models/universal"; } from "langchain/chat_models/universal";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { createLogger, LogLevel } from "../logger.js"; import { createLogger, LogLevel } from "../logger.js";
import { import {
LLMTask, LLMTask,
TASK_TO_CONFIG_DEFAULTS_MAP, TASK_TO_CONFIG_DEFAULTS_MAP,
} from "@open-swe/shared/open-swe/llm-task"; } from "@openswe/shared/open-swe/llm-task";
import { isAllowedUser } from "@open-swe/shared/github/allowed-users"; import { isAllowedUser } from "@openswe/shared/github/allowed-users";
import { decryptSecret } from "@open-swe/shared/crypto"; import { decryptSecret } from "@openswe/shared/crypto";
import { API_KEY_REQUIRED_MESSAGE } from "@open-swe/shared/constants"; import { API_KEY_REQUIRED_MESSAGE } from "@openswe/shared/constants";
const logger = createLogger(LogLevel.INFO, "ModelManager"); const logger = createLogger(LogLevel.INFO, "ModelManager");

View file

@ -1,13 +1,13 @@
import { MultiServerMCPClient } from "@langchain/mcp-adapters"; import { MultiServerMCPClient } from "@langchain/mcp-adapters";
import type { StructuredToolInterface } from "@langchain/core/tools"; import type { StructuredToolInterface } from "@langchain/core/tools";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { import {
McpServerConfig, McpServerConfig,
McpServerConfigSchema, McpServerConfigSchema,
McpServers, McpServers,
} from "@open-swe/shared/open-swe/mcp"; } from "@openswe/shared/open-swe/mcp";
import { createLogger, LogLevel } from "./logger.js"; import { createLogger, LogLevel } from "./logger.js";
import { DEFAULT_MCP_SERVERS } from "@open-swe/shared/constants"; import { DEFAULT_MCP_SERVERS } from "@openswe/shared/constants";
const logger = createLogger(LogLevel.INFO, "MCP Client"); const logger = createLogger(LogLevel.INFO, "MCP Client");

View file

@ -1,9 +1,9 @@
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { loadModel } from "../llms/index.js"; import { loadModel } from "../llms/index.js";
import { LLMTask } from "@open-swe/shared/open-swe/llm-task"; import { LLMTask } from "@openswe/shared/open-swe/llm-task";
import { createLogger, LogLevel } from "../logger.js"; import { createLogger, LogLevel } from "../logger.js";
import { DOCUMENT_TOC_GENERATION_PROMPT } from "./prompt.js"; import { DOCUMENT_TOC_GENERATION_PROMPT } from "./prompt.js";
import { getMessageContentString } from "@open-swe/shared/messages"; import { getMessageContentString } from "@openswe/shared/messages";
import { truncateOutput } from "../truncate-outputs.js"; import { truncateOutput } from "../truncate-outputs.js";
const logger = createLogger(LogLevel.INFO, "McpOutputHandler"); const logger = createLogger(LogLevel.INFO, "McpOutputHandler");

View file

@ -10,7 +10,7 @@ import {
ToolMessage, ToolMessage,
} from "@langchain/core/messages"; } from "@langchain/core/messages";
import { ToolCall } from "@langchain/core/messages/tool"; import { ToolCall } from "@langchain/core/messages/tool";
import { getMessageContentString } from "@open-swe/shared/messages"; import { getMessageContentString } from "@openswe/shared/messages";
export function getToolCallsString(toolCalls: ToolCall[] | undefined): string { export function getToolCallsString(toolCalls: ToolCall[] | undefined): string {
if (!toolCalls?.length) return ""; if (!toolCalls?.length) return "";

View file

@ -1,8 +1,8 @@
import { v4 as uuidv4 } from "uuid"; import { v4 as uuidv4 } from "uuid";
import { AIMessage, BaseMessage, ToolMessage } from "@langchain/core/messages"; import { AIMessage, BaseMessage, ToolMessage } from "@langchain/core/messages";
import { createOpenPrToolFields } from "@open-swe/shared/open-swe/tools"; import { createOpenPrToolFields } from "@openswe/shared/open-swe/tools";
import { z } from "zod"; import { z } from "zod";
import { TargetRepository } from "@open-swe/shared/open-swe/types"; import { TargetRepository } from "@openswe/shared/open-swe/types";
function constructPullRequestUrl( function constructPullRequestUrl(
targetRepository: TargetRepository, targetRepository: TargetRepository,

View file

@ -1,4 +1,4 @@
import { PlanItem } from "@open-swe/shared/open-swe/types"; import { PlanItem } from "@openswe/shared/open-swe/types";
export const PLAN_PROMPT = `<completed_tasks> export const PLAN_PROMPT = `<completed_tasks>
{COMPLETED_TASKS} {COMPLETED_TASKS}

View file

@ -5,10 +5,10 @@ import { traceable } from "langsmith/traceable";
import { import {
isLocalMode, isLocalMode,
getLocalWorkingDirectory, getLocalWorkingDirectory,
} from "@open-swe/shared/open-swe/local-mode"; } from "@openswe/shared/open-swe/local-mode";
import { promises as fs } from "fs"; import { promises as fs } from "fs";
import { join, isAbsolute } from "path"; import { join, isAbsolute } from "path";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { createShellExecutor } from "./shell-executor/shell-executor.js"; import { createShellExecutor } from "./shell-executor/shell-executor.js";
import { v4 as uuidv4 } from "uuid"; import { v4 as uuidv4 } from "uuid";

View file

@ -1,5 +1,5 @@
import { BaseMessage, isAIMessage } from "@langchain/core/messages"; import { BaseMessage, isAIMessage } from "@langchain/core/messages";
import { createCodeReviewMarkTaskNotCompleteFields } from "@open-swe/shared/open-swe/tools"; import { createCodeReviewMarkTaskNotCompleteFields } from "@openswe/shared/open-swe/tools";
import { z } from "zod"; import { z } from "zod";
export function getCodeReviewFields( export function getCodeReviewFields(

View file

@ -1,5 +1,5 @@
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { LLMTask } from "@open-swe/shared/open-swe/llm-task"; import { LLMTask } from "@openswe/shared/open-swe/llm-task";
import { ModelManager, Provider } from "./llms/model-manager.js"; import { ModelManager, Provider } from "./llms/model-manager.js";
import { createLogger, LogLevel } from "./logger.js"; import { createLogger, LogLevel } from "./logger.js";
import { Runnable, RunnableConfig } from "@langchain/core/runnables"; import { Runnable, RunnableConfig } from "@langchain/core/runnables";
@ -16,7 +16,7 @@ import {
import { ChatResult, ChatGeneration } from "@langchain/core/outputs"; import { ChatResult, ChatGeneration } from "@langchain/core/outputs";
import { BaseLanguageModelInput } from "@langchain/core/language_models/base"; import { BaseLanguageModelInput } from "@langchain/core/language_models/base";
import { BindToolsInput } from "@langchain/core/language_models/chat_models"; import { BindToolsInput } from "@langchain/core/language_models/chat_models";
import { getMessageContentString } from "@open-swe/shared/messages"; import { getMessageContentString } from "@openswe/shared/messages";
import { getConfig } from "@langchain/langgraph"; import { getConfig } from "@langchain/langgraph";
import { MODELS_NO_PARALLEL_TOOL_CALLING } from "./llms/load-model.js"; import { MODELS_NO_PARALLEL_TOOL_CALLING } from "./llms/load-model.js";

View file

@ -1,11 +1,11 @@
import { Daytona, Sandbox, SandboxState } from "@daytonaio/sdk"; import { Daytona, Sandbox, SandboxState } from "@daytonaio/sdk";
import { createLogger, LogLevel } from "./logger.js"; import { createLogger, LogLevel } from "./logger.js";
import { GraphConfig, TargetRepository } from "@open-swe/shared/open-swe/types"; import { GraphConfig, TargetRepository } from "@openswe/shared/open-swe/types";
import { DEFAULT_SANDBOX_CREATE_PARAMS } from "../constants.js"; import { DEFAULT_SANDBOX_CREATE_PARAMS } from "../constants.js";
import { getGitHubTokensFromConfig } from "./github-tokens.js"; import { getGitHubTokensFromConfig } from "./github-tokens.js";
import { cloneRepo } from "./github/git.js"; import { cloneRepo } from "./github/git.js";
import { FAILED_TO_GENERATE_TREE_MESSAGE, getCodebaseTree } from "./tree.js"; import { FAILED_TO_GENERATE_TREE_MESSAGE, getCodebaseTree } from "./tree.js";
import { isLocalMode } from "@open-swe/shared/open-swe/local-mode"; import { isLocalMode } from "@openswe/shared/open-swe/local-mode";
const logger = createLogger(LogLevel.INFO, "Sandbox"); const logger = createLogger(LogLevel.INFO, "Sandbox");

View file

@ -1,10 +1,10 @@
import { Sandbox } from "@daytonaio/sdk"; import { Sandbox } from "@daytonaio/sdk";
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
import { TIMEOUT_SEC } from "@open-swe/shared/constants"; import { TIMEOUT_SEC } from "@openswe/shared/constants";
import { import {
isLocalMode, isLocalMode,
getLocalWorkingDirectory, getLocalWorkingDirectory,
} from "@open-swe/shared/open-swe/local-mode"; } from "@openswe/shared/open-swe/local-mode";
import { getLocalShellExecutor } from "./local-shell-executor.js"; import { getLocalShellExecutor } from "./local-shell-executor.js";
import { createLogger, LogLevel } from "../logger.js"; import { createLogger, LogLevel } from "../logger.js";
import { ExecuteCommandOptions, LocalExecuteResponse } from "./types.js"; import { ExecuteCommandOptions, LocalExecuteResponse } from "./types.js";

View file

@ -1,4 +1,4 @@
import { GraphConfig } from "@open-swe/shared/open-swe/types"; import { GraphConfig } from "@openswe/shared/open-swe/types";
export function shouldCreateIssue(config: GraphConfig): boolean { export function shouldCreateIssue(config: GraphConfig): boolean {
return config.configurable?.shouldCreateIssue !== false; return config.configurable?.shouldCreateIssue !== false;

Some files were not shown because too many files have changed in this diff Show more