@suifei/dsh-ai-team 0.4.89 → 0.4.91
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 +61 -0
- package/index.js +107 -49
- package/lib/diaglog.js +145 -143
- package/lib/host/member-tools.js +317 -307
- package/lib/host/service.js +5 -0
- package/lib/host/waker.js +371 -359
- package/lib/ledger/fold.js +60 -4
- package/lib/runtime/host-agent.js +39 -61
- package/package.json +1 -1
package/lib/host/service.js
CHANGED
|
@@ -681,11 +681,16 @@ export class TeamService {
|
|
|
681
681
|
// 并发下还会重复——曾造成 API 返回值与投影不一致)。
|
|
682
682
|
// kind 必须反映真实作者:`human_message` 是 Waker 判定「Human 下了指令」的
|
|
683
683
|
// 唯一依据(会触发建卡唤醒),agent 发言若也标成它,等于让 agent 冒充 Human。
|
|
684
|
+
// taskIds:PMO 在主对话里附上的任务卡(界面就地渲染);只收本项目真实存在的卡。
|
|
685
|
+
const taskIds = Array.isArray(payload.taskIds)
|
|
686
|
+
? [...new Set(payload.taskIds.filter((id) => typeof id === 'string' && Object.hasOwn(this.state.tasks ?? {}, id)))]
|
|
687
|
+
: [];
|
|
684
688
|
const entry = {
|
|
685
689
|
kind: command.actor.kind === 'human' ? 'human_message' : 'milestone',
|
|
686
690
|
authorId: author.id,
|
|
687
691
|
body,
|
|
688
692
|
at: this.now(),
|
|
693
|
+
...(taskIds.length > 0 ? { taskIds } : {}),
|
|
689
694
|
};
|
|
690
695
|
const event = await this.ledger.append({
|
|
691
696
|
type: 'stream/posted',
|