open-swe/agent/tools/__init__.py
Adam Moussa b65a99f3e9
feat: re-land scoped AGENTS auto-load (#1684) + platform issue reporting tool (#1685) (#129)
* feat: auto-load scoped AGENTS on reads (#1684)

Adapted from upstream langchain-ai/open-swe #1684 to the fork's
direct-import middleware registry and middleware stack ordering.
Adds SubdirAgentsReadMiddleware, which appends applicable ancestor
AGENTS.md instructions to read_file results once per run, so scoped
rules are visible before edits. Wired into get_agent immediately after
ToolErrorMiddleware, matching upstream's relative position.

Note: this changes file-read behavior for every main-agent run. The
reviewer graph uses its own leaner middleware stack and is unaffected.

(cherry picked from commit 7f7af71547be2199cea699284676f8ceefba7691)

* feat: add platform issue reporting tool (#1685)

Adapted from upstream langchain-ai/open-swe #1685 to the fork's
direct-import tool registry. Adds the report_platform_issue tool
(stdlib-only: returns a locally generated UUIDv7 report id, no external
network call) and wires it into get_agent's curated tool list.

Dropped upstream's test_task_retry_wraps_inside_tool_error_middleware
assertion, which references ToolRetryMiddleware that this fork does not
wire into the middleware stack.

(cherry picked from commit 88b62322b44103335773002d0745704cd96e9160)

---------

Co-authored-by: Ramon Nogueira <ramon.nogueira@langchain.dev>
2026-07-08 18:52:01 -04:00

61 lines
2.1 KiB
Python

from .add_finding import add_finding
from .enter_plan_mode import enter_plan_mode
from .fetch_url import fetch_url
from .http_request import http_request
from .linear_comment import linear_comment
from .linear_create_issue import linear_create_issue
from .linear_delete_issue import linear_delete_issue
from .linear_get_issue import linear_get_issue
from .linear_get_issue_comments import linear_get_issue_comments
from .linear_list_teams import linear_list_teams
from .linear_update_issue import linear_update_issue
from .list_findings import list_findings
from .list_review_findings import list_review_findings
from .open_pull_request import open_pull_request
from .publish_review import publish_review
from .read_repo_file import read_repo_file
from .reply_to_finding_thread import reply_to_finding_thread
from .report_platform_issue import report_platform_issue
from .request_pr_review import request_pr_review
from .resolve_finding_thread import resolve_finding_thread
from .save_plan import save_plan
from .schedule_thread_wakeup import schedule_thread_wakeup
from .search_repo_code import search_repo_code
from .slack_add_reaction import slack_add_reaction
from .slack_read_thread_messages import slack_read_thread_messages
from .slack_start_new_thread import slack_start_new_thread
from .slack_thread_reply import slack_thread_reply
from .update_finding import update_finding
from .web_search import web_search
__all__ = [
"add_finding",
"enter_plan_mode",
"fetch_url",
"http_request",
"linear_comment",
"linear_create_issue",
"linear_delete_issue",
"linear_get_issue",
"linear_get_issue_comments",
"linear_list_teams",
"linear_update_issue",
"list_findings",
"list_review_findings",
"open_pull_request",
"publish_review",
"read_repo_file",
"report_platform_issue",
"request_pr_review",
"reply_to_finding_thread",
"resolve_finding_thread",
"save_plan",
"schedule_thread_wakeup",
"search_repo_code",
"slack_add_reaction",
"slack_read_thread_messages",
"slack_start_new_thread",
"slack_thread_reply",
"update_finding",
"web_search",
]