Repository navigation
feat(cli): data-aisa 命令组 —— AIsa 只读信息查询的四个 verb - #72
Merged
Merged
Conversation
新增 `agenzo-merchant-cli data-aisa` 命令组,把 AIsa 的只读信息查询能力 (加密货币、市场、Web 与新闻、SEO、社交、预测市场、研究)暴露给编排器: - list-categories:列出数据类目与各自的能力数(免费,读内置索引,不走上游) - search:按关键词找能力,返回 operationId / method / path / tags / summary / price_usd(免费,同样只读内置索引) - describe:读某个能力的参数规格、调用提示与单价(免费) - query:执行一次能力调用并返回数据(按次计费) 四个 verb 全部只读:不下单、不收款。因此没有一个 verb 带 --yes 或 --watch, --idempotency-key 也只是可选 —— 缺省时请求照发(不提示、不自动生成), 去重退到结果缓存。 两处命名约定: - flag 名用连字符形式(operation-id / idempotency-key),因为编排器按同一批 名字拼 `--<flag>`; - 响应字段保留上游索引自己的大小写(operationId),让转发的 id 在整条链路上 逐字节一致。 verb-schema 里的 dataSchema() 用具名对象传 flags / response,而不是像 flightSchema 那样位置传参 —— 跨仓的 flag 名一致性检查直接从本文件文本里读 `flags:` / `response:`,位置参数没有可供识别的键。 测试:apps/merchant-cli/tests/data-aisa.test.ts 覆盖四个 verb 的参数解析、 必填校验、输出投影与错误路径。
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.
做了什么
新增
agenzo-merchant-cli data-aisa命令组,把 AIsa 的只读信息查询能力(加密货币、市场、Web 与新闻、SEO、社交、预测市场、研究)暴露给编排器:list-categoriessearchoperationId/method/path/tags/summary/price_usddescribequery四个 verb 全部只读:不下单、不收款。因此没有一个 verb 带
--yes或--watch,--idempotency-key也只是可选 —— 缺省时请求照发(不提示、不自动生成),去重退到结果缓存。两处命名约定
operation-id/idempotency-key),因为编排器按同一批名字拼--<flag>。operationId),让转发的 id 在整条链路上逐字节一致。verb-schema.ts里的dataSchema()用具名对象传flags/response,而不是像flightSchema那样位置传参 —— 跨仓的 flag 名一致性检查直接从本文件文本里读flags:/response:,位置参数没有可供识别的键。改动范围
index.ts的 17 行是 4 条 import 加data-aisa命令组的注册(沿用本仓既有的注入式 register 写法),没有改动任何既有命令。验证
本分支已 rebase 到最新
main(8f405c4),在该基线上跑:npm run test(vitest run)npm run type-check(tsc --noEmit)npm run check:error-codestests/data-aisa.test.ts的 268 行覆盖四个 verb 的参数解析、必填校验、输出投影与错误路径。上下游
这是 AIsa 接入六仓链路的第三环。上游已就绪:
agenzo-providersv0.1.16 已发布(aisa-provider包在 registry)agenzo-platform的/data/*四个只读端点已合入 develop 并部署到 dev合并后本包需发 npm,下游的
-base与 toolkit 才能接着改。