Repository navigation
feat(data-aisa): verb-schema 声明 price_estimate_usd,版本升 0.10.3 - #76
Merged
Merged
Conversation
platform 侧(agenzo-platform `!495`,已合并)给 data-aisa 的 `describe` / `search` 加了 `price_estimate_usd` 字段:当 `price_usd` 为 null(用量计价、事前不可知)时, 给出一个数量级估价。`verb-schema.ts` 是 agent 读的运行时契约 —— 响应里出现了字段但 schema 不声明,agent 就不知道它存在,拿不到这个信号,于是会在一个可能超过 2 USD 的 调用前毫无预期地直接下手。所以这个声明必须跟着 platform 一起落地。 ## 改了什么 `dataDescribeSchema.response` 新增 `price_estimate_usd`,并把 `price_usd` 的说明 写准确: - 旧:`null = not knowable in advance; the actual amount comes back as cost_usd.` - 新:`0` 明确为免费;`null` 说成「没有固定价(按用量计价)」,并指向 `price_estimate_usd` 看量级、`cost_usd` 看实付。 `price_estimate_usd` 的说明里写明两件事:**只在 `price_usd` 为 null 时出现**(两者 互斥,不会同时给,否则调用方要犹豫该看哪个),以及**它不是承诺价**,只给量级 —— 措辞里直接点出「有些单次调用超过 2 USD」,这个量级信息是它存在的全部理由。 `dataSearchSchema.response.results` 的条目说明同步补上该字段,口径与 describe 一致。 ## 验证 - `tsc --noEmit` 退出码 0; - `vitest run` 全量 **1007 passed / 2 skipped**(66 文件通过,1 文件 skip 的是需要 真实环境的 hotel-e2e); - `npm run build` 五个包全部 build success,merchant-cli 产物按 0.10.3 打出。 版本 `0.10.2` → `0.10.3`:纯新增字段声明,对既有调用方向后兼容,走 patch 位。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
为什么要改
platform 侧(
agenzo-platformMR!495,已合并到 develop)给 data-aisa 的describe/search加了price_estimate_usd:当price_usd为null(按用量计价、事前不可知)时,给出一个数量级估价。verb-schema.ts是 agent 读的运行时契约。响应里出现了字段但 schema 不声明,agent 就不知道它存在 —— 于是在一个可能超过 2 USD 的调用前毫无预期地直接下手。所以这个声明必须跟着 platform 一起落地,不能等。改了什么
dataDescribeSchema.response新增
price_estimate_usd,并把price_usd的说明写准确:null = not knowable in advance; the actual amount comes back as cost_usd.0明确为免费;null说成"没有固定价(按用量计价)",并分别指向price_estimate_usd看量级、cost_usd看实付price_estimate_usd的说明里写了两件事,都是刻意的:price_usd为 null 时出现 —— 两者互斥,不会同时给。有确定价的时候再给一个估价,只会让调用方犹豫该看哪个。dataSearchSchema.response.results条目说明同步补上该字段,口径与
describe一致({operationId, method, tags, summary, price_usd}加上price_usd为 null 时的price_estimate_usd)。版本
@agenzo/merchant-cli0.10.2→0.10.3。纯新增字段声明,对既有调用方向后兼容,走 patch 位。合并后发 npm,下游
agenzo-agent-orchestrator-base的Dockerfile里ARG MERCHANT_CLI_VERSION会跟着升到0.10.3。验证
tsc --noEmit→ 退出码 0vitest run→ 1007 passed / 2 skipped(66 文件通过;skip 的hotel-e2e需要真实环境)npm run build→ 五个包全部 build success,merchant-cli 产物按 0.10.3 打出