Skip to content

v0.5.4

Choose a tag to compare

@LoktLin LoktLin released this 08 Oct 06:32
· 16 commits to main since this release

中文 | English

更新说明 · v0.5.3 → v0.5.4

新增功能

无新增功能。

升级注意

  • ⚠️ 所有工具的返回值现在都带 ok。此前 lanhu_list_teams / lanhu_list_designs / lanhu_read_design 三个工具
    没有 ok 字段,只能靠别的字段推断成败。如果你的代码用 ok 判断成功与否,这三个工具以前拿到的是 undefined。
  • npm 包不再包含 CHANGELOG.md(v0.5.4 起)。版本历史改由 git 与 Releases 承载;docs/ 与 README.md 照常随包发布。
  • 工具的入参、返回字段语义、输出文本与 v0.5.2 一致 —— 除下面两条修复外没有行为变化。

问题修复

  • 返回信封不完整:lanhu_list_teams、lanhu_list_designs、lanhu_read_design 的返回缺少 ok 字段。
    现在在工具成功出口统一补齐 —— 全部 15 个工具都保证返回 ok。
  • 失败只说原因、不说下一步:
    • id 格式错误(如 imageId: 'not-a-uuid')以前把上游的 code=10009:Image not exist 直接抛给调用方;
      现在在本地就拦下,并给出可执行的下一步(例如"先用 lanhu_list_designs 取一个 imageId")。
    • 参数不符合 schema(缺必填、类型错)以前只说"字段不合法";现在会指出怎么补齐。
    • 上游错误仍原文透传,不改写、不吞 —— 只是在 hint 字段里补一句"这通常意味着什么、可以先做什么"。

其他变更

  • 内部重构:块类型、颜色角色、输出上限等改为集中的冻结常量,classifyBlock 只引用常量。工具可观测行为不受影响。
  • README:删去自测项数等维护者指标;把无法验证的断言改为可验证的说法("由 schema 生成,改代码时会跟着变");
    版本链接改指 Releases(不再引用 CHANGELOG.md)。

Full Changelog: v0.5.2...v0.5.4


New Features

None.

Upgrade Notes

  • ⚠️ Every tool now returns ok. Previously lanhu_list_teams / lanhu_list_designs / lanhu_read_design returned no
    ok field and success had to be inferred from other fields. Code branching on ok received undefined from these three.
  • The npm package no longer ships CHANGELOG.md (as of v0.5.4). Version history lives in git and in Releases; docs/
    and README.md are still published with the package.
  • Parameters, return-field semantics and output text are unchanged from v0.5.2 apart from the two fixes below.

Bug Fixes

  • Incomplete response envelope: lanhu_list_teams, lanhu_list_designs and lanhu_read_design returned no ok field.
    This is now guaranteed at the tool success exit — all 15 tools always return ok.
  • Failures stated the cause but offered no next step:
    • A malformed id (e.g. imageId: 'not-a-uuid') used to surface the upstream code=10009:Image not exist. It is now
      caught locally and reports an actionable next step (for example, "get an imageId from lanhu_list_designs first").
    • Schema rejections (missing required, wrong type) used to say only which field was invalid; they now say how to fix it.
    • Upstream errors still pass through verbatim — nothing is rewritten or swallowed; a hint field explains what it
      usually means and what to try first.

Chores

  • Internal refactor: block kinds, colour roles and output limits moved into frozen central constants, and classifyBlock
    references them only. Observable tool behaviour is unchanged.
  • README: removed maintainer-facing counters, replaced unverifiable claims with verifiable wording ("generated from the
    schema, so it follows code changes"), and pointed the version link at Releases instead of CHANGELOG.md.

Full Changelog: v0.5.2...v0.5.4