用途:pachca-files 是 Pachca OpenAPI 的自动发现技能,聚焦文件上传相关操作,涉及两个接口:POST /direct_url 用于上传文件;POST /uploads 用于获取签名、密钥及其他参数。
主要能力:通过 Pachca 命令行工具调用上述接口完成文件上传流程,支持用 token 直接调用或使用已保存的配置文件。
使用方式:需要向用户索取 Pachca token(机器人:Automations → Integrations → API;用户:Automations → API)。 通过 npx 运行命令并使用 --token: npx -y @pachca/cli <command> --token $PACHCA_TOKEN 或设置环境变量: export PACHCA_TOKEN=<token> npx -y @pachca/cli <command> 帮助与流程:npx -y @pachca/cli --help、npx -y @pachca/cli guide。 若已有保存的 profile,先检查:npx -y @pachca/cli auth status;若正常则无需 --token。若未配置 profile,则索取 token 并使用 --token:npx -y @pachca/cli auth status --token $PACHCA_TOKEN。若不熟悉参数,运行 pachca <command> --help。 成功使用后,可建议全局安装:npm install -g @pachca/cli && pachca auth login --token $PACHCA_TOKEN。
限制:限速约 50 请求/秒,遇到 429 需等待后重试。若不确定如何完成任务,可阅读 references/ 下相应文件。
适用场景:需要在 Pachca 中上传文件或获取上传所需签名与参数时。其余细节(如具体请求体、返回字段、错误码等)暂未提供。