@oxmumu3/dsh-project-companion 0.34.0 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -96,7 +96,7 @@ dsh plugin --profile web add @oxmumu3/dsh-project-companion
96
96
 
97
97
  ## 版本与数据
98
98
 
99
- - 当前版本 **`0.34.0`**:微信里发消息会先收到一句「收到,我先看一下」,再等结果;`0.33.0` 项目有变化才主动提醒。
99
+ - 当前版本 **`0.35.0`**:今天页改成单列,一眼知道先做什么;`0.34.0` 微信发消息先回一句再等结果。
100
100
  - 兼容官方 Harness `0.2.0-rc.2`、`0.2.1-rc.2` 至 `rc.5`、`0.2.2-rc.1`;清单在 [compatibility.json](compatibility.json)。
101
101
  - 数据留在本机 Harness profile 内,不经过第三方服务器;微信组件内置部分保留上游 MIT 许可,见 [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)。
102
102
  - 已知边界(Google 数据权限审核、flomo MAX、主动关注与手机收件的验收状态)统一写在[验证记录](docs/verification.md),本页不重复。
@@ -0,0 +1,43 @@
1
+ # 跟手:双 agent 对话层设计(B)
2
+
3
+ 目标手感:你发一条消息,它立刻有回响;后台继续做事;你可以随时插话,插话也有回响;真正干活的那条路径不会假装已经完成。
4
+
5
+ 这不是给 Dot 加一个工具能解决的。工具插件的调用者是模型,它决定不了"谁先回话"。这份文档记录目标、现状、缺口和桥接层原型的落点,供评审后再动手。
6
+
7
+ ## 目标行为(按优先级)
8
+
9
+ 1. **秒回**:消息进来先给一句有内容的回响(不是固定模板,理想是按上一轮上下文生成)。
10
+ 2. **不阻塞**:回响之后主流程继续执行,不因为回响而中断或重跑。
11
+ 3. **插话有回响**:执行中用户继续发消息,每条都要被确认,并按语义决定是排队还是修正方向。
12
+ 4. **执行者不直连用户**:真正干活的 agent 只产出结果,由回响方转述;避免两处同时下结论。
13
+ 5. **失败不冒充成功**:结果不确定时明确说"还没确认",不重放。
14
+
15
+ ## 现状(0.34.0)
16
+
17
+ - 已有:微信消息 claim 后先发一条固定回执(`index.js` 的 `quickAck`,家庭入口走 Family 桥、独立微信走站点桥,同消息去重)。这是第 1 条的最小实现,内容还是模板。
18
+ - 已有:插话进入宿主队列(Harness 自身行为),但**没有"每条插话都有回响"**。
19
+ - 已有:交办结果由 `taskResults` 回传原会话,可区分完成/无文本/失败/超时。
20
+ - 没有:chat agent 与 agentic agent 的分离;没有 steering 提权接口。
21
+
22
+ ## 缺口(按证据)
23
+
24
+ 1. **宿主没有对话层原语**:本机 Harness `0.2.2-rc.1` 的可读 SDK 里没有 steering/双写接口(`app.asar` 为打包产物,`app.asar.unpacked` 只含四个包)。因此"同一条消息双写两个 agent、chat 可把队列提成 steering"不能在插件层实现。
25
+ 2. **回复通道不对称**:Dot 能通过桥发消息,但不能决定宿主对话的回复由谁发出。要做到"执行者永不直连用户",只能在桥接层拦住出站回复并改写。
26
+ 3. **回响内容质量**:模板回执只能解决"有回响",解决不了"回响有用"。
27
+
28
+ ## 桥接层原型方案(可行且不动宿主)
29
+
30
+ 落点在 `vendor/dsh-wechat/dist/bridge/bridge.js`:
31
+
32
+ - 入站:`onMessage`(约 1049 行)之后、把消息注入宿主之前,先取一条"回响":优先用上一轮结果摘要 + 本轮意图做一句短回复;失败则退化为固定回执,保证一定发出。
33
+ - 出站:宿主回复到达后,若本轮已经发过回响,则把结果作为**第二条**消息发出,并标注"结果";不拼接、不改写。
34
+ - 插话:入站分支若同一会话已有在跑的轮次,则回响改为"收到,我正在做上一件事,你的这条我记下了",并把消息按原文注入宿主队列(当前行为不变)。
35
+ - 提权:宿主没有 steering 接口,**先不做**;等宿主暴露后再接,文档明确标注未实现,不用"看起来像"的方式假造。
36
+
37
+ 验收方式:真实手机发一条 → 3 秒内收到回响 → 结果随后到达;执行中再发一条 → 两条都有回响;结果不确定时表达为"尚未确认"。
38
+
39
+ ## 不做什么
40
+
41
+ - 不在插件里伪造 chat/agentic 两个 agent 的假象。
42
+ - 不把固定模板说成"AI 回响"。
43
+ - 不在没有任何交接证据时宣称"跟手已实现"。
package/docs/install.md CHANGED
@@ -1,4 +1,4 @@
1
- # 安装 DSH Dot 0.34.0
1
+ # 安装 DSH Dot 0.35.0
2
2
 
3
3
  ## 在创造模式中安装/更新
4
4
 
@@ -8,7 +8,7 @@
8
8
  请安装或更新并启用 DSH Dot。先检查现有插件,避免重复添加和降级。从 npm 官方源实时查询 @oxmumu3/dsh-project-companion 的 latest,按查到的精确版本安装或更新,不直接采用本机缓存的旧 latest。保留已有微信绑定、账号授权、资料范围、设置和其他插件,不自动读取或新建计划。核对实际版本、启用状态,再打开 DSH Dot。
