An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
{
"ID": "20210612224500-ywcms1m",
"Spec": "2",
"Type": "NodeDocument",
"Properties": {
"id": "20210612224500-ywcms1m",
"title": "内容块属性",
"type": "doc",
"updated": "20261024163828"
},
"Children": [
{
"ID": "20210612224500-ftupo06",
"Type": "NodeHeading",
"HeadingLevel": 2,
"Properties": {
"id": "20210612224500-ftupo06",
"updated": "20261024160716"
},
"Children": [
{
"Type": "NodeText",
"Data": "概述"
}
]
},
{
"ID": "20210613000111-kj7vhlk",
"Type": "NodeParagraph",
"Properties": {
"id": "20210613000111-kj7vhlk",
"updated": "20261024160716"
},
"Children": [
{
"Type": "NodeText",
"Data": "属性以键值对(key-value)的形式保存内容块的附加信息,便于命名、分类和查询。属性分为内置属性和自定义属性。"
}
]
},
{
"ID": "20210613004126-79loyta",
"Type": "NodeHeading",
"HeadingLevel": 2,
"Properties": {
"id": "20210613004126-79loyta",
"updated": "20261024163828"
},
"Children": [
{
"Type": "NodeText",
"Data": "内置属性"
}
]
},
{
"ID": "20210613004249-56e0c6r",
"Type": "NodeTable",
"TableAligns": [
2,
0
],
"Properties": {
"id": "20210613004249-56e0c6r",
"updated": "20261012014859"
},
"Children": [
{
"Type": "NodeTableHead",
"Data": "thead",
"Children": [
{
"Type": "NodeTableRow",
"Data": "tr",
"Children": [
{
"Type": "NodeTableCell",
"Data": "th",
"TableCellAlign": 2,
"Children": [
{
"Type": "NodeText",
"Data": "属性名"
}
]
},
{
"Type": "NodeTableCell",
"Data": "th",
"Children": [
{
"Type": "NodeText",
"Data": "描述"
}
]
}
]
}
]
},
{
"Type": "NodeTableRow",
"Data": "tr",
"Children": [
{
"Type": "NodeTableCell",
"Data": "td",
"TableCellAlign": 2,
"Children": [
{
"Type": "NodeText",
"Data": "name"
}
]
},
{
"Type": "NodeTableCell",
"Data": "td",
"Children": [
{
"Type": "NodeText",
"Data": "内容块的命名"
}
]
}
]
},
{
"Type": "NodeTableRow",
"Data": "tr",
"Children": [
{
"Type": "NodeTableCell",
"Data": "td",
"TableCellAlign": 2,
"Children": [
{
"Type": "NodeText",
"Data": "alias"
}
]
},
{
"Type": "NodeTableCell",
"Data": "td",
"Children": [
{
"Type": "NodeText",
"Data": "内容块的别名"
}
]
}
]
},
{
"Type": "NodeTableRow",
"Data": "tr",
"Children": [
{
"Type": "NodeTableCell",
"Data": "td",
"TableCellAlign": 2,
"Children": [
{
"Type": "NodeText",
"Data": "memo"
}
]
},
{
"Type": "NodeTableCell",
"Data": "td",
"Children": [
{
"Type": "NodeText",
"Data": "内容块的备注"
}
]
}
]
},
{
"Type": "NodeTableRow",
"Data": "tr",
"Children": [
{
"Type": "NodeTableCell",
"Data": "td",
"TableCellAlign": 2,
"Children": [
{
"Type": "NodeText",
"Data": "bookmark"
}
]
},
{
"Type": "NodeTableCell",
"Data": "td",
"Children": [
{
"Type": "NodeText",
"Data": "内容块的书签"
}
]
}
]
}
]
},
{
"ID": "20261012014537-sfcl392",
"Type": "NodeHeading",
"Properties": {
"id": "20261012014537-sfcl392",
"updated": "20261024163828"
},
"Children": [
{
"Type": "NodeText",
"Data": "编辑别名"
}
],
"HeadingLevel": 3
},
{
"ID": "20261012014537-q7fxlnn",
"Type": "NodeParagraph",
"Properties": {
"id": "20261012014537-q7fxlnn",
"updated": "20261024163828"
},
"Children": [
{
"Type": "NodeText",
"Data": "在属性面板中,多个别名分别显示为标签。点击「新增别名」添加,点击已有别名编辑,点击其关闭图标删除。输入时可用英文逗号分隔,批量添加多个别名。"
}
]
},
{
"ID": "20261024163828-n0477b6",
"Type": "NodeParagraph",
"Properties": {
"id": "20261024163828-n0477b6",
"updated": "20261024163828"
},
"Children": [
{
"Type": "NodeText",
"Data": "按 "
},
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
"TextMarkTextContent": "Enter"
},
{
"Type": "NodeText",
"Data": " 或移开输入焦点保存,按 "
},
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
"TextMarkTextContent": "Esc"
},
{
"Type": "NodeText",
"Data": " 取消本次输入。新输入会去除首尾空白、过滤空项和完全相同的重复项。"
}
]
},
{
"ID": "20261024163828-x8bkwsu",
"Type": "NodeParagraph",
"Properties": {
"id": "20261024163828-x8bkwsu",
"updated": "20261024163828"
},
"Children": [
{
"Type": "NodeText",
"Data": "拖动别名可调整顺序,松开后保存;触屏也支持拖动。拖动时按 "
},
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
"TextMarkTextContent": "Esc"
},
{
"Type": "NodeText",
"Data": " 可取消排序。"
}
]
},
{
"ID": "20210613004117-1jnl9m0",
"Type": "NodeHeading",
"HeadingLevel": 2,
"Properties": {
"id": "20210613004117-1jnl9m0",
"updated": "20261024160716"
},
"Children": [
{
"Type": "NodeText",
"Data": "自定义属性"
}
]
},
{
"ID": "20210613004135-7td7u1o",
"Type": "NodeParagraph",
"Properties": {
"id": "20210613004135-7td7u1o",
"updated": "20261024160716"
},
"Children": [
{
"Type": "NodeText",
"Data": "通过 "
},
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
"TextMarkTextContent": "块标菜单"
},
{
"Type": "NodeText",
"Data": " - "
},
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
"TextMarkTextContent": "属性"
},
{
"Type": "NodeText",
"Data": " 设置自定义属性。属性名须以小写英文字母开头,可包含小写英文字母、数字和连字符(-),例如 "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": "doing"
},
{
"Type": "NodeText",
"Data": "、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": "day1"
},
{
"Type": "NodeText",
"Data": "、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": "project-id"
},
{
"Type": "NodeText",
"Data": "。输入的大写字母会自动转为小写。保存后,思源会在属性名前自动添加 "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": "custom-"
},
{
"Type": "NodeText",
"Data": " 前缀,以区别于内置属性。"
}
]
},
{
"ID": "20210613105627-xbzpkz0",
"Type": "NodeHeading",
"HeadingLevel": 2,
"Properties": {
"id": "20210613105627-xbzpkz0",
"updated": "20210613105851"
},
"Children": [
{
"Type": "NodeText",
"Data": "根据属性查询内容块"
}
]
},
{
"ID": "20210613010047-clw1kra",
"Type": "NodeParagraph",
"Properties": {
"id": "20210613010047-clw1kra",
"updated": "20210613102634"
},
"Children": [
{
"Type": "NodeText",
"Data": "例如,当我们为内容块设置了 "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": "progress=30"
},
{
"Type": "NodeText",
"Data": "、 "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": "priority=2"
},
{
"Type": "NodeText",
"Data": " 属性后,则可以通过 SQL 查询出所有进度为 30、优先级为 2 的内容块:"
}
]
},
{
"ID": "20210613012911-qdrxc6w",
"Type": "NodeCodeBlock",
"IsFencedCodeBlock": true,
"Properties": {
"id": "20210613012911-qdrxc6w",
"updated": "20210613105821"
},
"Children": [
{
"Type": "NodeCodeBlockFenceOpenMarker",
"Data": "```"
},
{
"Type": "NodeCodeBlockFenceInfoMarker",
"CodeBlockInfo": "c3Fs"
},
{
"ID": "20220307091943-a9eflzg",
"Type": "NodeCodeBlockCode",
"Data": "SELECT *\nFROM blocks\nWHERE id IN (\n SELECT block_id\n FROM attributes AS a\n WHERE (a.name = 'custom-progress' AND a.value = '30')\n OR (a.name = 'custom-priority' AND a.value = '2')\n GROUP BY block_id\n HAVING count(block_id) = 2\n);\n",
"Properties": {
"id": "20220307091943-a9eflzg"
}
},
{
"Type": "NodeCodeBlockFenceCloseMarker",
"Data": "```"
}
]
}
]
}