feat(assistant): complete controlled management attachments and native schedules
This commit is contained in:
1 parent
d0bc4b0da2
commit
8341986067
119 files changed
+20519
-1618
No files matched your search
@@ -0,0 +1,19 @@
|
||||
# DSH 原生定时任务接入设计与实施计划
|
||||
|
||||
用户明确要求增加 DSH 本身已有的定时任务能力,不限定业务类别。
|
||||
|
||||
复用固定版本 @deepseek-ai/dsh-schedule 的 ScheduleService(包括定时驱动、时区/周期校验、冲突更新、投递历史);不另写 Cron 解释器。以 Cordis 实例提供当前应用的加密存储域、会话和持久收件箱适配。原生提醒到点后写入持久队列,再由工作台向原对话投递一次模型消息。定时投递不自动执行模型建议的业务或配置操作。
|
||||
|
||||
支持 after/at/every/daily/weekly/cron,默认Asia/Shanghai。每用户只管理自己的会话任务;viewer只读。创建/修改/删除需明确确认,AI建议走现有逐次审查凭证。持久队列按taskId+occurrence去重,模型执行与原生投递回执分开显示。重启不重放已接收的同一次提醒;原会话归档/回收后停掉未来任务。每次触发重新检查账号、会话、模型配置、并发和配额,无法确定的执行不自动重试。
|
||||
|
||||
- [x] 修复0/0采样与无明细历史记录的说明和状态。
|
||||
- [x] 原生服务+加密存储域+持久会话投递适配。
|
||||
- [x] 用户任务CRUD/历史API与权限、审计、确认校验。
|
||||
- [x] AI任务管理建议、逐次授权和上下文。
|
||||
- [x] 右侧任务面板、创建编辑删除表单和触发记录。
|
||||
- [x] 真实原生服务的一次触发/周期/重启去重、用户隔离与UI回归。
|
||||
- [x] 复审、部署18767、隔离或自制任务验证后清理测试任务。
|
||||
|
||||
验证:定时原生服务/HTTP/AI逐次授权/UI、配置授权、操作结果、附件、视觉适配、工具栏回归均通过。扩展回归最初19项中3项失败;备份/回收站为Windows key_directory PowerShell超时,串行重跑8/8通过;附件为移动端ResizeObserver测量时序,等待实际布局稳定后复核通过。
|
||||
|
||||
18767实际自测:2026-10-28 18:46:47 Asia/Shanghai原生3秒任务触发,18:46:55模型完成,原会话显示“定时任务已收到 6284”,历史显示“已回复”。自测任务已删除,消息和历史保留。未执行业务卡、邮件或设置变更。main未启动。
|
||||
@@ -0,0 +1,22 @@
|
||||
# DSH Settings Approval Implementation Plan
|
||||
|
||||
> Execute inline in the existing dsh workspace; user has approved implementation.
|
||||
|
||||
**Goal:** Configuration proposals require an explicit, scoped approval before saving, and the composer uses an arrow send button.
|
||||
**Architecture:** configuration.cjs owns safe projections, patch validation and writes; configuration-approval.cjs owns review tokens and audit. Existing action persistence and settings validators are reused.
|
||||
**Tech Stack:** CommonJS, SQLite, existing browser modules and node:test.
|
||||
**Spec:** docs/superpowers/specs/2026-10-28-dsh-settings-approval-design.md
|
||||
|
||||
## Tasks
|
||||
- [x] Add tests using real settings stores: projection excludes credentials, proposals do not save, invalid fields/roles/versions reject, approval required/expired/replay reject, authorized save preserves unrelated fields.
|
||||
- [x] Implement configuration projections and validated single-target patches for mail, schedule, assistant and default-model; wire mail dependency into AssistantService.
|
||||
- [x] Extend model action schema and prompt. Persist server-built differences, risks and version guards from the actual diagnostic snapshot.
|
||||
- [x] Add owner/session-bound review and execute endpoints using existing encrypted action persistence. Require local/HTTPS, administrator, explicit token; audit before and after saves; refuse duplicate/stale execution.
|
||||
- [x] Add browser approval dialog with immutable diff, risk acknowledgement, cancel and authorize buttons; render configuration cards using text-safe output.
|
||||
- [x] Implement circle arrow send / square stop, empty-input disabled, IME and Enter behavior preserved; add browser regressions.
|
||||
- [x] Run focused backend/browser checks, inspect diff, restart dsh:18767 and verify live UI without modifying real business configuration.
|
||||
|
||||
## Follow-up scope
|
||||
- [x] Full model label, round jump-to-latest arrow, explicit vision/text/unknown metadata.
|
||||
- [x] Bounded local text/CSV/PDF extraction, owner-scoped encrypted staging, preview/removal, attachment-only send, atomic reference consumption and follow-up context.
|
||||
- [x] Red/green regressions for unavailable prior default models and expired attachment chip removal.
|
||||
@@ -0,0 +1,10 @@
|
||||
# DSH 设置审批与发送交互设计
|
||||
|
||||
用户已于 2026-10-28 确认本设计并授权实现。
|
||||
|
||||
发送采用圆形上箭头,空输入禁用;生成中显示停止方块。保持键盘发送和无障碍名称。
|
||||
管理员可向模型提供必要的邮箱、发送计划、助手运行参数和默认模型元数据。使用显式字段白名单,不发送密码、密钥、正文或本机运行包路径。
|
||||
模型只能提出 update_configuration 建议。服务端构造修改前后差异、风险、配置版本和有效期;每条建议均需独立审查,授权绑定用户、会话、建议及版本,建议在 10 分钟后失效,审查凭证最多有效 5 分钟。拒绝不写配置,重复执行不重复保存。执行前重新核验角色、传输安全和配置版本,复用原保存校验,保存和失败均有审计;保存后的不确定失败标记待核实。
|
||||
首轮可改既有邮箱名称、收信开关、模板发件人名单、SMTP/IMAP 端口和 TLS/STARTTLS;更换账号、主机、密码和密钥使用原本地配置表单。可改发送计划时间/周末/分组/错过策略,以及助手超时/额度和可用默认模型。权限、代码修复、自动发信和实际发信不通过设置修改开放。邮件发送、收信等额外动作须在原页面单独授权。
|
||||
|
||||
用户后续确认:底部模型名称显示完整,增加回到对话底部按钮;附件首轮支持文本、日志、CSV、PDF。每条3个、单个2MB/20000字、合计40000字;PDF限50页,独立子进程15秒超时,本机提取文字。暂存加密且绑定上传者,1小时失效;发送原子消费引用并支持同请求编号重试、同会话继续问答。文件内容不授予权限。模型的视觉标识仅来自显式输入能力元数据,无图片上传或扫描PDF OCR。
|
||||
Reference in new issue
Block a user