mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-07 16:19:09 +00:00
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)
20 lines
553 B
Python
20 lines
553 B
Python
from __future__ import annotations
|
|
|
|
import uuid
|
|
|
|
|
|
async def test_report_platform_issue_returns_uuid7_report_id() -> None:
|
|
from agent.tools.report_platform_issue import report_platform_issue
|
|
|
|
result = await report_platform_issue()
|
|
|
|
assert set(result) == {"report_id"}
|
|
report_id = uuid.UUID(result["report_id"])
|
|
assert report_id.version == 7
|
|
assert report_id.variant == uuid.RFC_4122
|
|
|
|
|
|
def test_report_platform_issue_exported() -> None:
|
|
from agent.tools import report_platform_issue
|
|
|
|
assert callable(report_platform_issue)
|