wsz987/dsh-channels--packages-channel-files2

@wsz987/channel-files

Optional generic file storage and document extraction for dsh-channels

包名
@wsz987/channel-files
版本
0.1.0
许可证
MIT
最近更新
2026年8月16日

安装

此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗

@wsz987/channel-files

Optional generic-file extension for DeepSeek Harness Channels.

Adds a private channel asset store and document extraction on top of the Harness-native image path. Inbound PDF / DOCX / XLSX / text files are stored, extracted, and exposed to the model through the read_channel_attachment tool — without routing raw platform payloads through the prompt.

Install

pnpm add @wsz987/channel-files

It is included in the @wsz987/dsh-channels bundle by default. To disable the extension, remove the channels-files plugin from the bundle patch; Harness native images and plain text messages keep working.

Features

AreaDetail
StoragePrivate file-backed asset store under the channel data directory
ExtractionPDF (unpdf), DOCX (mammoth), XLSX (xlsx), plain text
Toolread_channel_attachment installs on the agent so models can read stored files
Limits100 MiB inbound per file · 32 MiB parser input · 5 MiB extracted text output

How it works

ChannelFileService implements the ChannelFileProvider port from @wsz987/channel-harness:

ctx.channelFiles.store(channelFileContext, binaryPart); // store + extract
ctx.channelFiles.resolveAttachment(attachmentId, sessionId);
await ctx.channelFiles.installTools(agentContext);     // add the read tool

Development

pnpm --filter @wsz987/channel-files build
pnpm --filter @wsz987/channel-files typecheck
pnpm --filter @wsz987/channel-files test

Related

License

MIT