@suifei/dsh-ai-team 0.4.111 → 0.4.113
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/CHANGELOG.md +24 -0
- package/client.js +75 -42
- package/lib/vendor/skillopt/skillopt_sleep/harvest_dsh.py +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.113 - 2026-11-16
|
|
4
|
+
|
|
5
|
+
**dsh 来源也跳过「替引擎答题」的会话,不论谁派的**
|
|
6
|
+
|
|
7
|
+
- il2c night 8(0.4.109,作答子代理仍逐个唤醒 PMO):PMO 被唤醒后自己派了 23 个子代理去答 handoff 题
|
|
8
|
+
(「读文件 …\.skillopt-sleep-handoff\PROMPTS.md 中 id …」),label 是 `agent-N`,0.4.109 按 `skillopt-*` label
|
|
9
|
+
的过滤挡不住;night 9 因此钉入 33 个会话,其中 23 个是这类引擎工作;
|
|
10
|
+
- `harvest_dsh`:会话的**第一条**意图指向 `.skillopt-sleep-handoff` 即整段跳过;团队会话里后来顺带提到不受影响。
|
|
11
|
+
实机同一 72 小时窗口:33 → 10(与作答子代理出现前一致);
|
|
12
|
+
- 根因(PMO 被逐个唤醒)已由 0.4.111 的 caller 投递消除:night 9 触发后 PMO 宿主会话的「子智能体已完成」通知
|
|
13
|
+
保持 382 条不变;
|
|
14
|
+
- 测试:`test/skillopt-dsh-source.test.js` 扩充 1 例(去掉修复即失败);
|
|
15
|
+
|
|
16
|
+
## 0.4.112 - 2026-11-16
|
|
17
|
+
|
|
18
|
+
**任务记录同样打开即在最新回帖(#33 后续)**
|
|
19
|
+
|
|
20
|
+
- 实机:0.4.108 起主对话已贴底,右侧任务记录(Thread 面板)打开仍停在顶部的完成信息,最新回帖要手动拖到底;
|
|
21
|
+
- 跟随接线抽成 `useFollowLatest`(主对话与任务记录共用一份,内部仍是 `createStreamFollower`),任务记录按
|
|
22
|
+
任务切换重置贴底,新回帖或状态变化时按是否停在底部决定跟随,上翻时底部浮出「↓ N 条新消息」;
|
|
23
|
+
内容变高改为观察滚动容器的每个直接子块(任务记录不是单一内层容器);
|
|
24
|
+
- 测试:`test/client-stream-follow.test.js` 新增接线契约 1 例,`test/client.render.test.js` 增加「打开任务后 Thread
|
|
25
|
+
面板渲染且带跟随接线」(换回旧 client.js 两处即失败);
|
|
26
|
+
|
|
3
27
|
## 0.4.111 - 2026-11-16
|
|
4
28
|
|
|
5
29
|
**SkillOpt 一次性子代理不再逐个唤醒 PMO**
|
package/client.js
CHANGED
|
@@ -2250,6 +2250,13 @@ window.__ModuleLoader__.load({
|
|
|
2250
2250
|
const headSeq = thread?.headSeq ?? thread?.entries?.length ?? 0;
|
|
2251
2251
|
const stale = replyBase !== null && replyBase !== undefined && headSeq > replyBase;
|
|
2252
2252
|
const entries = Array.isArray(thread?.entries) ? thread.entries : [];
|
|
2253
|
+
// #33 任务记录同样打开即在最新回帖:换任务重置,新回帖到达时按是否停在底部决定跟随。
|
|
2254
|
+
const threadFollow = useFollowLatest({
|
|
2255
|
+
key: task.id,
|
|
2256
|
+
shown: !converting,
|
|
2257
|
+
count: entries.length,
|
|
2258
|
+
tail: entries.length > 0 ? String(entries[entries.length - 1]?.seq ?? '') + '|' + task.status : task.status,
|
|
2259
|
+
});
|
|
2253
2260
|
return h('aside', { className: 'at-right', role: 'complementary', 'aria-label': t('threadAria'), tabIndex: -1, ref: panelRef },
|
|
2254
2261
|
h('div', { className: 'at-rhead' },
|
|
2255
2262
|
h('div', { className: 'at-rh' },
|
|
@@ -2264,7 +2271,7 @@ window.__ModuleLoader__.load({
|
|
|
2264
2271
|
h('button', { className: 'at-noteclose', type: 'button', 'aria-label': t('dismiss'), title: t('dismiss'), onClick: onDismissNote }, h(Ico, { name: 'close', size: 12 }))) : null,
|
|
2265
2272
|
converting
|
|
2266
2273
|
? h(ConvertForm, { t, project, task, thread, title: convert.title, dod: convert.dod, onTitle: convert.onTitle, onDod: convert.onDod, onCancel: convert.onCancel, onSubmit: convert.onSubmit })
|
|
2267
|
-
: h('div', { className: 'at-rbody' },
|
|
2274
|
+
: h('div', { className: 'at-rbody', ref: threadFollow.ref, onScroll: threadFollow.onScroll },
|
|
2268
2275
|
stale ? h(ConflictBanner, { t, thread, baseSeq: replyBase, headSeq, onContinue }) : null,
|
|
2269
2276
|
task.status === 'done' ? h(DoneSummary, { t, task }) : h(TaskDetail, { t, task }),
|
|
2270
2277
|
entries.length
|
|
@@ -2311,6 +2318,7 @@ window.__ModuleLoader__.load({
|
|
|
2311
2318
|
h('span', { className: 'at-peopleprojectname' }, '#' + event.seq),
|
|
2312
2319
|
h('span', { className: 'at-peoplestate' }, event.type),
|
|
2313
2320
|
h('span', { className: 'at-peopletasks' }, fmtTime(event.at) + actorSuffix(event.actor)))))) : null,
|
|
2321
|
+
!converting ? h(JumpToLatest, { t, unseen: threadFollow.unseen, onJump: threadFollow.jump }) : null,
|
|
2314
2322
|
!converting ? h('div', { className: 'at-rfoot' },
|
|
2315
2323
|
h('div', { className: 'at-box at-rbox' },
|
|
2316
2324
|
h('textarea', {
|
|
@@ -2666,6 +2674,60 @@ window.__ModuleLoader__.load({
|
|
|
2666
2674
|
}
|
|
2667
2675
|
// </stream-follow>
|
|
2668
2676
|
|
|
2677
|
+
/**
|
|
2678
|
+
* 滚动容器「跟随最新」的 React 接线(主对话、任务记录共用这一份)。
|
|
2679
|
+
* key 变化即重置并贴底(切项目/标签/任务);
|
|
2680
|
+
* shown 容器在场时才量尺寸;
|
|
2681
|
+
* count/tail 条目数与最后一条的标识,变化即按 follower 判定贴底或累计未读。
|
|
2682
|
+
* 只用 useLayoutEffect:尺寸读写要在绘制前完成,避免先闪到顶部再跳到底。
|
|
2683
|
+
*/
|
|
2684
|
+
function useFollowLatest({ key, shown, count, tail }) {
|
|
2685
|
+
const ref = React.useRef(null);
|
|
2686
|
+
const followerRef = React.useRef(null);
|
|
2687
|
+
if (followerRef.current === null) followerRef.current = createStreamFollower();
|
|
2688
|
+
const [unseen, setUnseen] = React.useState(0);
|
|
2689
|
+
React.useLayoutEffect(() => {
|
|
2690
|
+
followerRef.current.reset();
|
|
2691
|
+
setUnseen(0);
|
|
2692
|
+
}, [key]);
|
|
2693
|
+
React.useLayoutEffect(() => {
|
|
2694
|
+
const el = ref.current;
|
|
2695
|
+
if (!shown || el === null || el === undefined) return;
|
|
2696
|
+
const step = followerRef.current.onContent(el, count);
|
|
2697
|
+
if (step.scrollTo !== null) el.scrollTop = step.scrollTo;
|
|
2698
|
+
setUnseen(step.unseen);
|
|
2699
|
+
}, [key, shown, count, tail]);
|
|
2700
|
+
React.useLayoutEffect(() => {
|
|
2701
|
+
const el = ref.current;
|
|
2702
|
+
if (!shown || el === null || el === undefined || typeof ResizeObserver !== 'function') return undefined;
|
|
2703
|
+
// 观察每个直接子块:容器自身高度固定,内容变高(卡片展开、字体晚到)只体现在子块上。
|
|
2704
|
+
const observer = new ResizeObserver(() => {
|
|
2705
|
+
const to = followerRef.current.onResize(el);
|
|
2706
|
+
if (to !== null) el.scrollTop = to;
|
|
2707
|
+
});
|
|
2708
|
+
for (const child of Array.from(el.children ?? [])) observer.observe(child);
|
|
2709
|
+
return () => observer.disconnect();
|
|
2710
|
+
}, [key, shown, count]);
|
|
2711
|
+
return {
|
|
2712
|
+
ref,
|
|
2713
|
+
unseen,
|
|
2714
|
+
onScroll: (event) => setUnseen(followerRef.current.onScroll(event.currentTarget)),
|
|
2715
|
+
jump: () => {
|
|
2716
|
+
const el = ref.current;
|
|
2717
|
+
if (el !== null && el !== undefined) el.scrollTop = followerRef.current.jump(el);
|
|
2718
|
+
setUnseen(0);
|
|
2719
|
+
},
|
|
2720
|
+
};
|
|
2721
|
+
}
|
|
2722
|
+
|
|
2723
|
+
/** 「↓ N 条新消息」:零高度锚点 + 绝对定位按钮,不进文档流,不改变任何滚动位置。 */
|
|
2724
|
+
function JumpToLatest({ t, unseen, onJump }) {
|
|
2725
|
+
if (!(unseen > 0)) return null;
|
|
2726
|
+
return h('div', { className: 'at-streamjumpanchor' },
|
|
2727
|
+
h('button', { className: 'at-streamjump', type: 'button', onClick: onJump },
|
|
2728
|
+
h(Ico, { name: 'down', size: 12 }), tf(t, 'streamUnseen', { count: unseen })));
|
|
2729
|
+
}
|
|
2730
|
+
|
|
2669
2731
|
function Workbench({ t, ctx }) {
|
|
2670
2732
|
const [phase, setPhase] = React.useState('loading');
|
|
2671
2733
|
const [data, setData] = React.useState(null);
|
|
@@ -2820,42 +2882,18 @@ window.__ModuleLoader__.load({
|
|
|
2820
2882
|
const replyRef = React.useRef(null);
|
|
2821
2883
|
const triggerRef = React.useRef(null);
|
|
2822
2884
|
const mobileRef = React.useRef(null);
|
|
2823
|
-
// #33
|
|
2824
|
-
const streamRef = React.useRef(null);
|
|
2825
|
-
const followerRef = React.useRef(null);
|
|
2826
|
-
if (followerRef.current === null) followerRef.current = createStreamFollower();
|
|
2827
|
-
const [streamUnseen, setStreamUnseen] = React.useState(0);
|
|
2885
|
+
// #33 主对话跟随最新(useFollowLatest / createStreamFollower)。
|
|
2828
2886
|
const streamItems = Array.isArray(data?.stream) ? data.stream : [];
|
|
2829
|
-
const
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
}
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
if (step.scrollTo !== null) el.scrollTop = step.scrollTo;
|
|
2840
|
-
setStreamUnseen(step.unseen);
|
|
2841
|
-
}, [projectId, streamShown, streamItems.length, streamTail]);
|
|
2842
|
-
React.useLayoutEffect(() => {
|
|
2843
|
-
const el = streamRef.current;
|
|
2844
|
-
const inner = el?.firstElementChild;
|
|
2845
|
-
if (!streamShown || inner === null || inner === undefined || typeof ResizeObserver !== 'function') return undefined;
|
|
2846
|
-
const observer = new ResizeObserver(() => {
|
|
2847
|
-
const to = followerRef.current.onResize(el);
|
|
2848
|
-
if (to !== null) el.scrollTop = to;
|
|
2849
|
-
});
|
|
2850
|
-
observer.observe(inner);
|
|
2851
|
-
return () => observer.disconnect();
|
|
2852
|
-
}, [projectId, streamShown, data !== null]);
|
|
2853
|
-
const onStreamScroll = (event) => setStreamUnseen(followerRef.current.onScroll(event.currentTarget));
|
|
2854
|
-
const jumpToLatest = () => {
|
|
2855
|
-
const el = streamRef.current;
|
|
2856
|
-
if (el !== null && el !== undefined) el.scrollTop = followerRef.current.jump(el);
|
|
2857
|
-
setStreamUnseen(0);
|
|
2858
|
-
};
|
|
2887
|
+
const mainFollow = useFollowLatest({
|
|
2888
|
+
key: projectId + '|' + scope + '|' + tab,
|
|
2889
|
+
shown: scope === 'project' && tab === 'main' && data !== null,
|
|
2890
|
+
count: streamItems.length,
|
|
2891
|
+
tail: streamItems.length > 0 ? streamItems[streamItems.length - 1]?.id ?? '' : '',
|
|
2892
|
+
});
|
|
2893
|
+
const streamRef = mainFollow.ref;
|
|
2894
|
+
const streamUnseen = mainFollow.unseen;
|
|
2895
|
+
const onStreamScroll = mainFollow.onScroll;
|
|
2896
|
+
const jumpToLatest = mainFollow.jump;
|
|
2859
2897
|
// R-08 快捷键:composer 聚焦句柄 + `?` 帮助浮层开关。
|
|
2860
2898
|
const composerInputRef = React.useRef(null);
|
|
2861
2899
|
const [shortcutsOpen, setShortcutsOpen] = React.useState(false);
|
|
@@ -4314,12 +4352,7 @@ window.__ModuleLoader__.load({
|
|
|
4314
4352
|
onSetWorkspace: openWorkspaceEditor,
|
|
4315
4353
|
onExample: () => setDraft(t('emptyStreamExample')),
|
|
4316
4354
|
}))),
|
|
4317
|
-
|
|
4318
|
-
streamUnseen > 0
|
|
4319
|
-
? h('div', { className: 'at-streamjumpanchor' },
|
|
4320
|
-
h('button', { className: 'at-streamjump', type: 'button', onClick: jumpToLatest },
|
|
4321
|
-
h(Ico, { name: 'down', size: 12 }), tf(t, 'streamUnseen', { count: streamUnseen })))
|
|
4322
|
-
: null);
|
|
4355
|
+
h(JumpToLatest, { t, unseen: streamUnseen, onJump: jumpToLatest }));
|
|
4323
4356
|
|
|
4324
4357
|
return h('div', { className: 'at-root', role: 'region', 'aria-label': t('panel') },
|
|
4325
4358
|
h('div', { className: 'at-top' },
|
|
@@ -57,6 +57,10 @@ DECODER = os.path.join(os.path.dirname(os.path.abspath(__file__)), "dsh_decode.m
|
|
|
57
57
|
_INTENT_SOURCES = {"", "user", "agent-message", "ai-team"}
|
|
58
58
|
# Label prefix of the AI-team plugin's SkillOpt subagents (subagent/descriptor).
|
|
59
59
|
_ENGINE_LABEL_PREFIX = "skillopt-"
|
|
60
|
+
# A session whose opening request works on the engine's handoff files is engine
|
|
61
|
+
# work too, whoever spawned it: il2c night 8 had the PMO, woken by every answer
|
|
62
|
+
# child, dispatch 23 subagents of its own ("read PROMPTS.md, id …").
|
|
63
|
+
_ENGINE_WORK = re.compile(r"\.skillopt-sleep-handoff")
|
|
60
64
|
_RELAY_PREFIX = re.compile(r"^Agent \S+ sent a message:\s*")
|
|
61
65
|
# AI-team activation prompts start with the member's identity block
|
|
62
66
|
# (``memberIdentity`` in lib/domain/member-profile.js: "你是 <名>(<角色>)。"
|
|
@@ -199,6 +203,8 @@ def digest_dsh_session(path: str, *, node: str, project: str = "") -> Optional[S
|
|
|
199
203
|
if not text or _HOST_NOISE.match(text) or _is_meta_prompt(text):
|
|
200
204
|
continue
|
|
201
205
|
n_user += 1
|
|
206
|
+
if n_user == 1 and _ENGINE_WORK.search(text):
|
|
207
|
+
return None
|
|
202
208
|
user_prompts.append(text)
|
|
203
209
|
feedback.extend(_detect_feedback(text))
|
|
204
210
|
if kind == "ai-team":
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suifei/dsh-ai-team",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.113",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "文渊阁 (Wenyuan Pavilion) — AI Team mode for DeepSeek Harness: concurrent projects, owned tasks, threads, inbox and an append-only team ledger",
|
|
6
6
|
"license": "MIT",
|