chaoliu615/dsh-agnes

Plugin插件 Native原生 ⭐ 2 MIT Vision & Media视觉与多媒体

为在dsh中使用Agnes AI的免费图片、视频生成功能而开发,欢迎使用!欢迎提issues。

Project Overview项目介绍

dsh-agnes is a native DSH (DeepSeek Harness) Cordis plugin distributed as a standard bundle, and the repository is named dsh-agnes with a dsh.bundle manifest plus a cordis.patch.yml configuration layer that targets the DSH runtime exclusively. It registers two tools inside DSH sessions: agnes_image_generate, which calls Agnes at POST /v1/images/generations synchronously and supports text-to-image, image-to-image (reference images) and multi-image composition; and agnes_video_generate, which calls Agnes video endpoints for text-to-video, image-to-video and keyframe animation (≥2 frames, image and keyframes mutually exclusive) using an async task flow that posts to /v1/videos, polls every five seconds with a 900-second total budget, and reports completion, failure or timeout with the video_id. The video tool adapts between two parameter regimes based on the configured model name: V2.0 takes width/height/num_frames/frame_rate and uses presets (81/121/241/441 frames at 24fps); the 2.5/2.5-flash line uses OpenAI Videos-style integer seconds 4–12 with size of 720P/960P/2K (flash locked to 720P) and aspect_ratio matched from a whitelist. Installation is via dsh plugin --profile web add dsh-agnes (npm, recommended, pre-built), dsh plugin --profile web add github:chaoliu615/dsh-agnes, or a packed tarball, and the package depends on DSH-provided peer modules @deepseek-ai/cordis, @deepseek-ai/dsh-credentials, @deepseek-ai/dsh-llm, @deepseek-ai/dsh-settings, @deepseek-ai/dsh-shell, and @deepseek-ai/dsh-tools; Node.js ≥ 20 is required.

The typical workflow starts with configuring AGNES_API_KEY inside DSH credentials — sources include startup environment variables, $DSH_HOME/.credentials.yaml, project or user .env files, or the in-app input on the Settings page — after which the key is forwarded to curl via the process environment so it never appears on the command line, and missing keys raise an explanatory error instead of issuing any request. Once loaded, the plugin contributes an "Agnes" tab to DSH's web settings UI served at /plugins/dsh-agnes/client.js, where users pick models from a dropdown aligned with docs/agnes-ai/ (agnes-image-2.1-flash, agnes-video-v2.0, agnes-video-2.5-flash) and configure defaults such as image size tier (1K–4K), aspect ratio (eight presets with scenario labels), video canvas/clarity, frame count (8n+1 rule, ≤441), frame rate (1–60, presets 24/30), and integer seconds for 2.5 models. Switching the video model automatically reshapes the form: V2.0 exposes width/height/num_frames/frame_rate; 2.5 hides frame rate and replaces frame counts with a 4–12 seconds selector; flash models collapse size to 720P. Persisted changes are atomically written to ~/.dsh/settings.yaml under the agnes: key, validated against a schema with revision gating (e.g., invalid num_frames errors at save time), and every tool call re-reads the resolved values, so updates take effect immediately without restarting the host; old or unknown model identifiers remain usable and surface as "(current)" in the dropdown. The product is aimed at users and teams who want Agnes image and video generation inside DSH without hand-rolling API plumbing or settings UI.

Dependencies and first-run caveats: Node.js ≥ 20 and the DSH-internal peer packages listed above; the npm tarball ships a pre-built lib/ plus cordis.patch.yml, while the GitHub source path triggers pnpm install to run prepare via tsdown. With pnpm ≥ 10 the default behavior is to block build scripts, so a first-time GitHub install must add allowBuilds: dsh-agnes: true to the target profile's pnpm-workspace.yaml; pinning a commit SHA (github:chaoliu615/dsh-agnes#<sha>) is recommended to prevent silent code changes. Practical limits include: V2.0 frames must satisfy 8n+1 and stay ≤441, 2.5-flash is locked to 720P with a five-keyframe ceiling, image requests accept only public HTTPS URLs or data:image/*;base64,… URIs, and very large images returned as b64_json may exceed the capture cap (URLs are preferred). Browser-half registration requires dsh.client to be detected at host start, so users upgrading an older install to add the UI must restart the web profile once; fresh installs need no extra step. The client UI uses only DSH theme tokens (Theme.listTokens aliases plus color-mix), declares color-scheme: light dark, and ships a built-in zh/en copy dictionary. License is MIT, and publishing to npm ships only lib/ and cordis.patch.yml via the files whitelist, with the upstream docs/agnes-ai/ reference copy git-ignored.

dsh-agnes 是一个面向 DSH(DeepSeek Harness)的原生 Cordis 插件包,仓库以 dsh-agnes 命名并发布 dsh.bundle 清单,包含 cordis.patch.yml 配置层。它为 DSH 会话注入 agnes_image_generate 与 agnes_video_generate 两个工具:前者通过 POST /v1/images/generations 调用 Agnes 图像 API,支持文生图、图生图与多张参考图合成;后者调用 Agnes 视频 API,支持文生视频、图生视频与关键帧动画(≥2 帧),采用 5 秒轮询、900 秒预算的异步任务模式,按模型名自适应 V2.0 与 2.5/2.5-flash 双套参数体系。安装通过 dsh plugin --profile web add dsh-agnes(npm 推荐)、add github:... 或本地 tarball 完成,Web 端设置页会自动新增「Agnes」标签页用于调整默认参数。

