
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
dsh-labnana
Advanced tools
Labnana image generation for DeepSeek Harness: text-to-image / image-to-image / precise editing with credits estimation, subscription balance and web settings UI.
DeepSeek Harness (dsh) 插件:在会话里直接生成图片 —— 集成 Labnana 图片生成 OpenAPI,文生图 / 图生图 / 精准编辑,生成结果直接在对话流显示,可一键保存到当前项目。
支持模型:NanoBanana Pro(gemini-3-pro-image)、gemini-3.1-flash-image、GPT-Image-2、Wan2.7 Image/Pro、Seedream 5.0 Pro(积分见模型与积分)。
最低兼容基线为 DeepSeek Harness 0.1.2-rc.1;同时支持 0.1.7 预发行 API,相关 @deepseek-ai/dsh-settings 与 @deepseek-ai/dsh-tools 从 0.1.7-alpha.2 起兼容。本机已在 DSH 0.1.7-rc.1 和 0.2.0-rc.2 验证。
# 1. 安装插件(推荐 npm)
dsh plugin --profile web add dsh-labnana
# 也可以从 GitHub 或本地源码安装
dsh plugin --profile web add github:exoticknight/dsh-labnana
# dsh plugin --profile web add /path/to/dsh-labnana
# 2. 重启 dsh web
3. 配置 API Key(Key 在 https://labnana.com/api-keys 创建):
进入对应的插件设置页:
填入 API Key 并保存 —— 密钥写入凭据域 ~/.dsh/.credentials.yaml,设置文件只存引用,界面只显示脱敏预览。
4. 在对话里说:
生成一张 16:9 的电影海报:玻璃材质的未来派耳机漂浮在深色背景中
图片会直接显示在对话流(默认不落盘),点卡片上的「保存到项目」即可写入当前项目 labnana-images/。
| 工具 | 作用 |
|---|---|
labnana_generate_image | 文生图 / 图生图(参考图:远程 URL / 本地文件 / base64)/ Seedream 精准编辑;1K/2K 同步,4K 自动异步任务 + 轮询 |
labnana_estimate_credits | 预估积分(不扣费) |
labnana_get_subscription | 积分余额 / 免费额度 / 套餐 |
labnana_get_task | 按 taskId 查询异步任务(4K / 超时兜底) |
三种方式,任选其一:
LABNANA_API_KEY=lh_xxxxx(dsh 启动前设置;进程环境提供的凭据只读)# ~/.dsh/.credentials.yaml —— 值只存在这里
version: 1
refs:
LABNANA_API_KEY: lh_xxxxx
# ~/.dsh/settings.yaml —— settings 只携带对机密的引用
labnana:
apiKeyEnv: LABNANA_API_KEY
saveToDisk: false # 默认不保存图片;勾选后自动保存
defaultModel: gemini-3-pro-image
defaultImageSize: 2K
defaultAspectRatio: 1:1
outputDir: "" # 留空 = 当前项目 labnana-images/
解析优先链:apiKeyEnv 引用(凭据域 > 进程环境)→ 默认引用 LABNANA_API_KEY(credentials > env)。
| 场景 | 行为 |
|---|---|
默认(saveToDisk: false) | 不落盘:图片驻留进程内存(零磁盘写入),对话卡片直接显示,「保存到项目」按钮才写入当前项目 labnana-images/;未保存的图重启后失效 |
勾选「保存图片到磁盘」或传 saveDir | 自动落盘,按 saveDir > 设置 outputDir > 当前项目 <workspace>/labnana-images/ > 进程 cwd 兜底 |
| 已保存的图 | 由 /api/dsh-labnana-images/<file> 提供,跨会话/跨重启可查(含所有已注册 workspace) |
「把这张图的背景改成内蒙古大草原」+ 附上图片(或给本地路径) → 传
referenceImages: [{ filePath: "..." }]
「用 seedream 把图片左上 (376,363) 到右下 (701,638) 区域改成绿色」 → 精准编辑:源图进 referenceImages,坐标写进 prompt
「换个赛博朋克风格再生成一次」 → 基于上一张图迭代(images[].path 作为参考图)
| model | provider | 积分 | 参考图上限 | 4K |
|---|---|---|---|---|
| gemini-3-pro-image | 15 / 15 / 30 | 14 | ✅ | |
| gemini-3.1-flash-image | 10 / 10 / 20 | 14 | ✅ | |
| gpt-image-2 | openai | 4 / 6 / 10 | 4 | ✅ |
| wan2.7-image-pro | alibaba | 6 / 8 / 12 | 9 | 仅文生图 |
| wan2.7-image | alibaba | 4 / 6 / – | 9 | ❌ |
| seedream-5-0-pro | bytedance | 6 / 15 / – | 10 | ❌ |
免费额度:gemini-3-pro-image 的 1K/2K 可通过注册/邀请/签到领取(FREE_USAGE),优先消耗、不扣积分;4K 始终扣积分。
| code | 含义 | 处理 |
|---|---|---|
| 21007 | API Key 无效 | 检查配置 |
| 26004 | 积分不足 | 查余额 / 升级 |
| 29003 | 参数错误 | 核对模型限制 |
| 29998 | 限流 | 等待 20-30s 重试 |
TypeScript + esbuild 构建链,无运行时编译依赖。
dsh-labnana/
├── src/
│ ├── host/index.ts # Host 端:API 客户端、4 个工具、settings namespace、HTTP 端点、系统提示
│ └── client/
│ ├── entry.ts # client bundle 入口(lazy-CJS factory 包装)
│ └── index.tsx # 设置卡片 + 对话图片卡片 + i18n 字典
├── scripts/build.mjs # esbuild 构建脚本(host ESM + client factory bundle)
├── lib/ # 构建产物(git 忽略,发布走 package.json files 白名单)
├── cordis.patch.yml # dsh bundle patch(默认配置)
└── tsconfig.json # strict 模式
npm install # devDependencies:esbuild / typescript / 官方类型包(dsh-tools、dsh-settings、cordis、schemastery)
npm run typecheck # tsc --noEmit(strict)
npm run build # esbuild:
# src/host/index.ts → lib/index.js (Node ESM,@deepseek-ai/* external,走安装树唯一实例)
# src/client/*.tsx → lib/client.js (lazy-CJS factory:window.__ModuleLoader__.load + 注入 require)
export { name, inject, Config, apply };工具用官方 defineTool(类型化 schema + execute + presentationMeta);旧版 settings provider 使用 installSection,DSH 1.7 RC 通过 configure({ auto: false }) 管理原生设置页策略,并监听 settings/document-updated 刷新系统提示;HTTP 端点用 ctx.webServer(loopback 保护)dsh.client 声明 + exports["./client"] → dsh-client-modules 服务 /plugins/<id>/client.js;产物必须是 lazy-CJS factory(react / react/jsx-runtime 走注入 require)。旧版通过 settingsScope + settings.plugin.item 提供设置卡片;DSH 1.7 RC 通过 configForms + plugins.bundle.config 在插件详情页展示配置ctx.inject(["settings"])(Host 设置服务)· ctx.get("settingsScope")(旧版 Client 设置)/ ctx.get("configForms")(1.7 RC Client 设置)· ctx.remote.credentials(密钥读写,credentials/reference-updated 事件)· ctx.locale(i18n 字典 + slot locale 席位)· tool.call.toolview keyed 槽(对话图片卡片)· exec.agent.session.header.cwd(保存目录基准)· workspaceRegistry(图片服务跨 workspace 查找)labnana_generate_image:prompt(必填)+ model / imageSize / aspectRatio / referenceImages / outputMode / saveDir / async / waitSeconds;返回 { ok, saved, images: [{url, path?, mimeType, size}], model, imageSize, aspectRatio, taskId? }labnana_estimate_credits:prompt(必填)+ model / imageSize / aspectRatio;返回 { ok, credits, canGenerate, requiresSubscription, warnings? }labnana_get_subscription:无参数;返回余额/免费额度/套餐labnana_get_task:taskId(必填);返回任务状态与图片 URLFAQs
Labnana image generation for DeepSeek Harness: text-to-image / image-to-image / precise editing with credits estimation, subscription balance and web settings UI.
The npm package dsh-labnana receives a total of 0 weekly downloads. As such, dsh-labnana popularity was classified as not popular.
We found that dsh-labnana demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.