This repository was archived by the owner on Sep 7, 2026. It is now read-only.
Add agnes-media: image/video generation via Agnes AI API - #11
Closed
Fectivnfy112357 wants to merge 1 commit into
Closed
Fectivnfy112357 wants to merge 1 commit into
Fectivnfy112357 wants to merge 1 commit into
Conversation
Agent-plugin contribution for the community registry: plugins/Fectivnfy112357/agnes-media/
hetaoBackend
suggested changes
Aug 14, 2026
hetaoBackend
left a comment
Owner
There was a problem hiding this comment.
暂不符合收录门禁,当前 credential 与下载边界不安全:
- --api-key 会把 secret 放进 shell history/进程参数;Skill 还会静默扫描 ~/.hermes/.env、AppData 等其他工具的配置并把找到的 key 发给远端。请移除命令行 key,改为明确的环境变量/受控配置,并且不要跨产品目录自动发现凭据。
- README 声明只连接 apihub.agnes-ai.com,但下载逻辑会无条件跟随 API 返回的任意 URL,实际可能连接其他域名。请校验/allowlist 下载目标或准确披露;同时限制响应/下载大小、校验 content type,并使用安全文件名。
- 图像/视频输入会把本地文件完整发送到付费第三方服务。Skill 必须在发送前让用户确认具体文件、目标、数据用途和可能费用,不能仅在 README 泛化披露。
- 500/503 创建请求自动重试对付费生成可能重复计费/生成;除非 API 有 idempotency key 或明确幂等契约,不应自动重试 mutating POST。请禁用或实现可靠幂等。
- 请补离线 mock-server 测试覆盖 credential 来源、重试、轮询、任意下载 URL、超大响应和错误脱敏。
validator 通过只证明包结构,不证明付费远端调用安全。
hetaoBackend
suggested changes
Aug 15, 2026
hetaoBackend
left a comment
Owner
There was a problem hiding this comment.
@Fectivnfy112357 当前 head 仍存在多项高风险 blocker,暂不适合收录:
- 接受
--api-key并静默扫描 Hermes 的多个凭据目录;secret 会进入 shell history/process args,也越界读取其他产品目录。 - 无条件下载 API 返回的任意 URL,跟随 redirect,无协议/域名/content-type/大小限制;
vid可作为路径逃逸文件名写出--out。 - 响应、本地输入、base64 和下载均无大小上限,存在内存/磁盘耗尽及半写文件风险。
- 对付费生成 POST 的 500/503 自动重试,但没有 idempotency key 或上游幂等证据,可能重复计费。
- 上传本地文件和触发付费生成前缺少目标、文件、用途和费用确认。
- 没有 plugin-specific 离线安全测试;当前通用
npm run check通过不能覆盖上述行为。
请先整体重做凭据、下载、付费幂等和确认边界,再提交可复现离线测试。
Fectivnfy112357
marked this pull request as draft
August 15, 2026 16:33
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What it solves
Calling a production media-generation API from an agent means juggling
request payloads, async task queues, polling and file download — error-prone
and slow to repeat. agnes-media wraps both Agnes AI production models
(
agnes-image-2.1-flashsync images,agnes-video-v2.0async videos) behinda single stdlib-only Python script:
imagefor seconds-fast images,videofor minute-scale videos with automatic frame-count math (
8n+1) and built-inpolling.
Try it
Install from
/plugins→ Local, then ask:Expected result: the generated image saved to the output directory
(default
~/Downloads), with the script printingok=trueand the filepaths.
Direct usage:
Dependencies and platforms
--api-key, theAGNES_API_KEYenvironment variable, or an.envfile.Network and data
apihub.agnes-ai.com).stored in this plugin's directory.
video tasks.
Test evidence
npm run validate→OK plugin Fectivnfy112357/agnes-mediawith polling, image-to-image and keyframes paths in active use).