Repository navigation
v0.5.4
更新说明 · 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字段里补一句"这通常意味着什么、可以先做什么"。
- id 格式错误(如
其他变更
- 内部重构:块类型、颜色角色、输出上限等改为集中的冻结常量,
classifyBlock只引用常量。工具可观测行为不受影响。 - README:删去自测项数等维护者指标;把无法验证的断言改为可验证的说法("由 schema 生成,改代码时会跟着变");
版本链接改指 Releases(不再引用CHANGELOG.md)。
Full Changelog: v0.5.2...v0.5.4
New Features
None.
Upgrade Notes
⚠️ Every tool now returnsok. Previouslylanhu_list_teams/lanhu_list_designs/lanhu_read_designreturned no
okfield and success had to be inferred from other fields. Code branching onokreceivedundefinedfrom these three.- The npm package no longer ships
CHANGELOG.md(as of v0.5.4). Version history lives in git and in Releases;docs/
andREADME.mdare 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_designsandlanhu_read_designreturned nookfield.
This is now guaranteed at the tool success exit — all 15 tools always returnok. - Failures stated the cause but offered no next step:
- A malformed id (e.g.
imageId: 'not-a-uuid') used to surface the upstreamcode=10009:Image not exist. It is now
caught locally and reports an actionable next step (for example, "get an imageId fromlanhu_list_designsfirst"). - 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
hintfield explains what it
usually means and what to try first.
- A malformed id (e.g.
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 ofCHANGELOG.md.
Full Changelog: v0.5.2...v0.5.4