{"_id":"@dfy-plugins/dsh-media-blocks","_rev":"2-f8f3ac5f64f93240680e816f435ee07e","name":"@dfy-plugins/dsh-media-blocks","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.3":{"name":"@dfy-plugins/dsh-media-blocks","version":"0.1.3","keywords":["deepseek-harness","dsh-plugin"],"license":"MIT","_id":"@dfy-plugins/dsh-media-blocks@0.1.3","maintainers":[{"name":"xiaoxiao44443","email":"xiaoxiao44443@163.com"}],"homepage":"https://github.com/xiaoxiao44443/dfy-dsh-plugins#readme","bugs":{"url":"https://github.com/xiaoxiao44443/dfy-dsh-plugins/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-ui-attachment","@deepseek-ai/dsh-client-ui-conversation","@deepseek-ai/dsh-client-ui-primitives"],"platform":"web"}},"dist":{"shasum":"94c20af6dbd93835c55969c639b7f736c1d38328","tarball":"https://registry.npmjs.org/@dfy-plugins/dsh-media-blocks/-/dsh-media-blocks-0.1.3.tgz","fileCount":11,"integrity":"sha512-+XOIK9SPaNiEpmDRN1Dqb7ElVP6ydp+cyEgnvhr6199LvCDjctjbvkx0sqcgOj7TkP0cMYvV3EHTn3qF36JeEA==","signatures":[{"sig":"MEQCIAWagj+xq00DvoAmWAb6SNOhS47dH6A7KH9qhinIXnqZAiAB9PK9KUWdn32NgjAbm3WfBsXXjAh0Unbc7ziljt5zeA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56093},"main":"lib/index.js","type":"module","_from":"file:/Users/xiao/Projects/dfy-dsh-plugins/release/npm/dfy-plugins-dsh-media-blocks-0.1.3.tgz","types":"lib/index.d.ts","exports":{".":{"types":"./lib/index.d.ts","default":"./lib/index.js"},"./client":{"default":"./lib/client.js"},"./package.json":"./package.json"},"scripts":{"test":"tsc -p tsconfig.json && node --test","build":"tsc -p tsconfig.json && node scripts/build-client.mjs","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json --noEmit"},"_npmUser":{"name":"xiaoxiao44443","email":"xiaoxiao44443@163.com"},"_resolved":"/Users/xiao/Projects/dfy-dsh-plugins/release/npm/dfy-plugins-dsh-media-blocks-0.1.3.tgz","_integrity":"sha512-+XOIK9SPaNiEpmDRN1Dqb7ElVP6ydp+cyEgnvhr6199LvCDjctjbvkx0sqcgOj7TkP0cMYvV3EHTn3qF36JeEA==","repository":{"url":"git+https://github.com/xiaoxiao44443/dfy-dsh-plugins.git","type":"git","directory":"plugins/media-blocks"},"_npmVersion":"11.13.0","description":"为 DeepSeek Harness 提供可扩展的多媒体引用块、持久化与聊天渲染。","directories":{},"_nodeVersion":"24.16.0","dependencies":{"@dfy-plugins/image-protocol":"^0.1.2"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"react":"^18.2.0","esbuild":"^0.24.0","react-dom":"18.3.1","typescript":"^5.5.0","@types/node":"^24.0.0","@types/react":"~18.3.1","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-llm":"^0.1.1-rc.2","@deepseek-ai/dsh-agent":"^0.1.1-rc.2","@deepseek-ai/dsh-session":"^0.1.1-rc.2","@deepseek-ai/dsh-attachment":"^0.1.1-rc.2","@deepseek-ai/dsh-host-webserver":"^0.1.1-rc.2","@deepseek-ai/dsh-client-connection":"^0.1.1-rc.2","@deepseek-ai/dsh-client-ui-attachment":"^0.1.1-rc.2","@deepseek-ai/dsh-client-ui-primitives":"^0.1.1-rc.2","@deepseek-ai/dsh-client-ui-conversation":"^0.1.1-rc.2"},"peerDependencies":{"react":"^18.2.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-llm":"^0.1.1-rc.2 || ^0.1.2-alpha.1 || ^0.1.5-alpha.1","@deepseek-ai/dsh-agent":"^0.1.1-rc.2 || ^0.1.2-alpha.1 || ^0.1.5-alpha.1","@deepseek-ai/dsh-session":"^0.1.1-rc.2 || ^0.1.2-alpha.1 || ^0.1.5-alpha.1","@deepseek-ai/dsh-attachment":"^0.1.1-rc.2 || ^0.1.2-alpha.1 || ^0.1.5-alpha.1","@deepseek-ai/dsh-host-webserver":"^0.1.1-rc.2 || ^0.1.2-alpha.1 || ^0.1.5-alpha.1","@deepseek-ai/dsh-client-connection":"^0.1.1-rc.2 || ^0.1.2-alpha.1 || ^0.1.5-alpha.1","@deepseek-ai/dsh-client-ui-attachment":"^0.1.1-rc.2 || ^0.1.2-alpha.1 || ^0.1.5-alpha.1","@deepseek-ai/dsh-client-ui-primitives":"^0.1.1-rc.2 || ^0.1.2-alpha.1 || ^0.1.5-alpha.1","@deepseek-ai/dsh-client-ui-conversation":"^0.1.1-rc.2 || ^0.1.2-alpha.1 || ^0.1.5-alpha.1"},"_npmOperationalInternal":{"tmp":"tmp/dsh-media-blocks_0.1.3_1789009093596_0.20277549258035688","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"_id":"@dfy-plugins/dsh-media-blocks@0.1.4","dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-ui-attachment","@deepseek-ai/dsh-client-ui-conversation","@deepseek-ai/dsh-client-ui-primitives"],"platform":"web"}},"bugs":{"url":"https://github.com/xiaoxiao44443/dfy-dsh-plugins/issues"},"dist":{"shasum":"24a188850f312ab44b7ef85f3429c6cc657ac1e5","tarball":"https://registry.npmjs.org/@dfy-plugins/dsh-media-blocks/-/dsh-media-blocks-0.1.4.tgz","fileCount":13,"integrity":"sha512-qMew9ZkmXDM+oJiZORuFvGymBJMQFTDh3fyttvjY3AU7JHc3CrXmICkptCdJVS5e7YGgyqcrnRhvHWwf6ejdGA==","signatures":[{"sig":"MEYCIQDyza2nOA5AmC6IOht+/1FV5iGcJzlo1KOn2SzllSAcCgIhAPL0LG5Oz4WEJJt7pTsd6B9Cx8w0PQxKvnt9fRwqN+Gi","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGjf+ntOCGoAYm3sUMnaedZxr1lIFz8gh5cInmwNzFWnAiAYTWu7vu/JD80IpMe4OfkbDH4vN1lmWUaVz5d3OrHauA=="}],"unpackedSize":53876},"main":"lib/index.js","name":"@dfy-plugins/dsh-media-blocks","type":"module","_from":"file:E:/项目文件/dfy-dsh-plugins/release/npm/dfy-plugins-dsh-media-blocks-0.1.4.tgz","types":"lib/index.d.ts","exports":{".":{"types":"./lib/index.d.ts","default":"./lib/index.js"},"./client":{"default":"./lib/client.js"},"./package.json":"./package.json","./locale/*.json":"./locale/*.json"},"license":"MIT","scripts":{"test":"tsc -p tsconfig.json && node --test","build":"tsc -p tsconfig.json && node scripts/build-client.mjs","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json --noEmit"},"version":"0.1.4","_npmUser":{"name":"xiaoxiao44443","email":"xiaoxiao44443@163.com"},"homepage":"https://github.com/xiaoxiao44443/dfy-dsh-plugins#readme","keywords":["deepseek-harness","dsh-plugin"],"_resolved":"E:\\项目文件\\dfy-dsh-plugins\\release\\npm\\dfy-plugins-dsh-media-blocks-0.1.4.tgz","_integrity":"sha512-qMew9ZkmXDM+oJiZORuFvGymBJMQFTDh3fyttvjY3AU7JHc3CrXmICkptCdJVS5e7YGgyqcrnRhvHWwf6ejdGA==","repository":{"url":"git+https://github.com/xiaoxiao44443/dfy-dsh-plugins.git","type":"git","directory":"plugins/media-blocks"},"_npmVersion":"11.16.0","description":"为 DeepSeek Harness 提供可扩展的多媒体引用块、持久化与聊天渲染。","directories":{},"maintainers":[{"name":"xiaoxiao44443","email":"xiaoxiao44443@163.com"}],"_nodeVersion":"24.18.0","dependencies":{"@dfy-plugins/image-protocol":"^0.1.3"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"react":"^18.2.0","esbuild":"^0.24.0","react-dom":"18.3.1","typescript":"^6.0.3","@types/node":"^24.0.0","@types/react":"~18.3.1","@deepseek-ai/cordis":"^4.0.3","@deepseek-ai/dsh-llm":"0.1.7-alpha.1","@deepseek-ai/dsh-agent":"0.1.7-alpha.1","@deepseek-ai/dsh-session":"0.1.7-alpha.1","@deepseek-ai/dsh-attachment":"0.1.7-alpha.1","@deepseek-ai/dsh-host-webserver":"0.1.7-alpha.1","@deepseek-ai/dsh-client-connection":"0.1.7-alpha.1","@deepseek-ai/dsh-client-ui-attachment":"0.1.7-alpha.1","@deepseek-ai/dsh-client-ui-primitives":"0.1.7-alpha.1","@deepseek-ai/dsh-client-ui-conversation":"0.1.7-alpha.1"},"peerDependencies":{"react":"^18.2.0","@deepseek-ai/cordis":"^4.0.3","@deepseek-ai/dsh-llm":">=0.1.7-alpha.1","@deepseek-ai/dsh-agent":">=0.1.7-alpha.1","@deepseek-ai/dsh-session":">=0.1.7-alpha.1","@deepseek-ai/dsh-attachment":">=0.1.7-alpha.1","@deepseek-ai/dsh-host-webserver":">=0.1.7-alpha.1","@deepseek-ai/dsh-client-connection":">=0.1.7-alpha.1","@deepseek-ai/dsh-client-ui-attachment":">=0.1.7-alpha.1","@deepseek-ai/dsh-client-ui-primitives":">=0.1.7-alpha.1","@deepseek-ai/dsh-client-ui-conversation":">=0.1.7-alpha.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dsh-media-blocks_0.1.4_1790088719766_0.974658754421496"}}},"time":{"created":"2026-09-10T02:58:13.438Z","modified":"2026-09-22T14:52:00.094Z","0.1.3":"2026-09-10T02:58:13.739Z","0.1.4":"2026-09-22T14:51:59.869Z"},"bugs":{"url":"https://github.com/xiaoxiao44443/dfy-dsh-plugins/issues"},"license":"MIT","homepage":"https://github.com/xiaoxiao44443/dfy-dsh-plugins#readme","keywords":["deepseek-harness","dsh-plugin"],"repository":{"url":"git+https://github.com/xiaoxiao44443/dfy-dsh-plugins.git","type":"git","directory":"plugins/media-blocks"},"description":"为 DeepSeek Harness 提供可扩展的多媒体引用块、持久化与聊天渲染。","maintainers":[{"name":"xiaoxiao44443","email":"xiaoxiao44443@163.com"}],"readme":"# @dfy-plugins/dsh-media-blocks\r\n\r\nDeepSeek Harness 的可扩展媒体引用层。对话日志只保存轻量 `dfy-media` 块和资源引用，二进制内容留在资源存储中；聊天界面再把引用投影成可预览的媒体卡片。\r\n\r\n当前图片链路：\r\n\r\n- 选择、拖入和粘贴图片继续使用 Harness 官方输入框交互。\r\n- 旧版发送入口把官方草稿图片保存进 `ctx.attachments`，持久化为自定义媒体块。\r\n- 聊天记录使用与 rc.8 附件槽兼容的内置图片画廊；不再依赖 rc.8 已停止导出的私有 `ImageGallery` 组件。\r\n- 请求多模态模型时，临时投影成官方 `image` block，模型直接接收像素。\r\n- 请求文本模型时，由 `@dfy-plugins/dsh-vision` 把同一引用投影成工具提示；主聊天不展示内部引用。\r\n- `dfy-media` 历史可以在多模态模型与配置了视觉路由的文本模型间投影；官方原生图片历史仍遵循 DSH 的模型能力限制。\r\n\r\n在 `0.1.5-alpha.1` 上，支持图片的模型继续走官方原生上传。明确不支持图片的模型，\r\n在官方校验拒绝后才转交已配置的引用适配器；保留原生文件凭据的会话归属检查、\r\n混合附件顺序、请求去重、steer/queue 和时区。未配置可用路由时保留原错误。\r\nPTC 模式下按当前 Agent 的受限工具目录选择适配器，不把子工具额外暴露到模型的 wire schemas。\r\n\r\n## 扩展协议\r\n\r\n`MediaResourceMap` 可通过 TypeScript declaration merging 增加 `audio`、`video`、`canvas`、`code` 或业务自定义格式；`registerReferenceAdapter(kind, adapter)` 决定某类资源如何进入不原生支持它的模型上下文。这样视觉插件只负责把 `image` 引用转换成视觉工具调用，不再负责输入框、存储或聊天渲染。\r\n\r\n音频、视频、沙箱 HTML/Canvas 和代码运行卡片会复用这一协议，但执行能力必须由独立 Host 插件提供：媒体块只描述和展示资源，不在 WebView 里直接执行任意代码。\r\n\r\n## 本地安装\r\n\r\n```bash\r\ndsh plugin --profile web add /path/to/dfy-dsh-plugins/plugins/media-blocks\r\n```\r\n\r\n文本模型要自动分析聊天媒体块时需要同时安装 `@dfy-plugins/dsh-vision`。视觉插件本身也可独立处理工作区图片和受控资源引用；两个插件没有安装顺序要求。\r\n\r\n## 构建与测试\r\n\r\n```bash\r\npnpm run typecheck\r\npnpm test\r\npnpm run build\r\n```\r\n\r\n需要 DeepSeek Harness `0.1.0-rc.8` 或更高版本。\r\n","readmeFilename":"README.md"}