基线:鉴权会话+工作组+工作台三区修复+编排工作区+产品设计文档
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
This commit is contained in:
@@ -8,6 +8,7 @@ import { TemplateRejectedError } from '../../contract.ts';
|
||||
import type { Audience, Clock, HumanEventPublisher, IdGenerator, InteractionStore, MemoryRecorder } from '../../port.ts';
|
||||
import type { InteractionPhase } from '../domain/control-handover.ts';
|
||||
import { checkTemplate, outputControl } from '../domain/control-handover.ts';
|
||||
import { projectChat } from '../domain/chat-projection.ts';
|
||||
|
||||
export type InteractionServiceDeps = {
|
||||
readonly store: InteractionStore;
|
||||
@@ -35,8 +36,16 @@ export function createInteractionService(deps: InteractionServiceDeps): Interact
|
||||
}
|
||||
|
||||
return {
|
||||
/**
|
||||
* 对话流 = 已落库的消息(人的话)+ 任务记忆的叙事投影(AI 发言 / 系统事件),按时间全序。
|
||||
* AI 与系统**不另设写入口** —— 同源不同筛选,对话区与工作日志永远说同一件事。
|
||||
*/
|
||||
async timeline(taskId) {
|
||||
return deps.store.listMessages(taskId);
|
||||
const [stored, entries] = await Promise.all([
|
||||
deps.store.listMessages(taskId),
|
||||
deps.memory.history(taskId),
|
||||
]);
|
||||
return [...stored, ...projectChat(entries)].sort((a, b) => (a.at < b.at ? -1 : a.at > b.at ? 1 : 0));
|
||||
},
|
||||
|
||||
/** 负责人的自由输入 —— 人事件的第二形态;写入任务记忆,不驱动 flow 步 */
|
||||
|
||||
Reference in New Issue
Block a user