Skip to content

Releases: Jack-Liang/sap-for-agents

v0.4.11

Choose a tag to compare

@github-actions github-actions released this 14 Aug 14:38

Feature / 新功能

  • 新增 ADT REST 通用代理 ANY /api/adt/{path}:把 SAP ICF 上的 ADT REST API(/sap/bc/adt/**,Eclipse ADT 用的同一套)1:1 透传到网关,用于 dump 正文、ABAP 类源码读写等开发对象操作。
    New generic ADT REST proxy ANY /api/adt/{path}: transparently forwards to the SAP ADT REST API (/sap/bc/adt/** — the same API Eclipse ADT uses), for short-dump inspection, ABAP class source read/write and other development-object operations.

    • 读操作(GET)直接透传;典型用法:/api/adt/runtime/dumps(ST22 dump 列表)、/api/adt/runtime/dump/<key>/formatted(dump 全文)、/api/adt/oo/classes/<name>/source/main(类源码)。
      GETs are forwarded as-is; e.g. /api/adt/runtime/dumps (dump list), /api/adt/runtime/dump/<key>/formatted (full ST22 text), /api/adt/oo/classes/<name>/source/main (class source).
    • 写方法(POST/PUT/DELETE/PATCH)自动获取并携带 X-CSRF-Token + 会话 Cookie,遇 403 自动刷新重试一次;凭据由网关统一持有。
      Write methods automatically fetch and attach the X-CSRF-Token + session cookie (one automatic retry on 403); credentials are held by the gateway.
    • ETag / Last-Modified / If-Match / If-None-Match 双向透传,支持乐观锁写流程(如类源码更新)。
      ETag / Last-Modified / If-Match / If-None-Match are passed through both ways, enabling optimistic-locking write flows (e.g. class source updates).
    • 路径按原始 percent-encoded 形式转发(保留 %2F/%20 等编码意图),解码仅用于安全校验(拒绝 .. 段与控制字符)。
      Paths are forwarded with their original percent-encoding; decoding is only used for safety checks (rejecting .. segments and control characters).
    • ADT 自身的 HTTP 状态码与响应体原样透传;网关侧故障才走 JSON 错误契约:400 ADT_PATH_INVALID / 502 ADT_UNREACHABLE / 503 ADT_DISABLED / 504 ADT_TIMEOUT
      ADT's own status codes and bodies pass through verbatim; only gateway-side failures use the JSON error contract: 400 ADT_PATH_INVALID / 502 ADT_UNREACHABLE / 503 ADT_DISABLED / 504 ADT_TIMEOUT.

Configuration / 配置

  • SAP_ADT_BASE_URL:ADT 基地址,默认 http://<SAP_ASHOST>:50000;显式设为空串可禁用代理(503 ADT_DISABLED)。
    SAP_ADT_BASE_URL: ADT base URL, defaults to http://<SAP_ASHOST>:50000; set to an empty string to disable the proxy (503 ADT_DISABLED).
  • SAP_ADT_USER / SAP_ADT_PASSWD:代理认证,默认沿用 SAP_USER / SAP_PASSWD
    SAP_ADT_USER / SAP_ADT_PASSWD: proxy credentials, default to SAP_USER / SAP_PASSWD.
  • 需要目标系统启用 ADT ICF 服务(SICF)。
    Requires the ADT ICF service to be active in the target system (SICF).

Docs / 文档

  • AGENTS.md / AGENTS.zh-CN.md、.env.example 同步新增端点与配置说明。
    AGENTS.md / AGENTS.zh-CN.md and .env.example document the new endpoint and configuration.

Full Changelog: v0.4.10...v0.4.11

v0.4.10

Choose a tag to compare

@github-actions github-actions released this 14 Aug 14:38

Fix / 修复

  • 支持 SAP 命名空间函数 /NS/NAME(如 /SDF/EWA_GET_ABAP_DUMPS/BOBF/R_FRUIT):

    • func_name 校验放行命名空间前缀形态——斜杠只允许成对出现在 /NS/ 前缀处,两段均须为合法标识符;畸形形态(FOO/BAR/SDF//X、多余/尾斜杠等)仍被拒绝。
    • /api/functions/{name}/doc/source 路由改为通配捕获 + 尾部分发,路径自带斜杠的命名空间函数名现在可以正常访问(原始斜杠与 %2F 编码两种 URL 形式均支持)。

    Namespaced function modules /NS/NAME (e.g. /SDF/EWA_GET_ABAP_DUMPS, /BOBF/R_FRUIT) are now accepted: validation allows an optional /NS/ prefix (slashes only there, both segments valid identifiers; malformed forms still rejected), and the /api/functions/{name}[/doc|/source] routes use wildcard capture + suffix dispatch so names containing slashes resolve correctly (both raw-slash and %2F-encoded URLs work).

Docs / 文档

  • AGENTS.md / AGENTS.zh-CN.md 同步上述行为。
    AGENTS.md / AGENTS.zh-CN.md updated accordingly.

Full Changelog: v0.4.9...v0.4.10

v0.4.9

Choose a tag to compare

@github-actions github-actions released this 14 Aug 09:02

Fixes / 修复

  • RFC_RC 常量值与 NWRFC SDK 头文件对齐RFC_NOT_FOUND 18→17):此前部分错误码会被误判。
    RFC_RC constant values aligned with the NWRFC SDK headers (RFC_NOT_FOUND 18→17); some return codes were previously misclassified.
  • table_outputs / struct_outputs 小写字段名静默返回空值:字段名现在统一按大写匹配(实测修复 BAPI_USER_GETLIST 小写 username 读不到值的问题)。
    Lowercase field names in table/struct outputs silently returned empty values; field names are now normalized to uppercase.
  • 非 BMP 字符截断:写入字符串参数的长度改用 UTF-16 码元计数,emoji 等 4 字节 UTF-8 字符不再被截断。
    String input length is now measured in UTF-16 code units, so non-BMP characters (emoji, rare CJK) are no longer truncated.
  • function_docshort_text 不再用首个参数的描述冒充函数说明。
    short_text no longer falls back to the first parameter's description.

Hardening / 加固

  • table_outputs / read_return 增加输出行数上限(MAX_OUTPUT_ROWS = 10000),防止大结果集 OOM/DoS。
    Output rows from table_outputs / read_return are capped at 10,000 rows to prevent OOM/DoS from huge result sets.
  • timeout_secs 钳制到 [1, 1800] 秒,防止恶意长超时长期占用连接池。
    Per-request timeout_secs is clamped to [1, 1800] seconds to prevent connections being held by abusive timeouts.
  • 超时与限流 fallback 路径补充告警日志,提升可观测性。
    Warning logs added on timeout / rate-limit fallback paths for better observability.

Improvements / 改进

  • write_outputs 按 DDIC 真实类型分派 setter(INT / INT8 / FLOAT / XSTRING)。
    write_outputs now dispatches typed setters by DDIC type (INT / INT8 / FLOAT / XSTRING).
  • auto 标量读取使用 metadata 中的真实长度,替代硬编码 255。
    auto scalar reads use the metadata length instead of a hardcoded 255.
  • .gitignore 忽略 servers.toml,防止 server 凭据误提交。
    servers.toml is now git-ignored to avoid committing credentials.

Docs / 文档

  • 文档与欢迎页中英双语化。
    Docs and the welcome page are now bilingual (EN / 简体中文).
  • 欢迎页补充 /api/table/read 端点说明(补 v0.4.8 遗漏)。
    Welcome page now documents the /api/table/read endpoint.

Full Changelog: v0.4.8...v0.4.9

v0.4.8

Choose a tag to compare

@github-actions github-actions released this 13 Aug 15:43

Full Changelog: v0.4.7...v0.4.8

Full Changelog: v0.4.7...v0.4.8

Full Changelog: v0.4.7...v0.4.8

Full Changelog: v0.4.7...v0.4.8

Full Changelog: v0.4.7...v0.4.8

v0.4.7

Choose a tag to compare

@github-actions github-actions released this 13 Aug 14:44

Full Changelog: v0.4.6...v0.4.7

Full Changelog: v0.4.6...v0.4.7

Full Changelog: v0.4.6...v0.4.7

Full Changelog: v0.4.6...v0.4.7

Full Changelog: v0.4.6...v0.4.7

v0.4.6

Choose a tag to compare

@github-actions github-actions released this 13 Aug 14:28

Full Changelog: v0.4.5...v0.4.6

Full Changelog: v0.4.5...v0.4.6

Full Changelog: v0.4.5...v0.4.6

Full Changelog: v0.4.5...v0.4.6

Full Changelog: v0.4.5...v0.4.6

v0.4.5

Choose a tag to compare

@github-actions github-actions released this 13 Aug 14:17

Full Changelog: v0.4.4...v0.4.5

Full Changelog: v0.4.4...v0.4.5

Full Changelog: v0.4.4...v0.4.5

Full Changelog: v0.4.4...v0.4.5

Full Changelog: v0.4.4...v0.4.5

v0.4.4

Choose a tag to compare

@github-actions github-actions released this 13 Aug 14:02

Full Changelog: v0.4.3...v0.4.4

Full Changelog: v0.4.3...v0.4.4

Full Changelog: v0.4.3...v0.4.4

Full Changelog: v0.4.3...v0.4.4

Full Changelog: v0.4.3...v0.4.4

v0.4.3

Choose a tag to compare

@github-actions github-actions released this 13 Aug 13:42

Full Changelog: v0.4.2...v0.4.3

Full Changelog: v0.4.2...v0.4.3

Full Changelog: v0.4.2...v0.4.3

Full Changelog: v0.4.2...v0.4.3

v0.4.2

Choose a tag to compare

@github-actions github-actions released this 11 Aug 16:38

Full Changelog: v0.4.1...v0.4.2

Full Changelog: v0.4.1...v0.4.2

Full Changelog: v0.4.1...v0.4.2