9
9
  ```
10
10
 
11
- 新用户也可在「插件 → 添加插件」填写 `@oxmumu3/dsh-project-companion`(或精确版本 `@oxmumu3/dsh-project-companion@0.34.0`),安装后启用。它是一个标准插件包,已内置独立微信组件。已有未带 namespace 的历史安装应沿原包名更新;不要将两个名称当成同一个插件重复添加。
11
+ 新用户也可在「插件 → 添加插件」填写 `@oxmumu3/dsh-project-companion`(或精确版本 `@oxmumu3/dsh-project-companion@0.35.0`),安装后启用。它是一个标准插件包,已内置独立微信组件。已有未带 namespace 的历史安装应沿原包名更新;不要将两个名称当成同一个插件重复添加。
12
12
 
13
13
  牛村木木山制作的 DeepSeek Harness 社区插件,非 DeepSeek 或 OpenAI 官方产品。本版内置微信组件,只需添加一个标准插件包,不包含 Harness 应用或 Family 家庭助手。
14
14
 
@@ -26,7 +26,7 @@
26
26
 
27
27
  无法联网或想用离线包时,到 [Releases](https://github.com/oxmumu3/dsh-project-companion/releases) 下载对应版本的 `.tgz`,在官方管理器填写下载后的文件实际路径;无需解压、另装微信组件或运行 macOS 脚本。
28
28
 
29
- [本版发布页](https://github.com/oxmumu3/dsh-project-companion/releases/tag/v0.34.0)记录本版变更。插件包从 npm 安装,npm 页面提供 integrity 与 provenance 可核;0.24 起 release 不再附带离线包。插件尚未上架官方插件市场,npm latest 同步为本版;不要用旧版 ZIP 或第二个微信安装包代替这条单插件路径。
29
+ [本版发布页](https://github.com/oxmumu3/dsh-project-companion/releases/tag/v0.35.0)记录本版变更。插件包从 npm 安装,npm 页面提供 integrity 与 provenance 可核;0.24 起 release 不再附带离线包。插件尚未上架官方插件市场,npm latest 同步为本版;不要用旧版 ZIP 或第二个微信安装包代替这条单插件路径。
30
30
 
31
31
  ## 已有用户
32
32
 
@@ -68,7 +68,7 @@ Google 品牌已验证,Gmail、日历、Drive 数据权限已提交审核但
68
68
 
69
69
  ## 本版验证与已知问题
70
70
 
71
- 0.34.0 源码全量回归 2,365 项 / 2,328 通过 / 0 失败 / 37 跳过(跳过项均需 Family 源码树,不在本包范围)。自检只读本机状态,不发外部请求;单项探测 2 秒上限,超时或抛错显示「未知」。私人外发确认只覆盖 `personal_review.run_now` 这条路径,宿主自带的 `send_wechat`、定时投递和带内容的 `remind` / `coordinate` 不经过这道门禁——插件单方面无法覆盖全部外发路径。
71
+ 0.35.0 源码全量回归 2,365 项 / 2,328 通过 / 0 失败 / 37 跳过(跳过项均需 Family 源码树,不在本包范围)。自检只读本机状态,不发外部请求;单项探测 2 秒上限,超时或抛错显示「未知」。私人外发确认只覆盖 `personal_review.run_now` 这条路径,宿主自带的 `send_wechat`、定时投递和带内容的 `remind` / `coordinate` 不经过这道门禁——插件单方面无法覆盖全部外发路径。
72
72
 
73
73
  自动回顾仍为实验能力:自然语言 `focus` 尚未用真实模型验证实际效果,手机端呈现也未验证。历史 flomo 范围投影与模型失败未全部归因。新用户独立扫码到收件、多日与休眠恢复、真实 macOS 输入法仍分别验收。通道报告发送不等于手机收到。详见[验证记录](verification.md)。
74
74
 
package/docs/roadmap.md CHANGED
@@ -1,9 +1,12 @@
1
1
  # 当前收尾 · 0.24.2 公开版本
2
2
 
3
- 最新公开版本 0.34.0:微信消息先回一句再干活(跟手第一步);0.33.0:项目变化提醒接上定时器,变了才发且带证据;0.32.0:变化账本,同一项目第二次只看增量;0.31.0:任意已授权工作区可直接问进度,未授权名字明确拒绝;0.30.0:项目简报先读本机 git 的真实变化(分支、最近提交、未提交改动),为按变化推送打底;0.29.0:新增升级前状态自查脚本;0.28.0:早报授权失败时说明下一步(换绑要重设、离线下次再试),自检同步提醒;0.27.0:自检新增「手机控制」一行并在自检时补一次注册,手机控制两边是否接通一眼可见;0.26.0:并入手机端任务控制的 Dot 侧(`mobileTaskScope` / `mobileQuestionState` / 桥接注册),等家庭助手暴露接口后即可用;`0.25.0`:补上滴答账户级只读搜索(`search_task` / `search` / `list_all_tasks`);此前 0.24.2:项目工具收敛到 `look`/`manage` 两个入口,新增自检、私人外发确认与回顾关注点,首次打开有示例卡,交办记录可复用。
3
+ 最新公开版本 0.35.0:今天页重做(单列、去遥测、状态说人话、术语换人话);0.34.0:微信消息先回一句再干活(跟手第一步);0.33.0:项目变化提醒接上定时器,变了才发且带证据;0.32.0:变化账本,同一项目第二次只看增量;0.31.0:任意已授权工作区可直接问进度,未授权名字明确拒绝;0.30.0:项目简报先读本机 git 的真实变化(分支、最近提交、未提交改动),为按变化推送打底;0.29.0:新增升级前状态自查脚本;0.28.0:早报授权失败时说明下一步(换绑要重设、离线下次再试),自检同步提醒;0.27.0:自检新增「手机控制」一行并在自检时补一次注册,手机控制两边是否接通一眼可见;0.26.0:并入手机端任务控制的 Dot 侧(`mobileTaskScope` / `mobileQuestionState` / 桥接注册),等家庭助手暴露接口后即可用;`0.25.0`:补上滴答账户级只读搜索(`search_task` / `search` / `list_all_tasks`);此前 0.24.2:项目工具收敛到 `look`/`manage` 两个入口,新增自检、私人外发确认与回顾关注点,首次打开有示例卡,交办记录可复用。
4
4
 
5
5
  下一步按影响排序:
6
6
 
7
+ 0. **跟手(B)**:手机侧已有"先回一句"(0.34.0);完整的双 agent(秒回 + 后台执行 + 插话都有回响)需要桥接层原型,设计与落点见[跟手:双 agent 对话层](dual-agent.md)。宿主当前没有 steering 接口,提权那一步未实现,不假造。
8
+
9
+
7
10
  1. **主线合并**:本机日常运行的是私有 `0.24.1-mobile.3`,含同任务追问续接、一次性审批、状态查询不新建任务、停止当前任务、原结果回传五项,尚未进入公开主线。先把这五项并回 `main` 并补测试,再谈下一版功能。
8
11
  2. **微信主动推送 `-2`**:11-03 早报与资讯各失败两次,去掉 context 也未恢复。需要真实入站复现后再定位,不猜修、不重放旧失败。
9
12
  3. **真机截图**:产品站与 README 目前仍使用设计稿;需要在无私人数据的示例状态下实拍,替换后再对外宣传界面。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxmumu3/dsh-project-companion",
3
- "version": "0.34.0",
3
+ "version": "0.35.0",
4
4
  "description": "DSH Dot: WeChat personal agent, project memory and proactive follow-up for DeepSeek Harness",
5
5
  "author": "牛村木木山",
6
6
  "license": "MIT",
@@ -55,7 +55,8 @@
55
55
  "scripts/official-channels.mjs",
56
56
  "scripts/validate-state.mjs",
57
57
  "docs/mobile-control.md",
58
- "src/project-pulse.js"
58
+ "src/project-pulse.js",
59
+ "docs/dual-agent.md"
59
60
  ],
60
61
  "scripts": {
61
62
  "test": "node --max-old-space-size=128 --test --test-concurrency=1 test/*.test.mjs",
@@ -164,11 +164,11 @@ export function createDotGoalBoardViews(React) {
164
164
  const state=useController(controller),organized=organizer?useController(organizer):null,scan=organized?.status?.scan,summary=state.summary,n=summary?.selectedCount??0;
165
165
  React.useEffect(()=>{if(!controller.getSnapshot().summary)void controller.refresh();if(organizer&&!organizer.getSnapshot().status)void organizer.refresh();},[controller,organizer]);
166
166
  React.useEffect(()=>{if(!organizer||scan?.phase!=='running')return;const timer=setInterval(()=>void organizer.refresh(),1500);return()=>clearInterval(timer);},[organizer,scan?.phase]);
167
- return h('section',{className:`pc_scope_guide${n||compact?' compact':''}`,'aria-label':'工作区访问范围'},h('div',null,!n?h('p',{className:'pc_goal_eyebrow'},'了解你的工作'):null,h('h3',null,n?`已保存 ${n} 个工作区`:'让 Dot 了解你正在做什么'),h('p',null,n?scan?.phase==='running'?`已检查 ${scan.processed??scan.coverage.length} / ${scan.total??n} 个工作区;逐批读取有限资料。`:scan?.scopeRevision===summary.revision&&scan.coverage?.length?`已有 ${scan.coverage.length} 个工作区的整理记录,覆盖与边界可在项目页核对。`:'范围已保存,尚未整理。可直接整理成按目标组织的项目。':'先选一两个常用工作区,Dot 可从相关对话和项目说明中识别正在推进的事。以后随时添加。'),state.error&&!state.open?h('p',{role:'status',className:'pc_dot_error'},state.error):null),h('div',{className:'pc_scope_guide_actions'},n&&organizer?scan?.phase==='running'?button('停止整理',()=>organizer.cancelRecognition(),{disabled:organized.busy}):button('整理项目',()=>onOrganize?onOrganize():organizer.organize(summary.revision),{className:'pc_dot_primary',disabled:organized.busy||state.saving}):null,button(n?'管理工作区':'选择工作区',()=>controller.open(),{className:n?'':'pc_dot_primary'}),!n?h('p',null,'由你选择保存范围,或保存并整理。不会开启后台跟进。'):null));
167
+ return h('section',{className:`pc_scope_guide${n||compact?' compact':''}`,'aria-label':'工作区访问范围'},h('div',null,!n?h('p',{className:'pc_goal_eyebrow'},'我能看的范围'):null,h('h3',null,n?`已连接 ${n} 个项目文件夹`:'选择 Dot 能看的项目'),h('p',null,n?scan?.phase==='running'?`已检查 ${scan.processed??scan.coverage.length} / ${scan.total??n} 个工作区;逐批读取有限资料。`:scan?.scopeRevision===summary.revision&&scan.coverage?.length?`已有 ${scan.coverage.length} 个工作区的整理记录,覆盖与边界可在项目页核对。`:'范围已保存,尚未整理。可直接整理成按目标组织的项目。':'先选一两个常用工作区,Dot 可从相关对话和项目说明中识别正在推进的事。以后随时添加。'),state.error&&!state.open?h('p',{role:'status',className:'pc_dot_error'},state.error):null),h('div',{className:'pc_scope_guide_actions'},n&&organizer?scan?.phase==='running'?button('停止整理',()=>organizer.cancelRecognition(),{disabled:organized.busy}):button('整理成项目',()=>onOrganize?onOrganize():organizer.organize(summary.revision),{className:'pc_dot_primary',disabled:organized.busy||state.saving}):null,button(n?'管理范围':'选择范围',()=>controller.open(),{className:n?'':'pc_dot_primary'}),!n?h('p',null,'由你选择保存范围,或保存并整理。不会开启后台跟进。'):null));
168
168
  }
169
169
  function WorkspaceConnection({controller}){
170
170
  const state=useController(controller),summary=state.summary;
171
- return h('section',{className:'pc_scope_connection','aria-label':'工作区连接'},h('div',{className:'pc_scope_connection_head'},h('div',null,h('h3',null,'工作区'),h('p',null,'让 Dot 从你允许的范围中,识别跨对话的目标与项目。')),button(summary?.selectedCount?'管理工作区':'选择工作区',()=>controller.open())),h('div',{className:'pc_scope_chips'},...(summary?.labels??[]).slice(0,8).map(row=>h('span',{key:row.id},row.label)),summary?.selectedCount>8?h('span',null,`另 ${summary.selectedCount-8} 个`):null,!summary?.selectedCount?h('p',null,'尚未选择。可以先聊天,需要本地资料时再选。'):null),h('p',{className:'pc_dot_muted'},summary?`已允许 ${summary.selectedCount} 个工作区。新工作区不会自动加入。移除后停止读取;已保存的项目和历史仍保留。`:'工作区范围尚未确认。'),h('p',{className:'pc_scope_note'},'访问范围与持续关注分开管理。保存选择不会启动后台扫描、提醒或推送。'));
171
+ return h('section',{className:'pc_scope_connection','aria-label':'工作区连接'},h('div',{className:'pc_scope_connection_head'},h('div',null,h('h3',null,'项目文件夹'),h('p',null,'让 Dot 从你允许的范围中,识别跨对话的目标与项目。')),button(summary?.selectedCount?'管理范围':'选择范围',()=>controller.open())),h('div',{className:'pc_scope_chips'},...(summary?.labels??[]).slice(0,8).map(row=>h('span',{key:row.id},row.label)),summary?.selectedCount>8?h('span',null,`另 ${summary.selectedCount-8} 个`):null,!summary?.selectedCount?h('p',null,'尚未选择。可以先聊天,需要本地资料时再选。'):null),h('p',{className:'pc_dot_muted'},summary?`已允许 ${summary.selectedCount} 个工作区。新工作区不会自动加入。移除后停止读取;已保存的项目和历史仍保留。`:'工作区范围尚未确认。'),h('p',{className:'pc_scope_note'},'访问范围与持续关注分开管理。保存选择不会启动后台扫描、提醒或推送。'));
172
172
  }
173
173
  function WorkspaceDialog({controller,onOrganized}){
174
174
  const state=useController(controller),[query,setQuery]=React.useState(''),dialog=useDialog(state.open,()=>controller.cancel());
package/src/client.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /* Client half: reuse the official settings shell and the upstream QR viewer. */
2
2
  window.__ModuleLoader__.load({
3
- id:'dsh-project-companion',
3
+ id:'@oxmumu3/dsh-project-companion',
4
4
  factory:require=>{
5
5
  const React=require('react');
6
6
  const {Modal,SettingsForm,SettingsSecretField,SettingsValueField}=require('@deepseek-ai/dsh-client-ui-primitives');
@@ -585,11 +585,11 @@ function createDotGoalBoardViews(React) {
585
585
  const state=useController(controller),organized=organizer?useController(organizer):null,scan=organized?.status?.scan,summary=state.summary,n=summary?.selectedCount??0;
586
586
  React.useEffect(()=>{if(!controller.getSnapshot().summary)void controller.refresh();if(organizer&&!organizer.getSnapshot().status)void organizer.refresh();},[controller,organizer]);
587
587
  React.useEffect(()=>{if(!organizer||scan?.phase!=='running')return;const timer=setInterval(()=>void organizer.refresh(),1500);return()=>clearInterval(timer);},[organizer,scan?.phase]);
588
- return h('section',{className:`pc_scope_guide${n||compact?' compact':''}`,'aria-label':'工作区访问范围'},h('div',null,!n?h('p',{className:'pc_goal_eyebrow'},'了解你的工作'):null,h('h3',null,n?`已保存 ${n} 个工作区`:'让 Dot 了解你正在做什么'),h('p',null,n?scan?.phase==='running'?`已检查 ${scan.processed??scan.coverage.length} / ${scan.total??n} 个工作区;逐批读取有限资料。`:scan?.scopeRevision===summary.revision&&scan.coverage?.length?`已有 ${scan.coverage.length} 个工作区的整理记录,覆盖与边界可在项目页核对。`:'范围已保存,尚未整理。可直接整理成按目标组织的项目。':'先选一两个常用工作区,Dot 可从相关对话和项目说明中识别正在推进的事。以后随时添加。'),state.error&&!state.open?h('p',{role:'status',className:'pc_dot_error'},state.error):null),h('div',{className:'pc_scope_guide_actions'},n&&organizer?scan?.phase==='running'?button('停止整理',()=>organizer.cancelRecognition(),{disabled:organized.busy}):button('整理项目',()=>onOrganize?onOrganize():organizer.organize(summary.revision),{className:'pc_dot_primary',disabled:organized.busy||state.saving}):null,button(n?'管理工作区':'选择工作区',()=>controller.open(),{className:n?'':'pc_dot_primary'}),!n?h('p',null,'由你选择保存范围,或保存并整理。不会开启后台跟进。'):null));
588
+ return h('section',{className:`pc_scope_guide${n||compact?' compact':''}`,'aria-label':'工作区访问范围'},h('div',null,!n?h('p',{className:'pc_goal_eyebrow'},'我能看的范围'):null,h('h3',null,n?`已连接 ${n} 个项目文件夹`:'选择 Dot 能看的项目'),h('p',null,n?scan?.phase==='running'?`已检查 ${scan.processed??scan.coverage.length} / ${scan.total??n} 个工作区;逐批读取有限资料。`:scan?.scopeRevision===summary.revision&&scan.coverage?.length?`已有 ${scan.coverage.length} 个工作区的整理记录,覆盖与边界可在项目页核对。`:'范围已保存,尚未整理。可直接整理成按目标组织的项目。':'先选一两个常用工作区,Dot 可从相关对话和项目说明中识别正在推进的事。以后随时添加。'),state.error&&!state.open?h('p',{role:'status',className:'pc_dot_error'},state.error):null),h('div',{className:'pc_scope_guide_actions'},n&&organizer?scan?.phase==='running'?button('停止整理',()=>organizer.cancelRecognition(),{disabled:organized.busy}):button('整理成项目',()=>onOrganize?onOrganize():organizer.organize(summary.revision),{className:'pc_dot_primary',disabled:organized.busy||state.saving}):null,button(n?'管理范围':'选择范围',()=>controller.open(),{className:n?'':'pc_dot_primary'}),!n?h('p',null,'由你选择保存范围,或保存并整理。不会开启后台跟进。'):null));
589
589
  }
590
590
  function WorkspaceConnection({controller}){
591
591
  const state=useController(controller),summary=state.summary;
592
- return h('section',{className:'pc_scope_connection','aria-label':'工作区连接'},h('div',{className:'pc_scope_connection_head'},h('div',null,h('h3',null,'工作区'),h('p',null,'让 Dot 从你允许的范围中,识别跨对话的目标与项目。')),button(summary?.selectedCount?'管理工作区':'选择工作区',()=>controller.open())),h('div',{className:'pc_scope_chips'},...(summary?.labels??[]).slice(0,8).map(row=>h('span',{key:row.id},row.label)),summary?.selectedCount>8?h('span',null,`另 ${summary.selectedCount-8} 个`):null,!summary?.selectedCount?h('p',null,'尚未选择。可以先聊天,需要本地资料时再选。'):null),h('p',{className:'pc_dot_muted'},summary?`已允许 ${summary.selectedCount} 个工作区。新工作区不会自动加入。移除后停止读取;已保存的项目和历史仍保留。`:'工作区范围尚未确认。'),h('p',{className:'pc_scope_note'},'访问范围与持续关注分开管理。保存选择不会启动后台扫描、提醒或推送。'));
592
+ return h('section',{className:'pc_scope_connection','aria-label':'工作区连接'},h('div',{className:'pc_scope_connection_head'},h('div',null,h('h3',null,'项目文件夹'),h('p',null,'让 Dot 从你允许的范围中,识别跨对话的目标与项目。')),button(summary?.selectedCount?'管理范围':'选择范围',()=>controller.open())),h('div',{className:'pc_scope_chips'},...(summary?.labels??[]).slice(0,8).map(row=>h('span',{key:row.id},row.label)),summary?.selectedCount>8?h('span',null,`另 ${summary.selectedCount-8} 个`):null,!summary?.selectedCount?h('p',null,'尚未选择。可以先聊天,需要本地资料时再选。'):null),h('p',{className:'pc_dot_muted'},summary?`已允许 ${summary.selectedCount} 个工作区。新工作区不会自动加入。移除后停止读取;已保存的项目和历史仍保留。`:'工作区范围尚未确认。'),h('p',{className:'pc_scope_note'},'访问范围与持续关注分开管理。保存选择不会启动后台扫描、提醒或推送。'));
593
593
  }
594
594
  function WorkspaceDialog({controller,onOrganized}){
595
595
  const state=useController(controller),[query,setQuery]=React.useState(''),dialog=useDialog(state.open,()=>controller.cancel());
@@ -986,7 +986,7 @@ function createDotGoalBoardViews(React) {
986
986
  /* Approved paper/ink/blue workstation. The native writing surface is white. */
987
987
  .pc_dot,.pc_dot_modal{--dot-paper:#f6f5f0;--dot-card:#fffefa;--dot-white:#fff;--dot-ink:#23313c;--dot-muted:#5b6973;--dot-line:#cbd2ce;--dot-blue:#345ec7;font-family:${dotFont};font-size:14px;line-height:1.6}
988
988
  .pc_dot_inner{max-width:1192px;padding:24px 28px 32px}.pc_dot h1{font:400 24px/1.35 ${dotFont};letter-spacing:0}.pc_dot h2{font-size:18px;font-weight:600}.pc_dot h3{font-size:16px;line-height:1.45}.pc_dot p{max-width:75ch}.pc_dot_muted{font-size:12px;line-height:1.75}.pc_dot_brand_mark{border-radius:14px;width:43px;height:43px;background:var(--dot-card)}.pc_dot_brand h2{font-size:20px}.pc_dot_brand p{margin-top:4px}.pc_dot_header>.pc_dot_actions{font-size:12px;gap:12px}
989
- .pc_dot button:not(:where(.pc_dot_conversation *)),.pc_dot_drawer button{border-radius:7px;min-height:44px;font-size:13px}.pc_dot_tabs{width:max-content;max-width:100%;gap:4px;padding:4px;margin:20px 0 24px;background:#eeefea;border:1px solid var(--dot-line);border-radius:10px}.pc_dot_tabs button{min-width:76px;padding:7px 16px;border:0;border-radius:7px;font-size:14px}.pc_dot_tabs button.active{color:var(--dot-blue);background:var(--dot-white);box-shadow:0 1px 3px #23313c10}.pc_dot_home_grid{grid-template-columns:minmax(0,1fr) 268px;gap:32px}.pc_dot_column{min-width:0}.pc_dot_hero{max-width:none;margin:0 0 20px}.pc_dot_hero>p{margin:8px 0 12px}.pc_dot_composer,.pc_dot_conversation{--dsw-specific-input-major:#fff;background:var(--dot-white);border:1px solid #7e8e98;border-radius:8px;box-shadow:0 2px 10px #23313c08;color:#23313c;--dsw-alias-bg-base:#fff;--dsw-alias-bg-layer-1:#fff;--dsw-alias-bg-layer-2:#fff;--dsw-alias-bg-layer-3:#fff;--dsw-alias-label-primary:#23313c;--dsw-alias-label-secondary:#5b6973;--dsw-alias-state-business-primary:#345ec7}.pc_dot_composer{padding:16px;margin:14px 0 8px}.pc_dot_composer textarea{background:#fff;color:#23313c;min-height:68px;resize:vertical}.pc_dot_composer textarea::placeholder{color:#5b6973}.pc_dot_composer select{background:#fff;border-color:#cbd2ce;min-width:140px}.pc_dot_conversation{height:auto;min-height:180px;max-height:480px;margin-top:14px;overflow:auto}.pc_dot_conversation>div{min-height:0}.pc_dot_shortcuts{gap:8px}.pc_dot_shortcuts button{padding:6px 10px;border:1px solid var(--dot-line);background:var(--dot-card);font-size:12px;min-height:44px}.pc_dot_compose_bottom{gap:8px}.pc_dot_keyboard{font-size:11px}.pc_dot_section{padding-top:18px;margin-top:22px}.pc_dot_rail .pc_dot_section{margin:0 0 24px;padding:0 0 24px;border-top:0;border-bottom:1px solid var(--dot-line)}.pc_dot_rail h3{font-size:14px;margin-bottom:16px}
989
+ .pc_dot button:not(:where(.pc_dot_conversation *)),.pc_dot_drawer button{border-radius:7px;min-height:44px;font-size:13px}.pc_dot_tabs{width:max-content;max-width:100%;gap:4px;padding:4px;margin:20px 0 24px;background:#eeefea;border:1px solid var(--dot-line);border-radius:10px}.pc_dot_tabs button{min-width:76px;padding:7px 16px;border:0;border-radius:7px;font-size:14px}.pc_dot_tabs button.active{color:var(--dot-blue);background:var(--dot-white);box-shadow:0 1px 3px #23313c10}.pc_dot_home_grid{grid-template-columns:minmax(0,1fr) 268px;gap:32px}.pc_dot_home_single{grid-template-columns:minmax(0,1fr)}.pc_dot_more{margin-top:26px;border-top:1px solid var(--dot-line);padding-top:16px}.pc_dot_more>summary{cursor:pointer;font-size:13px;color:var(--dot-muted);list-style:none}.pc_dot_more>summary::-webkit-details-marker{display:none}.pc_dot_more>summary::before{content:'▸ ';display:inline-block;transition:transform .15s}.pc_dot_more[open]>summary::before{transform:rotate(90deg)}.pc_dot_more[open]{padding-bottom:8px}.pc_dot_column{min-width:0}.pc_dot_hero{max-width:none;margin:0 0 20px}.pc_dot_hero>p{margin:8px 0 12px}.pc_dot_composer,.pc_dot_conversation{--dsw-specific-input-major:#fff;background:var(--dot-white);border:1px solid #7e8e98;border-radius:8px;box-shadow:0 2px 10px #23313c08;color:#23313c;--dsw-alias-bg-base:#fff;--dsw-alias-bg-layer-1:#fff;--dsw-alias-bg-layer-2:#fff;--dsw-alias-bg-layer-3:#fff;--dsw-alias-label-primary:#23313c;--dsw-alias-label-secondary:#5b6973;--dsw-alias-state-business-primary:#345ec7}.pc_dot_composer{padding:16px;margin:14px 0 8px}.pc_dot_composer textarea{background:#fff;color:#23313c;min-height:68px;resize:vertical}.pc_dot_composer textarea::placeholder{color:#5b6973}.pc_dot_composer select{background:#fff;border-color:#cbd2ce;min-width:140px}.pc_dot_conversation{height:auto;min-height:180px;max-height:480px;margin-top:14px;overflow:auto}.pc_dot_conversation>div{min-height:0}.pc_dot_shortcuts{gap:8px}.pc_dot_shortcuts button{padding:6px 10px;border:1px solid var(--dot-line);background:var(--dot-card);font-size:12px;min-height:44px}.pc_dot_compose_bottom{gap:8px}.pc_dot_keyboard{font-size:11px}.pc_dot_section{padding-top:18px;margin-top:22px}.pc_dot_rail .pc_dot_section{margin:0 0 24px;padding:0 0 24px;border-top:0;border-bottom:1px solid var(--dot-line)}.pc_dot_rail h3{font-size:14px;margin-bottom:16px}
990
990
  .pc_dot_inline_wechat{display:grid;grid-template-columns:minmax(0,1fr) 188px;border:1px solid var(--dot-line);border-radius:8px;overflow:hidden;background:var(--dot-card);margin-bottom:22px}.pc_dot_pair_copy{padding:22px}.pc_dot_pair_copy h2{font-size:24px;font-weight:400;line-height:1.35}.pc_dot_pair_copy>p{font-size:14px;color:var(--dot-muted);margin-top:8px;line-height:1.75}.pc_dot_pair_copy>p.pc_dot_muted{font-size:12px}.pc_dot_text_button{border:0!important;padding-left:0!important;color:var(--dot-blue)!important;margin-top:8px}.pc_dot_inline_code{padding:16px 14px;background:#edf2fc;border-left:1px solid var(--dot-line);text-align:center;display:flex;flex-direction:column;align-items:center;gap:8px}.pc_dot_inline_code p{font-size:12px;line-height:1.5}.pc_dot_inline_code img{width:136px;height:136px;object-fit:contain;display:block;background:#fff;padding:4px;border-radius:6px}.pc_dot_inline_code button{font-size:12px;min-height:44px;background:#fff}.pc_dot_intro{font-size:14px;color:var(--dot-muted);padding:10px 0 20px}.pc_dot_sample{margin:14px 0 4px;padding:16px;border:1px solid var(--dot-line);border-radius:10px;background:var(--dot-card)}.pc_dot_sample_head{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:10px}.pc_dot_sample ol{margin:0;padding-left:20px;font-size:14px;line-height:1.65}.pc_dot_sample li{margin:4px 0}.pc_dot_sample li b{font-weight:600;margin-right:4px}.pc_dot_sample .pc_dot_actions{margin-top:12px}
991
991
  .pc_dot_attention_item{padding:18px 0;border-bottom:1px solid var(--dot-line);overflow-wrap:anywhere}.pc_dot_attention_item:first-of-type{border-top:1px solid var(--dot-line)}.pc_dot_item_kicker{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;color:var(--dot-muted);font-size:12px;margin-bottom:5px}.pc_dot_attention_item h3{font-size:16px;font-weight:600}.pc_dot_attention_item p{font-size:14px;color:var(--dot-muted);line-height:1.75;margin-top:6px}.pc_dot_attention_item p.pc_dot_item_next{color:var(--dot-ink)}.pc_dot_attention_item>.pc_dot_actions{margin-top:8px;justify-content:space-between;align-items:flex-start}.pc_dot_attention_item .pc_dot_actions>button{border:0;padding-left:0;color:var(--dot-blue);font-size:12px}.pc_dot_attention_item details{font-size:12px;color:var(--dot-muted);max-width:100%}.pc_dot_attention_item summary{padding:10px 0}.pc_dot_item_source{padding:8px 0;max-width:55ch}.pc_dot_item_source strong,.pc_dot_item_source span{display:block;font-size:12px}.pc_dot_item_source span{color:var(--dot-muted)}
992
992
  .pc_dot_schedule_item{position:relative;padding:0 0 18px 14px;margin:0 0 0 3px;border-left:1px solid var(--dot-line);overflow-wrap:anywhere}.pc_dot_schedule_item:before{content:'';position:absolute;left:-3px;top:7px;width:5px;height:5px;border-radius:50%;background:#7e8e98}.pc_dot_schedule_item strong{display:block;font-size:14px;font-weight:550}.pc_dot_schedule_item p{font-size:12px;color:var(--dot-muted);margin-top:3px;line-height:1.65}.pc_dot_plan_status{font-size:11px;color:var(--dot-muted)}.pc_dot_rail_note{font-size:12px;color:var(--dot-muted);line-height:1.75;margin-top:8px!important}.pc_dot_recovery{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;border:1px solid var(--dot-line);border-radius:8px;background:#f4ebdc;padding:12px 16px;margin-bottom:18px!important;color:var(--dot-ink)}.pc_dot_recovery strong{font-weight:600}.pc_dot_recovery p{font-size:12px;margin-top:4px}.pc_dot_recovery>button{flex-shrink:0;background:var(--dot-card)}.pc_dot_recovery details{font-size:12px;color:var(--dot-muted)}.pc_dot_recovery summary{padding:6px 0;min-height:44px}.pc_dot_history,.pc_dot_legacy_details,.pc_dot_review_details{border-top:1px solid var(--dot-line);margin-top:20px;font-size:12px;color:var(--dot-muted)}.pc_dot_history>summary,.pc_dot_legacy_details>summary,.pc_dot_review_details>summary{min-height:44px}.pc_dot_history .pc_dot_update{padding:14px 0}.pc_dot_history h3{font-size:14px}.pc_dot_footer{font-size:11px;margin-top:24px}.pc_dot_project_cards{display:block}.pc_dot_project_card{border-width:0 0 1px;border-radius:0;padding:18px 0;background:transparent}.pc_dot_project_card:first-child{border-top:1px solid var(--dot-line)}.pc_dot_project_card h2{font-size:17px}.pc_dot_project_card .pc_dot_eyebrow{display:none}
@@ -1358,7 +1358,7 @@ function createDotGoalBoardViews(React) {
1358
1358
  // Family projections intentionally exclude independent Dot's legacy plans.
1359
1359
  // Their current schedules have a separate availability check below.
1360
1360
  const unknownScopes=[!availability.projects?'关注项目':null,!availability.jobs?'交办记录':null,!readOnly&&!availability.plans?'已有安排':null,!attentionItems?'当前事项':attentionProjection.coverage==='unconfirmed'?'部分事项覆盖':null,scheduleProjection?.available!==true?'下一次安排':null,['unknown','failed'].includes(snapshot?.connection?.state)?'微信连接':null].filter(Boolean);
1361
- const recovery=!firstUse&&unknownScopes.length?h('div',{className:'pc_dot_notice pc_dot_recovery',role:'status','data-dot-recovery':true},h('div',null,h('strong',null,'部分状态暂未确认,电脑对话可以继续'),h('p',null,`${unknownScopes.join('、')}尚未核对。保留原安排,不会据此判断没有事项或重新创建。`),h('details',null,h('summary',null,'查看影响范围'),h('p',null,[attentionProjection?.note,scheduleProjection?.note].filter(v=>typeof v==='string'&&v).join(' ')||'恢复连接后重试状态,现有记录不会自动重做。'))),h('div',{className:'pc_dot_actions'},button('查看连接',()=>changePage('settings')),button('重试状态',refresh))):null;
1361
+ const recovery=!firstUse&&unknownScopes.length?h('div',{className:'pc_dot_notice pc_dot_recovery',role:'status','data-dot-recovery':true},h('div',null,h('strong',null,`有 ${unknownScopes.length} 项状态还没确认,不影响你现在对话`),h('p',null,`${unknownScopes.join('、')}还在核对。原来的安排会保留,不会因为没读到就当没有。`),h('details',null,h('summary',null,'查看影响范围'),h('p',null,[attentionProjection?.note,scheduleProjection?.note].filter(v=>typeof v==='string'&&v).join(' ')||'恢复连接后重试状态,现有记录不会自动重做。'))),h('div',{className:'pc_dot_actions'},button('查看连接',()=>changePage('settings')),button('重试状态',refresh))):null;
1362
1362
  const jobCard=job=>h('article',{className:'pc_dot_update',key:job.id,'data-dot-job':job.id},h('p',{className:'pc_dot_muted'},`${job.projectLabel} · ${states[job.status]??'状态待核对'}`),h('h3',null,job.task),job.result?.available===true&&typeof job.result.text==='string'?h('p',{className:'pc_dot_excerpt'},job.result.text):null,job.result?.truncated?h('p',{className:'pc_dot_muted'},'原回复较长,此处为摘录。'):null,job.delivery?h('p',{className:'pc_dot_muted'},deliveries[job.delivery.status]??'回传状态待核对'):null,h('div',{className:'pc_dot_actions'},button('看看这次结果',()=>openTask(job)),readOnly?null:button('和 Dot 接着聊',()=>continueJob(job))));
1363
1363
  const focusComposer=()=>{composerStart.current?.focus?.();composerStart.current?.scrollIntoView?.({block:'nearest'});};
1364
1364
  const continueDesktopCandidate=async()=>{if(!conversationCandidate||flight.current)return;flight.current=true;setBusy(true);try{const candidate=await desktopController.resolve(conversationCandidate);if(!candidate)throw Error('candidate unavailable');const remembered=await desktopController.remember(candidate.sessionId);if(active.current){workbenchCache.localConversation=candidate;setLocalConversation(candidate);setConversationCandidate(null);setNotice(remembered?'已选择上次对话,沿用原草稿。':'本次可继续上次对话;入口暂未保存,可从原生历史找回。');}}catch{if(active.current)setError('上次对话暂不可用,请从原生历史核对;当前草稿仍保留。');}finally{flight.current=false;if(active.current)setBusy(false);}};
@@ -1366,7 +1366,7 @@ function createDotGoalBoardViews(React) {
1366
1366
  const inlineState=inlineConnection?.state;
1367
1367
  const connectionCopy={missing:'微信桥接尚未就绪。先在电脑上聊,也可到连接页查看微信设置。',unknown:'微信连接状态暂未确认,保留原连接;先在电脑上继续。','waiting-qr':'微信扫一扫 · 等待扫码',scanned:'已扫码,请在手机上确认。','awaiting-message':'已确认扫码账号。用这个微信给小助手发送“你好”,开始聊天。',bound:'微信已连接,沿用已有入口。',failed:'微信连接暂时受阻。先查看已有连接状态,不会重置绑定。'};
1368
1368
  const inlineWechat=firstUse?h('section',{className:'pc_dot_inline_wechat','data-dot-inline-wechat':true,'aria-label':'连接微信'},h('div',{className:'pc_dot_pair_copy'},h('h2',null,inlineState==='bound'?'微信已连接':'把 Dot 带到微信里'),h('p',null,'在手机上交代任务、收结果,也能收到你已开启的提醒。'),button('先在电脑上试试',focusComposer,{className:'pc_dot_text_button'}),h('p',{className:'pc_dot_muted'},'电脑和 Harness 需保持在线。扫码不会自动开启推送。')),h('div',{className:'pc_dot_inline_code'},h('p',{role:'status'},inlineConnectionError||(qrFailed?'二维码暂不可用,请刷新连接状态。':connectionCopy[inlineState]??'正在读取现有微信连接…')),inlineState==='waiting-qr'&&inlineConnection?.qrAvailable===true&&!qrFailed?h('img',{src:'/wechat/api/qr-image'+(/^[a-f0-9]{16}$/.test(inlineConnection.qrRevision??'')?`?v=${inlineConnection.qrRevision}`:''),alt:'用微信扫描,连接 Dot',onError:()=>setQrFailed(true)}):null,button('刷新连接状态',readInlineConnection),inlineState==='missing'||inlineState==='failed'?button('查看微信设置',()=>changePage('settings')):null)):null;
1369
- const composer=embedded?h('section',{className:'pc_dot_hero','aria-label':'和 Dot 继续对话'},h('h1',null,'今天想推进哪件事?'),retainedDraftView(desktopTarget,{busy,onApply:recoverLocalDraft,onCopy:()=>copyCachedDraft(setNotice)}),h('div',{ref:homeAnchor,'data-dot-home-conversation':true},goalActive||overlayActive?h('div',{'data-dot-native-placeholder':true,style:{height:homeHeight.current},'aria-hidden':true}):nativeSuspended?h('p',{className:'pc_dot_notice',role:'status'},'正在切换完整对话,原草稿会保留。'):h(DesktopConversation,{target:desktopTarget,SessionProvider:props.SessionProvider,renderSlot:props.renderSlot,onOpenHistory:()=>navigate(desktopTarget.sessionId),onReady:setNativeHomeReady}))):h('section',{className:'pc_dot_hero'},h('h1',null,firstUse?'先把一件事交给 Dot。':'今天想推进哪件事?'),h('p',{className:'pc_dot_muted'},'说说背景和目标,需要资料时再按需连接。'),h('div',{className:'pc_dot_composer'},h('textarea',{ref:composerStart,'aria-label':'交代给 Dot 的事情',placeholder:'把背景、想做的事,或刚刚变化的情况告诉我…',maxLength:3500,value:draft,disabled:busy,onChange:e=>{if(!flight.current)setDraft(e.target.value);},onKeyDown:e=>{if((e.metaKey||e.ctrlKey)&&e.key==='Enter'&&!e.isComposing&&e.keyCode!==229&&!e.nativeEvent?.isComposing){e.preventDefault();void chat();}}}),h('div',{className:'pc_dot_compose_bottom'},h('select',{'aria-label':'这句话关联的项目',value:selected??'',disabled:busy,onChange:e=>{if(!flight.current)setSelected(e.target.value);}},h('option',{value:''},'不关联项目'),...projects.map(p=>h('option',{value:p.id,key:p.id},p.label))),h('span',{className:'pc_dot_keyboard'},'⌘ / Ctrl + Enter'),button('开始对话',()=>chat(),{className:'pc_dot_primary'}))),h('p',{className:'pc_dot_muted'},'带入原生 Dot 会话后,由你发送;已有会话草稿会保留。'),conversationCandidate?button('继续上次对话',continueDesktopCandidate,{className:'pc_dot_text_button'}):null,h('div',{className:'pc_dot_actions pc_dot_shortcuts'},...shortcuts.slice(0,3).map(([label,prompt])=>button(label,()=>stageDraft(prompt),{key:label}))));
1369
+ const composer=embedded?h('section',{className:'pc_dot_hero','aria-label':'和 Dot 继续对话'},h('h1',null,'今天想做什么?'),h('p',{className:'pc_dot_muted'},'说一句要做的事,或者接着上次聊;需要资料时再连。'),retainedDraftView(desktopTarget,{busy,onApply:recoverLocalDraft,onCopy:()=>copyCachedDraft(setNotice)}),h('div',{ref:homeAnchor,'data-dot-home-conversation':true},goalActive||overlayActive?h('div',{'data-dot-native-placeholder':true,style:{height:homeHeight.current},'aria-hidden':true}):nativeSuspended?h('p',{className:'pc_dot_notice',role:'status'},'正在切换完整对话,原草稿会保留。'):h(DesktopConversation,{target:desktopTarget,SessionProvider:props.SessionProvider,renderSlot:props.renderSlot,onOpenHistory:()=>navigate(desktopTarget.sessionId),onReady:setNativeHomeReady}))):h('section',{className:'pc_dot_hero'},h('h1',null,firstUse?'先把一件事交给 Dot。':'今天想做什么?'),h('p',{className:'pc_dot_muted'},'说说背景和目标,需要资料时再按需连接。'),h('div',{className:'pc_dot_composer'},h('textarea',{ref:composerStart,'aria-label':'交代给 Dot 的事情',placeholder:'把背景、想做的事,或刚刚变化的情况告诉我…',maxLength:3500,value:draft,disabled:busy,onChange:e=>{if(!flight.current)setDraft(e.target.value);},onKeyDown:e=>{if((e.metaKey||e.ctrlKey)&&e.key==='Enter'&&!e.isComposing&&e.keyCode!==229&&!e.nativeEvent?.isComposing){e.preventDefault();void chat();}}}),h('div',{className:'pc_dot_compose_bottom'},h('select',{'aria-label':'这句话关联的项目',value:selected??'',disabled:busy,onChange:e=>{if(!flight.current)setSelected(e.target.value);}},h('option',{value:''},'不关联项目'),...projects.map(p=>h('option',{value:p.id,key:p.id},p.label))),h('span',{className:'pc_dot_keyboard'},'⌘ / Ctrl + Enter'),button('开始对话',()=>chat(),{className:'pc_dot_primary'}))),h('p',{className:'pc_dot_muted'},'带入原生 Dot 会话后,由你发送;已有会话草稿会保留。'),conversationCandidate?button('继续上次对话',continueDesktopCandidate,{className:'pc_dot_text_button'}):null,h('div',{className:'pc_dot_actions pc_dot_shortcuts'},...shortcuts.slice(0,3).map(([label,prompt])=>button(label,()=>stageDraft(prompt),{key:label}))));
1370
1370
  const sourceMeta=source=>h('div',{className:'pc_dot_item_source',key:`${source.source??''}:${source.title??''}`},h('strong',null,source.label||source.title||source.source||'来源'),h('span',null,[source.source,source.at?date(source.at):null,['metadata_only','metadata-only'].includes(source.contentState)?'仅来源信息':null,source.contentState==='unread'?'正文未读':null,source.contentState==='unavailable'?'内容尚未确认':null,source.contentState==='actual_empty'?'返回内容为空':null,source.truncated?'内容已截断':null].filter(Boolean).join(' · ')));
1371
1371
  const attentionCard=item=>h('article',{className:'pc_dot_attention_item',key:item.id,'data-dot-attention-item':item.id},h('div',{className:'pc_dot_item_kicker'},h('span',null,({deadline:'截止事项',risk:'需要留意',invitation:'待确认邀请',reply:'待回复',change:'近期变化',progress:'项目进展',event:'近期安排'}[item.kind]??'当前事项')),h('span',null,item.dueAt?`${item.dueAtBasis==='relative'?'估算期限':'截止'} ${date(item.dueAt)}`:item.eventStartAt?`开始 ${date(item.eventStartAt)}`:item.time?date(item.time):'')),h('h3',null,item.title),typeof item.summary==='string'&&item.summary?h('p',{className:'pc_dot_item_summary'},item.summary):null,typeof item.why==='string'&&item.why?h('p',{className:'pc_dot_item_why'},item.why):null,typeof item.action==='string'&&item.action?h('p',{className:'pc_dot_item_next'},item.action):null,typeof item.unknown==='string'&&item.unknown?h('p',{className:'pc_dot_item_unknown'},`待确认:${item.unknown}`):null,item.execution?h('p',{className:'pc_dot_muted','data-dot-item-execution':true},({in_progress:'正在执行',ready_for_review:'已有结果,待你验收',blocked:'执行当前受阻',unknown:'执行结果尚未确认'}[item.execution.status]??'执行结果尚未确认'),item.execution.outdated===true?' · 依据已有更新,执行结果基于旧版资料,需重新核对。':null):null,item.confidence==='inferred'?h('p',{className:'pc_dot_muted'},'这是基于已保存资料的判断,仍需核对。'):null,h('div',{className:'pc_dot_actions'},button('和 Dot 接着聊',()=>stageDraft(`请准备个人回顾「${item.title}」的下一步\n事项 ID:${item.id}\n请先核对原事项及已授权来源,再帮我梳理下一步;不要自动重做旧任务或扩大读取范围。`,'')),Array.isArray(item.sources)&&item.sources.length?h('details',null,h('summary',null,'查看依据'),...item.sources.slice(0,5).map(sourceMeta)):null));
1372
1372
  const attentionView=section('值得你留意',attentionItems?attentionItems.length?attentionItems.map(attentionCard):h('p',{className:'pc_dot_empty'},'当前已核对的范围内,没有待处理事项。有事可以直接告诉 Dot。'):h('p',{className:'pc_dot_empty'},'当前事项尚未核对,恢复入口见上方提示。'),typeof attentionProjection?.note==='string'&&attentionProjection.note?h('p',{className:'pc_dot_muted'},attentionProjection.note):null,attentionProjection?.truncated?h('p',{className:'pc_dot_muted'},'这里只展示最近 5 条事项,其他内容请在原会话核对。'):null);
@@ -1374,7 +1374,7 @@ function createDotGoalBoardViews(React) {
1374
1374
  const scheduleRail=h('section',{className:'pc_dot_section pc_dot_schedule','data-dot-schedule-rail':true},h('h3',null,'下一次安排'),typeof reviewHealth?.label==='string'&&reviewHealth.label?h('p',{className:'pc_dot_muted','data-dot-review-health':true},`最近运行:${reviewHealth.label}${reviewHealth.at?' · '+date(reviewHealth.at):''}。手机收到仍未确认。`):null,scheduleItems?scheduleItems.length?scheduleItems.map(item=>h('div',{className:'pc_dot_schedule_item',key:item.id},h('strong',null,item.title),h('span',{className:'pc_dot_plan_status'},({stored:'已保存',paused:'已暂停',blocked:'当前受阻'}[item.status]??'状态待核对')),h('p',null,scheduleTime(item)),h('p',{className:'pc_dot_muted'},item.timeZone||'时区待核对'),h('p',{className:'pc_dot_muted'},({['personal-review']:'个人回顾',news:'AI 日报',['project-followup']:'项目跟进'}[item.source]??'原安排')))):scheduleProjection?.available===true?h('p',{className:'pc_dot_empty'},'当前范围没有已保存的安排。想跟进一件事,可以直接告诉 Dot。'):h('p',{className:'pc_dot_empty'},'安排状态见上方提示。'):h('p',{className:'pc_dot_empty'},'安排状态见上方提示。'),scheduleProjection?.available!==true&&scheduleItems?.length?h('p',{className:'pc_dot_muted'},'部分安排尚未确认;这里保留已核对的安排。'):null,scheduleItems?.length?h('p',{className:'pc_dot_rail_note'},reviewHealth?'这里显示已保存的安排;手机收到仍未确认。':'这里显示已保存的安排;运行尚未核验,手机收到仍未确认。'):null,scheduleProjection?.truncated?h('p',{className:'pc_dot_muted'},'此处为有限安排,其余请在原入口核对。'):null);
1375
1375
  const history=availability.jobs?h('details',{className:'pc_dot_history','data-dot-history':true},h('summary',null,`找到之前聊过的事(${jobs.length})`),recentJobs.length?recentJobs.map(jobCard):h('p',{className:'pc_dot_muted'},'这个窗口里还没有交办记录。'),h('p',{className:'pc_dot_muted'},'这里展示最近的有限记录;更早的原始内容在 Dot 会话中。'),desktopTarget?button('打开完整会话历史',()=>navigate(desktopTarget.sessionId)):bound&&!readOnly?button('打开完整会话历史',()=>navigate(snapshot.connection.sessionId)):null):null;
1376
1376
  const sampleCard=firstUse&&!projects.length?h('section',{className:'pc_dot_sample','data-dot-sample':true,'aria-label':'示例简报'},h('div',{className:'pc_dot_sample_head'},h('span',{className:'pc_dot_badge'},'示例'),h('strong',null,'Dot 会把一件事接成这样的简报')),h('ol',null,h('li',null,h('b',null,'进展'),'三篇阅读材料已经整理好,试读说明还差一版。'),h('li',null,h('b',null,'卡点'),'作者希望把“读完有什么收获”说得更具体。'),h('li',null,h('b',null,'下一步'),'先找 5 位读者试读一周,再决定是否扩大。')),h('p',{className:'pc_dot_muted'},'这是示例,不是你的资料。连上项目或微信后,Dot 会按你的来源整理。'),h('div',{className:'pc_dot_actions'},button('用这个例子聊聊',()=>stageDraft('请参考示例简报的结构,帮我整理一件正在推进的事:先只问我缺的目标和范围,再给我进展、卡点和下一步。'),{className:'pc_dot_text_button'}))):null;
1377
- const home=h('div',null,recovery,h('div',{className:'pc_dot_home_grid'},h('div',{className:'pc_dot_column'},inlineWechat,h(WorkspaceGuide,{controller:workspaceScope,organizer:logicalProjects,onOrganize:async()=>{if(await logicalProjects.organize(workspaceScope.getSnapshot().summary?.revision))changePage('projects');}}),composer,sampleCard,firstUse?h('p',{className:'pc_dot_intro'},'不用先把所有东西配好。先聊手上的任务,用到邮件、日程或项目时,再连接需要的资料。'):attentionView,history,h('details',{className:'pc_dot_legacy_details'},h('summary',null,'更多原会话安排与检查'),plans,checkHistory)),h('aside',{className:'pc_dot_column pc_dot_rail','aria-label':'后续安排与资料范围'},firstUse?section('从你手上的事开始',h('p',{className:'pc_dot_muted'},'先交代一个目标,Dot 会接着整理下一步。用到资料时再连接;想定时跟进时再安排。')):scheduleRail,section('正在关注',availability.projects?projects.length?projects.map(p=>button(h('span',null,h('strong',null,p.label),h('small',{className:'pc_dot_muted'},latest(p)?`资料更新 ${date(latest(p))}`:'尚无近期资料')),()=>openProject(p.id),{key:p.id,className:'pc_dot_project_mini'})):h('p',{className:'pc_dot_muted'},'先从手头的一件事开始,需要时再关注项目。'):h('p',{className:'pc_dot_muted'},'关注范围见上方提示。'),readOnly?null:button('选择关注项目',()=>setSetup(true))),reviewState?h('details',{className:'pc_dot_review_details'},h('summary',null,'个人回顾与资讯设置'),reviewCard):null)));
1377
+ const home=h('div',null,recovery,h('div',{className:'pc_dot_home_grid pc_dot_home_single'},h('div',{className:'pc_dot_column'},inlineWechat,h(WorkspaceGuide,{controller:workspaceScope,organizer:logicalProjects,onOrganize:async()=>{if(await logicalProjects.organize(workspaceScope.getSnapshot().summary?.revision))changePage('projects');}}),composer,sampleCard,firstUse?h('p',{className:'pc_dot_intro'},'不用先把所有东西配好。先聊手上的任务,用到邮件、日程或项目时,再连接需要的资料。'):attentionView,history,h('details',{className:'pc_dot_legacy_details'},h('summary',null,'更多原会话安排与检查'),plans,checkHistory)),h('details',{className:'pc_dot_more','aria-label':'安排与关注'},h('summary',null,'安排与关注'),firstUse?section('从你手上的事开始',h('p',{className:'pc_dot_muted'},'先交代一个目标,Dot 会接着整理下一步。用到资料时再连接;想定时跟进时再安排。')):scheduleRail,section('正在关注',availability.projects?projects.length?projects.map(p=>button(h('span',null,h('strong',null,p.label),h('small',{className:'pc_dot_muted'},latest(p)?`资料更新 ${date(latest(p))}`:'尚无近期资料')),()=>openProject(p.id),{key:p.id,className:'pc_dot_project_mini'})):h('p',{className:'pc_dot_muted'},'先从手头的一件事开始,需要时再关注项目。'):h('p',{className:'pc_dot_muted'},'关注范围见上方提示。'),readOnly?null:button('选择关注项目',()=>setSetup(true))),reviewState?h('details',{className:'pc_dot_review_details'},h('summary',null,'个人回顾与资讯设置'),reviewCard):null)));
1378
1378
  const catalogView=section(`全部项目${catalog?` · ${catalog.total}`:''}`,
1379
1379
  h('p',{className:'pc_dot_muted'},'按名称找到 Harness 已登记的项目,单次查看不占持续关注名额。列目录不会读取项目内容。'),
1380
1380
  !bound?h('p',{className:'pc_dot_empty'},'先确认微信连接,再查看你的项目目录。'):h('div',null,
@@ -1394,7 +1394,7 @@ function createDotGoalBoardViews(React) {
1394
1394
  error?h('p',{className:'pc_dot_error',role:'alert'},error):null,notice?h('p',{className:'pc_dot_notice',role:'status'},notice):null,snapshot?.paused?h('p',{className:'pc_dot_notice'},'Dot 当前已暂停主动任务。这里仍可查看已有记录。'):null,
1395
1395
  page==='projects'?projectsPage:snapshot?(page==='memory'?memoryPage:page==='records'?recordsPage:page==='home'?home:null):!error?h('p',{role:'status'},'正在读取项目总览…'):null,
1396
1396
  connectionsSeen?h('div',{hidden:page!=='settings'},h(WorkspaceConnection,{controller:workspaceScope}),h('h1',null,'按需连接,按你说的范围读取'),h('p',{className:'pc_dot_muted'},'账号授权、来源启用和实际查询分别发生。先从手头这件事需要的资料开始。'),readOnly?null:button('管理微信与关注项目',()=>setSetup(true)),h(ContextPanel,{compact:true,...(!readOnly?{onFirstValue:prompt=>stageDraft(prompt,'')}:{}),bindingRevision:contextRevision,bound:contextRevision!==null&&bound}),section('界面外观',button(appearanceState.mode==='dot'?'恢复原生外观':'启用 Dot 外观',()=>appearance.setAppearance(appearanceState.mode==='dot'?'native':'dot'),{disabled:!appearanceState.writable||appearanceState.busy}),appearanceState.error?h('p',{role:'status'},appearanceState.error):null)):null,
1397
- h('footer',{className:'pc_dot_footer'},snapshot?`更新于 ${date(snapshot.generatedAt)} · ${snapshot.hostTimeZone??'电脑时区'}。打开页面不会启动任务或推送。`:'',snapshot?.limitations?.length?h('details',null,h('summary',null,'资料范围与状态说明'),h('ul',null,...snapshot.limitations.slice(0,12).map((t,i)=>h('li',{key:i},t)))):null)),
1397
+ h('footer',{className:'pc_dot_footer'},snapshot?.limitations?.length?h('details',null,h('summary',null,'资料范围与状态说明'),h('ul',null,...snapshot.limitations.slice(0,12).map((t,i)=>h('li',{key:i},t)))):null)),
1398
1398
  h(WorkspaceDialog,{controller:workspaceScope,onOrganized:()=>changePage('projects')}),h(ProjectSheet,{controller:logicalProjects,renderConversation:({projectId,target})=>!nativeSuspended&&typeof props.SessionProvider==='function'&&typeof props.renderSlot==='function'?h(DesktopConversation,{target,projectId,owner:'project',SessionProvider:props.SessionProvider,renderSlot:props.renderSlot,slotName:'dot.project.conversation',onOpenHistory:()=>navigate(target.sessionId)}):h('p',{role:'status'},'原生对话组件暂不可用,请恢复 Harness 工作台后重新打开;已有草稿仍保留。')}),
1399
1399
  drawer?h(Modal,{open:true,closeLabel:'关闭',title:drawer==='project'?project?.label??'项目详情':drawer==='follow'?'后续怎么跟进':drawer==='memory'?'纠正项目记忆':'本次执行回复',className:'pc_dot_modal',onClose:closeDrawer},h('div',{className:'pc_dot_drawer'},error?h('p',{className:'pc_dot_error',role:'alert'},error):null,closeReview?exitReview:drawer==='project'?projectDetails():drawer==='follow'?followDetails():drawer==='memory'?memoryDetails():taskDetails())):null,
1400
1400
  setup&&!readOnly?h(Modal,{open:true,closeLabel:'关闭',title:'连接微信与选择项目',className:'pc_setup_modal',onClose:()=>{setSetup(false);void refresh();}},h(SetupSection,{close:()=>{setSetup(false);void refresh();}})):null);
@@ -1413,7 +1413,7 @@ function createDotGoalBoardViews(React) {
1413
1413
  const Section=props=>h('div',null,Surface(props,false),h(AppearancePanel),h(ContextPanel));
1414
1414
  ctx.effect(()=>ctx.slots.inject('settings.section',()=>ctx.slots.register({name:'settings.section',id:'project-companion',order:39,label:'DSH Dot'},Section)));
1415
1415
  const forms=typeof ctx.get==='function'?ctx.get('configForms',false):ctx.configForms;
1416
- if(forms)ctx.effect(()=>ctx.slots.inject('plugins.row.config',()=>ctx.slots.register({name:'plugins.row.config',key:'dsh-project-companion#project-companion'},props=>props.view==='summary'?'DeepSeek Dot 的个人资料来源与原生凭据配置':h('div',{className:'pc_setup'},h('h3',null,'连接凭据'),h(CredentialForm)))));
1416
+ if(forms)ctx.effect(()=>ctx.slots.inject('plugins.row.config',()=>ctx.slots.register({name:'plugins.row.config',key:'@oxmumu3/dsh-project-companion#project-companion'},props=>props.view==='summary'?'DeepSeek Dot 的个人资料来源与原生凭据配置':h('div',{className:'pc_setup'},h('h3',null,'连接凭据'),h(CredentialForm)))));
1417
1417
  }
1418
1418
  return{inject,apply,createDotAppearance,prepareDotDraft,createDesktopConversationController,desktopConversationCanEmbed};
1419
1419
  },