Integrate master agent runtime orchestration updates
This commit is contained in:
@@ -39,6 +39,40 @@ test("MemoryResolver 在 master-agent 会话下优先挑当前请求命中的项
|
||||
assert.equal(resolved.projectMemories[0]?.projectId, "boss-console");
|
||||
});
|
||||
|
||||
test("MemoryResolver 会按请求里的自然语言关键词命中更相关的项目记忆", () => {
|
||||
const resolved = resolveRelevantMemoriesForTesting({
|
||||
projectId: "master-agent",
|
||||
requestText: "继续推进 boss 项目的会话归档逻辑",
|
||||
memories: [
|
||||
{
|
||||
memoryId: "m1",
|
||||
scope: "project",
|
||||
projectId: "boss-console",
|
||||
title: "boss 项目进度",
|
||||
content: "boss 项目当前按项目聚合加线程下钻展示。",
|
||||
tags: ["boss", "会话"],
|
||||
memoryType: "project_progress",
|
||||
createdAt: "2026-01-01T00:00:00.000Z",
|
||||
updatedAt: "2026-01-01T00:00:00.000Z",
|
||||
},
|
||||
{
|
||||
memoryId: "m2",
|
||||
scope: "project",
|
||||
projectId: "project-wenshenapp",
|
||||
title: "wenshenapp 项目进度",
|
||||
content: "wenshenapp 当前只有一个主线程。",
|
||||
tags: ["wenshenapp"],
|
||||
memoryType: "project_progress",
|
||||
createdAt: "2026-01-02T00:00:00.000Z",
|
||||
updatedAt: "2026-01-02T00:00:00.000Z",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
assert.equal(resolved.projectMemories.length, 1);
|
||||
assert.equal(resolved.projectMemories[0]?.projectId, "boss-console");
|
||||
});
|
||||
|
||||
test("MemoryResolver 会保留全局记忆的输入顺序并只截断到 8 条", () => {
|
||||
const resolved = resolveRelevantMemoriesForTesting({
|
||||
projectId: "master-agent",
|
||||
@@ -115,6 +149,40 @@ test("Runtime MemoryResolver 会优先排布 workflow_rule 和 user_preference
|
||||
);
|
||||
});
|
||||
|
||||
test("Runtime MemoryResolver 也会按自然语言关键词优先挑中更相关的项目记忆", () => {
|
||||
const resolved = resolveRuntimeRelevantMemoriesForTesting({
|
||||
projectId: "master-agent",
|
||||
requestText: "继续推进 boss 项目的会话归档逻辑",
|
||||
memories: [
|
||||
{
|
||||
memoryId: "m2",
|
||||
scope: "project",
|
||||
projectId: "project-wenshenapp",
|
||||
title: "wenshenapp 项目进度",
|
||||
content: "wenshenapp 当前只有一个主线程。",
|
||||
tags: ["wenshenapp"],
|
||||
memoryType: "project_progress",
|
||||
createdAt: "2026-01-02T00:00:00.000Z",
|
||||
updatedAt: "2026-01-02T00:00:00.000Z",
|
||||
},
|
||||
{
|
||||
memoryId: "m1",
|
||||
scope: "project",
|
||||
projectId: "boss-console",
|
||||
title: "boss 项目进度",
|
||||
content: "boss 项目当前按项目聚合加线程下钻展示。",
|
||||
tags: ["boss", "会话"],
|
||||
memoryType: "project_progress",
|
||||
createdAt: "2026-01-01T00:00:00.000Z",
|
||||
updatedAt: "2026-01-01T00:00:00.000Z",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
assert.equal(resolved.projectMemories.length, 1);
|
||||
assert.equal(resolved.projectMemories[0]?.projectId, "boss-console");
|
||||
});
|
||||
|
||||
test("Runtime MemoryResolver 在 master-agent 非空请求但无 lexical 命中时回退到前 6 个项目记忆", () => {
|
||||
const resolved = resolveRuntimeRelevantMemoriesForTesting({
|
||||
projectId: "master-agent",
|
||||
|
||||
Reference in New Issue
Block a user