memory-likehuman-pro - v1.5.0
    Preparing search index...

    Function upsertNode

    • 插入或更新节点(按名称匹配)。合并 content、description 和 source_sessions。返回节点和是否新建。

      Parameters

      • db: DatabaseSyncInstance
      • c: {
            category:
                | "profile"
                | "preferences"
                | "entities"
                | "events"
                | "tasks"
                | "skills"
                | "cases"
                | "patterns";
            content: string;
            description: string;
            name: string;
            scopeAgent?: string;
            scopeSession?: string;
            scopeWorkspace?: string;
            source: "user"
            | "assistant";
            temporalType?: "static" | "dynamic";
            type: GraphNodeType;
        }
      • sessionId: string

      Returns { isNew: boolean; node: BmNode }