用途:contract-cli 开放平台共享约定技能,在用户尚未指明命令模块时,帮助在 contract 与 mdm 模块间做出选择,并统一约束行为。开始前必须先读取 ../auth/SKILL.md,确认当前 profile、user 登录态以及 bot/token 约束。
模块选择:合同搜索、详情、创建、合同文本、模板、分类、枚举,读 ../contract-cli-contract/SKILL.md;交易方查询读 ../contract-cli-mdm-vendor/SKILL.md;法人实体查询读 ../contract-cli-mdm-legal/SKILL.md;字段配置查询读 ../contract-cli-mdm-fields/SKILL.md。若用户给出精确开放平台路径或结构化命令未覆盖,不要推荐 api call,它是预留能力,当前暂未开放使用。
已实现模块:contract get/search/create/sync-user-groups/text、contract upload-file、contract category list、contract template list/get/instantiate、contract enum list、mdm vendor list/get、mdm legal list/get、mdm fields list。
共享约束:contract/v1/mcp 这批路径大部分只支持 --as user;若命中 /open-apis/contract/v1/mcp/ 且未传 --as,CLI 会默认按 user 解析,不看 default_identity。只有部分结构化命令支持 bot。这批命令不暴露 --operator。请求体文件输入统一使用 --input-file;--file 只用于真实二进制文件上传,如 contract upload-file。--user-id-type 不传时默认拼接 user_id_type=user_id,显式传值会覆盖默认值;--user-id 传了就透传,不传就不带,不做命令级校验。默认输出建议用 json,排障时可加 --raw。
排障:报 only supports --as user 时切到 --as user;报 profile not found 时先执行 contract-cli config add --env dev --name <profile>;报 user identity is not authorized 时先执行 contract-cli auth login --profile <profile> --as user;文件上传目前只支持 contract upload-file --as bot --file <path> --file-type <type>。
限制:资料未说明其他未列出的命令、平台范围或收费信息。