+
+
主 Agent 提示词
+
+ 管理员全局主提示词不可被覆盖;用户提示词和当前对话提示词只会追加在后面。
+
+
+
+
+
+
+
管理员全局主提示词
+
系统级规则,仅管理员可编辑。
+
+
+ 不可覆盖
+
+
+
+
+
+
+
+
我的主提示词
+
只影响当前用户自己的主 Agent 长期偏好。
+
+
+
+
+
+
+
+
+
+
+
当前对话附加提示词
+
只作用于 master-agent 当前对话。
+
+
+ 当前对话
+
+
+
+
+
+
+
+
+
+
+
+
新增记忆
+
+ 支持自动沉淀后的手动增补、编辑和归档。项目记忆默认绑定到当前项目。
+
+
+
+
+
+
+ {newMemory.scope === "project" ? (
+
setNewMemory((current) => ({ ...current, projectId: value }))}
+ placeholder="例如 master-agent"
+ />
+ ) : null}
+ setNewMemory((current) => ({ ...current, title: value }))}
+ placeholder="例如:项目进度"
+ />
+
+
+
+
+
项目记忆
+
当前 master-agent 项目相关记忆。
+ {projectMemories.length === 0 ? (
+
暂无项目记忆。
+ ) : null}
+
+ {projectMemories.map((memory) => {
+ const draft = memoryDrafts[memory.memoryId] ?? draftFromMemory(memory);
+ return (
+
+
+
+
{memory.title}
+
+ {memoryScopeLabel(memory.scope)} · {memoryTypeLabel(memory.memoryType)}
+ {memory.projectId ? ` · ${memory.projectId}` : ""}
+
+
+
+ {memory.archived ? "已归档" : formatTimestampLabel(memory.updatedAt)}
+
+
+
+
+ updateMemoryDraft(memory.memoryId, (current) => ({ ...current, title: value }))
+ }
+ placeholder="记忆标题"
+ />
+
+
+ );
+ })}
+
+
+
+
+
通用记忆
+
当前用户自己的长期偏好与稳定约束。
+ {globalMemories.length === 0 ? (
+
暂无通用记忆。
+ ) : null}
+
+ {globalMemories.map((memory) => {
+ const draft = memoryDrafts[memory.memoryId] ?? draftFromMemory(memory);
+ return (
+
+
+
+
{memory.title}
+
+ {memoryScopeLabel(memory.scope)} · {memoryTypeLabel(memory.memoryType)}
+
+
+
+ {memory.archived ? "已归档" : formatTimestampLabel(memory.updatedAt)}
+
+
+
+
+ updateMemoryDraft(memory.memoryId, (current) => ({ ...current, title: value }))
+ }
+ placeholder="记忆标题"
+ />
+
+
+ );
+ })}
+
+
+
+ {message ? (
+
{message}
+ ) : null}
+
+ );
+}
diff --git a/src/lib/boss-data.ts b/src/lib/boss-data.ts
index ed6e852..9c6c573 100644
--- a/src/lib/boss-data.ts
+++ b/src/lib/boss-data.ts
@@ -218,6 +218,44 @@ export interface UserAttachmentStorageConfig {
validatedAt?: string;
}
+export interface MasterAgentPromptPolicy {
+ globalPrompt: string;
+ updatedAt: string;
+ updatedBy?: string;
+}
+
+export interface UserMasterPrompt {
+ account: string;
+ content: string;
+ updatedAt: string;
+}
+
+export type MasterMemoryScope = "global" | "project";
+export type MasterMemoryType =
+ | "user_preference"
+ | "project_progress"
+ | "decision"
+ | "risk"
+ | "blocking_issue"
+ | "research_note"
+ | "workflow_rule";
+
+export interface MasterAgentMemory {
+ memoryId: string;
+ account: string;
+ scope: MasterMemoryScope;
+ projectId?: string;
+ title: string;
+ content: string;
+ memoryType: MasterMemoryType;
+ tags: string[];
+ sourceMessageId?: string;
+ createdAt: string;
+ updatedAt: string;
+ lastUsedAt?: string;
+ archived: boolean;
+}
+
export interface GoalItem {
id: string;
text: string;
@@ -328,6 +366,7 @@ function buildCollaborationGate(project: Pick