典型使用流程是:先在 DSH 凭据里配置 AGNES_API_KEY(来源支持启动环境变量、$DSH_HOME/.credentials.yaml、项目/user 级 .env 或设置页输入),密钥经进程环境传 curl、不会上命令行;之后在 DSH 会话中按需调用图像或视频工具,模型与默认参数始终从 ~/.dsh/settings.yaml 的 agnes: 段读取,切换模型即自适应画幅、帧数、时长等字段(视频默认 16:9·1280×720·约 5 秒),保存无需重启即对后续工具调用生效。它适合希望在 DSH 内一站式接入 Agnes 图像/视频生成能力、又不愿自己拼接 API 与设置 UI 的用户与团队。

依赖方面,运行需 Node.js ≥ 20,并由 DSH 环境内置 @deepseek-ai/cordis、@deepseek-ai/dsh-credentials、@deepseek-ai/dsh-llm、@deepseek-ai/dsh-settings、@deepseek-ai/dsh-shell、@deepseek-ai/dsh-tools 等 peer 依赖。已知限制:V2.0 num_frames 须遵循 8n+1 且 ≤441,2.5-flash 仅支持 720P,flash 关键帧最多 5 张;从 GitHub 安装时 pnpm ≥10 默认拒绝执行依赖的构建脚本,需在 profile 的 pnpm-workspace.yaml 加入 allowBuilds: dsh-agnes: true,并建议锁定 commit 以防后续推送变更实际运行代码。许可证为 MIT,发布到 npm 时仅打包 lib/ 与 cordis.patch.yml,文档中的 docs/agnes-ai/ 上游参考副本被 git 忽略。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-agnes

把 chaoliu615/dsh-agnes 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-agnes

基于 Cordis 的 DSH 插件(标准 bundle 包),为 DSH 会话提供 Agnes AI 的图像与视频生成工具,并在设置页提供「Agnes」标签页调整默认参数。

版本 0.6.0
许可证 MIT
运行环境 Node.js ≥ 20
平台 Host(Node.js)+ Web 客户端(浏览器设置页)

功能

  • 图像生成:agnes_image_generate 工具,通过 Agnes 图像 API 实现文生图、图生图(参考图)和多图合成。
  • 视频生成:agnes_video_generate 工具,通过 Agnes 视频 API 实现文生视频、图生视频和关键帧动画(异步任务 + 轮询查询);按模型名自适应 V2.0 与 Video 2.5 / 2.5-flash 两代参数体系。
  • 设置面板:设置页出现「Agnes」标签页,模型以下拉选择(目录对齐官方文档的三个接入模型),切换模型时其余默认值自适应;修改保存后落盘到 ~/.dsh/settings.yaml,无需重启即对后续工具调用生效。

安装

本包是一个 dsh bundle:manifest 声明 dsh.bundle,内含 cordis.patch.yml 配置层。用 dsh plugin add 把它装进一个 profile 即可。三种方式任选:

从 npm 安装(推荐,无需构建授权)

dsh plugin --profile web add dsh-agnes

npm 上的包是预构建产物,安装即用。

从 GitHub 安装

dsh plugin --profile web add github:chaoliu615/dsh-agnes

git 安装拉取的是源码,pnpm 会在装完后运行本包的 prepare 脚本现场构建。pnpm ≥10 默认拒绝执行依赖的构建脚本,首次安装会被拦下;按提示把包键加入该 profile 的 pnpm-workspace.yaml 后重试:

allowBuilds:
  dsh-agnes: true

注意:这是允许本包的代码在你机器上于安装时执行。建议锁定 commit(github:chaoliu615/dsh-agnes#<sha>)以免后续推送悄悄改变实际运行的代码。

从 tarball 安装

pnpm pack   # 仓库内执行,得到 dsh-agnes-x.y.z.tgz
dsh plugin --profile web add ./dsh-agnes-x.y.z.tgz

需要以下 peer 依赖(DSH 环境已内置):

  • @deepseek-ai/cordis
  • @deepseek-ai/dsh-credentials
  • @deepseek-ai/dsh-llm
  • @deepseek-ai/dsh-settings
  • @deepseek-ai/dsh-shell
  • @deepseek-ai/dsh-tools

凭据

在 DSH 凭据中配置 AGNES_API_KEY,用于调用 Agnes API。可用来源:

  • 启动环境变量;
  • $DSH_HOME/.credentials.yaml;
  • 项目 / user 级 .env;
  • 设置页「Agnes」标签页保存。

密钥通过进程环境传递给 curl(请求体经 stdin 写入),均不会出现在命令行中。未配置密钥时工具会抛出带指引的错误,不会发起请求。


设置页:「Agnes」标签页

插件装载后,DSH 设置页会出现「Agnes」标签页(浏览器半侧由 lib/client.js 提供,经 /plugins/dsh-agnes/client.js 伺服)。

注意:Host 只在扫描到 dsh.client 声明时才把浏览器半侧编入启动图,且扫描结果在进程内缓存。给已安装的旧版本追加浏览器半侧后,需要重启一次 web profile(dsh web)才能让标签页出现;全新安装则无需额外操作。

模型是下拉选择,选项对齐 docs/agnes-ai/ 的三个接入模型(目录见 src/models.ts,与浏览器半侧保持一致):

  • 图像:agnes-image-2.1-flash(Agnes Image 2.1 Flash)
  • 视频:agnes-video-v2.0(Agnes Video V2.0)、agnes-video-2.5-flash(Agnes Video 2.5 Flash)

默认配置自适应:切换模型时,依赖字段自动暂存为该模型的推荐默认值(视频统一为 16:9 · 1280×720 · 约 5 秒),表单形态也随参数体系切换——V2.0 显示画幅像素/帧数/帧率,2.5 Flash 切换为整秒时长并把分辨率档位锁定为 720P(flash 上游唯一支持档);历史保存的其他档位在提交时由 Host 按 720P 收敛。自适应结果可继续微调后保存。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-tui-pro 下一个 Next dsh-home-ui →