[实验性] 从 OpenAPI 文档或现有目录生成连接器创作文件。
Synopsis
生成连接器创作文件(tool.yaml 和 tool_defs.yaml)用于连接器预览。
三种互斥模式:
--spec FILE-OR-URL: 将 OpenAPI 3.0 文档编译为完整的目录,并在不存在 tool.yaml 时对其进行构建。--tool-defs FILE:仅为现有本地目录构建 consumer tool.yaml。目录永远不会被重写。--config tool.yaml: 重新生成一个本地拥有的目录,其 tool.yaml 声明了 source.spec。
使用 --spec 时必须提供连接器名称,使用 --tool-defs 时默认目录名称。
tool.yaml 以从文档的安全方案中建议的 auth 块开始。OAuth 2.0 和 OpenID Connect 需要 --提供商,即每次调用都会提供其令牌的项目 OAuth 应用;应用的授权决定了工具是作为每个用户调用,还是作为代理自己的客户端调用。--scopes 替换了公开的操作所声明的范围。HTTP bearer、HTTP basic 和 API 密钥绑定以连接器命名的工作区密钥,示例 JIRA_TOKEN。--auth none、bearer、basic 或 api_keys 替换了每个操作上的建议。
URL 输入根据平台传输策略进行获取。生成器在 runner-base 辅助工具/辅助程序容器内运行,因此该命令需要 Docker。
成功时退出 0,输入被拒绝或生成失败时退出 1,辅助工具/辅助程序容器或网络传输失败时退出 2。
实验性功能:标志、输出格式和生成的文件格式可能会发生变化,恕不另行通知。
agentengine agent create-tool [name] [flags]选项
--allow string Comma-separated operation allow list (default: allow_all) --auth string Credential to present instead of the one the document proposes: none, bearer, basic, or api_keys --base-url string Tenant API base URL for the authoring file --config string Existing tool.yaml that declares source.spec; regenerates its catalog-h, --help help for create-tool --out-dir string Connector folder for the generated files (required with --spec/--tool-defs) --provider string Project OAuth app whose token each call presents --scopes string Comma-separated OAuth scopes with --provider (default: the scopes the exposed operations declare) --skip-unsupported Exclude operations the preview cannot represent instead of failing; every skip is printed and recorded in the catalog's provenance --spec string OpenAPI 3.0 document (local file or HTTPS URL) to compile --timeout duration Helper container timeout (default 5m0s) --tool-defs string Existing local catalog to scaffold tool.yaml for从父命令继承的选项
--log-file string override log file path --log-level string file log verbosity (error|warn|info|debug) (default "info") --no-log disable file logging-q, --quiet silence stderr below error-v, --verbose count raise stderr verbosity (-v info, -vv debug)另请参阅
- agentengine 代理 - 检查、编辑和生成代理配置。