makecindy / makecindy/cindy

支持定时任务将生成文件作为附件同步到 Cindy 手机端

Open
#1,166 0 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
TypeScript
Stars
2.7k
Forks
395
Avg merge
21h 48m
Merged PRs (30d)
776

Description

**提交人**: 用户8527
**客户端版本**: 0.0.0

---

## 使用场景

定时任务会生成 HTML 数据报表。为了避免在手机端展示大量 Markdown 表格造成卡顿,希望任务只发送摘要,并把完整 HTML 作为可点击附件交付。

当前 Agent 可以在宿主工作目录生成 HTML,并在消息中输出本地绝对路径链接;桌面宿主可以访问该文件,但 Cindy 手机端只同步消息文本,不会同步文件,点击 `/Users/.../report.html` 无法打开。

这个限制迫使用户额外配置飞书机器人、公司静态站点或公网托管,增加使用成本,也不适合包含业务数据的报告。

## 诉求

- 定时任务完成后,可以把本轮生成的本地文件作为运行产物上传并附加到结果消息。
- Cindy 手机端显示附件卡片,支持直接预览或下载 HTML、CSV、PDF、图片等文件。
- 文件交付应由 Cindy 自身完成,不依赖飞书或公开第三方托管。
- 若手机端不支持本地路径,应避免把本地绝对路径渲染成看似可用的手机链接,或明确标注“仅宿主可打开”。

## 建议方案

1. 为 Schedule Run 增加 `artifacts` 字段和受限的“上传运行产物”能力,Agent 只能提交当前工作目录内的明确文件。
2. Host 将文件上传到 Cindy 的私有文件存储,生成有权限校验、有效期和下载次数限制的链接。
3. 桌面端与手机端消息统一渲染附件卡片;运行历史页也能重新下载本轮产物。
4. 支持文件大小上限、MIME 白名单、自动过期和手动删除,避免敏感业务数据长期暴露。
5. 定时任务配置可选择“仅摘要”“附加文件”“文件生成失败时回退完整正文”等交付策略。
---
**版本区域**: CN
**OS**: darwin x64 (24.6.0)
**界面语言**: zh-CN

Contributor guide

Open the contributing guide

Research direction

No files, tests, or code entry points are named. Start by tracing Schedule Run completion, Host file handling, message rendering on desktop and mobile, and run history; define the artifact flow and permissions before implementation. Done means generated files can be securely attached, previewed or downloaded across clients, with limits, expiry, deletion, and the stated fallback behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
full-stack, mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.