open-swe/packages/shared/src/constants.ts
Aliyan Ishfaq 2a05332693
[open-swe] feat: integrate MCPDoc Server into planner and programmer (#349)
* feat: added LangGraph's MCP server

* chore: code cleaning

* fix: packages fix

* feat: mcp servers user configurable

* chore: code cleaning

* chore: formatting fixes

Co-authored-by: Brace Sproul <braceasproul@gmail.com>

* fix: types for http streamable mcp

* chore: yarn file updated

* chore: linting errors

* cr

* Update apps/open-swe/src/utils/mcp-client.ts

---------

Co-authored-by: Brace Sproul <braceasproul@gmail.com>
2025-07-08 19:39:17 +00:00

38 lines
1.4 KiB
TypeScript

export const TIMEOUT_SEC = 60; // 1 minute
export const SANDBOX_ROOT_DIR = "/home/daytona";
export const SNAPSHOT_NAME = "daytonaio/langchain-open-swe:0.1.0";
export const PLAN_INTERRUPT_DELIMITER = ":::";
export const PLAN_INTERRUPT_ACTION_TITLE = "Approve/Edit Plan";
// Prefix the access token with `x-` so that it's included in requests to the LangGraph server.
export const GITHUB_TOKEN_COOKIE = "x-github-access-token";
export const GITHUB_INSTALLATION_TOKEN_COOKIE = "x-github-installation-token";
export const GITHUB_INSTALLATION_NAME = "x-github-installation-name";
export const DO_NOT_RENDER_ID_PREFIX = "do-not-render-";
export const GITHUB_AUTH_STATE_COOKIE = "github_auth_state";
export const GITHUB_INSTALLATION_ID_COOKIE = "github_installation_id";
export const GITHUB_TOKEN_TYPE_COOKIE = "github_token_type";
export const MANAGER_GRAPH_ID = "manager";
export const PLANNER_GRAPH_ID = "planner";
export const PROGRAMMER_GRAPH_ID = "programmer";
export const GITHUB_USER_ID_HEADER = "x-github-user-id";
export const GITHUB_USER_LOGIN_HEADER = "x-github-user-login";
export const DEFAULT_MCP_SERVERS = {
"langgraph-docs-mcp": {
command: "uvx",
args: [
"--from",
"mcpdoc",
"mcpdoc",
"--urls",
"LangGraphPY:https://langchain-ai.github.io/langgraph/llms.txt LangGraphJS:https://langchain-ai.github.io/langgraphjs/llms.txt",
"--transport",
"stdio",
],
stderr: "inherit" as const,
},
};