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.
|
||||
Reference in new issue
Block a user