An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:memo: Improve MCP and secrets user guides https://github.com/siyuan-note/siyuan/issues/18548
Daniel6e3af1453f80
diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.syindex 67eca57114..ec8fb37517 100644--- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy+++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy@@ -7,7 +7,7 @@"id": "20200924100950-9op5xi1","title": "Shortcuts","type": "doc",- "updated": "20260803171606"+ "updated": "20260804230000"},"Children": [{@@ -3754,7 +3754,7 @@"HeadingLevel": 2,"Properties": {"id": "20210106154056-koo4wdj",- "updated": "20260803171606"+ "updated": "20260804230000"},"Children": [{@@ -3773,7 +3773,7 @@"HeadingLevel": 3,"Properties": {"id": "20210106154319-v9tt3e2",- "updated": "20260803171606"+ "updated": "20260804230000"},"Children": [{@@ -3793,7 +3793,7 @@"Properties": {"colgroup": "||","id": "20240112150534-wiik5sl",- "updated": "20260803171606"+ "updated": "20260804230000"},"Children": [{@@ -3844,7 +3844,7 @@"Children": [{"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "Focus breadcrumb"}]},{"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": ""}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "Alt"}, {"Type": "NodeText", "Data": "+"}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "Shift"}, {"Type": "NodeText", "Data": "+"}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "B"}, {"Type": "NodeText", "Data": "/ "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "⌥⇧B"}, {"Type": "NodeText", "Data": ""}]},- {"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "After focusing, use ← / → to move between breadcrumbs, ↓ / Enter to open the child block menu, and Esc to return to the editor"}]}+ {"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "After focusing, use "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "←"}, {"Type": "NodeText", "Data": " / "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "→"}, {"Type": "NodeText", "Data": " to move between breadcrumbs, "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "↓"}, {"Type": "NodeText", "Data": " / "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "Enter"}, {"Type": "NodeText", "Data": " to open the child block menu, and "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "Esc"}, {"Type": "NodeText", "Data": " to return to the editor"}]}]},{diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20201227201751-gv0fpx2.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20201227201751-gv0fpx2.syindex b6aedd5c2a..dcc571b08e 100644--- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20201227201751-gv0fpx2.sy+++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20201227201751-gv0fpx2.sy@@ -6,7 +6,7 @@"id": "20201227201751-gv0fpx2","title": "Kernel API","type": "doc",- "updated": "20230820185847"+ "updated": "20260804230000"},"Children": [{@@ -22,6 +22,31 @@"Data": "Please refer to API Doc (github repo: siyuan-note/siyuan)."}]+ },+ {+ "ID": "20260804225002-apien01",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20260804225002-apien01",+ "updated": "20260804230000"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "SiYuan also provides tools to external clients through MCP. For connection and permission details, see "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "block-ref",+ "TextMarkBlockRefID": "20260804223002-mcpsv03",+ "TextMarkBlockRefSubtype": "s",+ "TextMarkTextContent": "MCP Service"+ },+ {+ "Type": "NodeText",+ "Data": "."+ }+ ]}]-}\ No newline at end of file+}diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20221223221636-ms2b4w9.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20221223221636-ms2b4w9.syindex e9dd658a55..b47354a3b3 100644--- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20221223221636-ms2b4w9.sy+++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20221223221636-ms2b4w9.sy@@ -7,7 +7,7 @@"id": "20221223221636-ms2b4w9","title": "Flashcards","type": "doc",- "updated": "20260803171606"+ "updated": "20260804230000"},"Children": [{@@ -263,7 +263,7 @@"HeadingLevel": 3,"Properties": {"id": "20260614194307-emze915",- "updated": "20260614194307"+ "updated": "20260804230000"},"Children": [{@@ -414,12 +414,30 @@"Type": "NodeParagraph","Properties": {"id": "20260614194307-b74gu9u",- "updated": "20260614194307"+ "updated": "20260804230000"},"Children": [{"Type": "NodeText",- "Data": "During review, the interface displays pending cards one by one. Each card first shows the question side. Click \"Show Answer\" or press Space/Enter to reveal the answer side, then rate your recall:"+ "Data": "During review, the interface displays pending cards one by one. Each card first shows the question side. Click \"Show Answer\" or press "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "Space"+ },+ {+ "Type": "NodeText",+ "Data": " / "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "Enter"+ },+ {+ "Type": "NodeText",+ "Data": " to reveal the answer side, then rate your recall:"}]},@@ -738,12 +756,30 @@"Type": "NodeParagraph","Properties": {"id": "20260614194307-s247j6d",- "updated": "20260614194307"+ "updated": "20260804230000"},"Children": [{"Type": "NodeText",- "Data": "After revealing the answer, Space and Enter also trigger the \"Good\" rating. Ratings directly affect the review interval for each card — higher ratings extend the time before the next review, and lower ratings shorten it. The system uses the FSRS algorithm to automatically optimize each user's review schedule based on their rating history."+ "Data": "After revealing the answer, "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "Space"+ },+ {+ "Type": "NodeText",+ "Data": " and "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "Enter"+ },+ {+ "Type": "NodeText",+ "Data": " also trigger the \"Good\" rating. Ratings directly affect the review interval for each card — higher ratings extend the time before the next review, and lower ratings shorten it. The system uses the FSRS algorithm to automatically optimize each user's review schedule based on their rating history."}]},@@ -999,4 +1035,4 @@]}]-}\ No newline at end of file+}diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20230304000547-ibldj1z/20260804171004-aiagt03.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20230304000547-ibldj1z/20260804171004-aiagt03.syindex ab23a48071..b2c1ec8328 100644--- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20230304000547-ibldj1z/20260804171004-aiagt03.sy+++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20230304000547-ibldj1z/20260804171004-aiagt03.sy@@ -6,7 +6,7 @@"id": "20260804171004-aiagt03","title": "AI Agent","type": "doc",- "updated": "20260804205607"+ "updated": "20260804230000"},"Children": [{@@ -726,7 +726,7 @@"HeadingLevel": 2,"Properties": {"id": "20260804170054-1c4wqjk",- "updated": "20260804180000"+ "updated": "20260804230000"},"Children": [{@@ -740,7 +740,7 @@"Type": "NodeParagraph","Properties": {"id": "20260804170055-xr887qs",- "updated": "20260804180000"+ "updated": "20260804230000"},"Children": [{@@ -773,6 +773,21 @@{"Type": "NodeText","Data": ", configure commands, arguments, URLs, HTTP headers, and timeouts, and review connection status and tool count."+ },+ {+ "Type": "NodeText",+ "Data": " This setting is for external MCP services called by the agent. To connect an external MCP client to SiYuan, see "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "block-ref",+ "TextMarkBlockRefID": "20260804223002-mcpsv03",+ "TextMarkBlockRefSubtype": "s",+ "TextMarkTextContent": "MCP Service"+ },+ {+ "Type": "NodeText",+ "Data": "."}]},@@ -781,7 +796,7 @@"Type": "NodeParagraph","Properties": {"id": "20260804170056-8tp1qi0",- "updated": "20260804180000"+ "updated": "20260804230000"},"Children": [{@@ -802,6 +817,17 @@"TextMarkType": "kbd","TextMarkTextContent": "Secrets and Variables"},+ {+ "Type": "NodeText",+ "Data": ". For details, see "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "block-ref",+ "TextMarkBlockRefID": "20260804224002-secvr03",+ "TextMarkBlockRefSubtype": "s",+ "TextMarkTextContent": "Secrets and Variables"+ },{"Type": "NodeText","Data": ". External MCP tools may send local data, change external systems, or incur charges; review the effects shown on confirmation cards."diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20260804223002-mcpsv03.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20260804223002-mcpsv03.synew file mode 100644index 0000000000..82a0ad70ab--- /dev/null+++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20260804223002-mcpsv03.sy@@ -0,0 +1,26 @@+{+ "ID": "20260804223002-mcpsv03",+ "Spec": "2",+ "Type": "NodeDocument",+ "Properties": {+ "id": "20260804223002-mcpsv03",+ "title": "MCP Service",+ "type": "doc",+ "updated": "20260804230000"+ },+ "Children": [+ {"ID": "20260804223101-mcpen01", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804223101-mcpen01", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "Overview"}]},+ {"ID": "20260804223102-mcpen02", "Type": "NodeParagraph", "Properties": {"id": "20260804223102-mcpen02", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "SiYuan includes an MCP server that lets external MCP clients discover and call SiYuan tools to search, read, and operate on the current workspace. This is the opposite direction from the external MCP services configured for the AI agent: external clients connect to the former, while the SiYuan agent connects to the latter."}]},+ {"ID": "20260804223103-mcpen03", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804223103-mcpen03", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "Connect to the service"}]},+ {"ID": "20260804223104-mcpen04", "Type": "NodeParagraph", "Properties": {"id": "20260804223104-mcpen04", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "Make sure SiYuan is running and the MCP client can reach its network address. The service uses Streamable HTTP at the fixed endpoint "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "/mcp"}, {"Type": "NodeText", "Data": ". The default local address is usually "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "http://127.0.0.1:6806/mcp"}, {"Type": "NodeText", "Data": ". For a remote connection, replace the host and port with the reachable SiYuan address."}]},+ {"ID": "20260804223105-mcpen05", "Type": "NodeParagraph", "Properties": {"id": "20260804223105-mcpen05", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "View or set the API token in "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "Settings"}, {"Type": "NodeText", "Data": " - "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "Authentication"}, {"Type": "NodeText", "Data": " - "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "API token"}, {"Type": "NodeText", "Data": ", then set "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "Authorization: Token {Your API Token}"}, {"Type": "NodeText", "Data": " in the client request headers."}]},+ {"ID": "20260804223106-mcpen06", "Type": "NodeCodeBlock", "IsFencedCodeBlock": true, "CodeBlockFenceChar": 96, "CodeBlockFenceLen": 3, "CodeBlockOpenFence": "YGBg", "CodeBlockInfo": "anNvbg==", "CodeBlockCloseFence": "YGBg", "Properties": {"id": "20260804223106-mcpen06", "updated": "20260804230000"}, "Children": [{"Type": "NodeCodeBlockFenceOpenMarker", "Data": "```", "CodeBlockFenceLen": 3}, {"Type": "NodeCodeBlockFenceInfoMarker", "CodeBlockInfo": "anNvbg=="}, {"Type": "NodeCodeBlockCode", "Data": "{\n \"mcpServers\": {\n \"siyuan\": {\n \"url\": \"http://127.0.0.1:6806/mcp\",\n \"headers\": {\n \"Authorization\": \"Token {Your API Token}\"\n }\n }\n }\n}\n"}, {"Type": "NodeCodeBlockFenceCloseMarker", "Data": "```", "CodeBlockFenceLen": 3}]},+ {"ID": "20260804223107-mcpen07", "Type": "NodeParagraph", "Properties": {"id": "20260804223107-mcpen07", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "This is a generic configuration example. Configuration file locations and field names vary among MCP clients, so follow the client documentation. The essential settings are the Streamable HTTP URL and the authentication header."}]},+ {"ID": "20260804223108-mcpen08", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804223108-mcpen08", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "Tool capabilities"}]},+ {"ID": "20260804223109-mcpen09", "Type": "NodeParagraph", "Properties": {"id": "20260804223109-mcpen09", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "After connecting, the client dynamically discovers the available tools. Built-in tools cover search, documents, blocks, notebooks, databases, assets, history, import and export, synchronization, and more. The tool set may vary with the SiYuan version and runtime environment, so use the result discovered by the client."}]},+ {"ID": "20260804223110-mcpen10", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804223110-mcpen10", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "Permissions and security"}]},+ {"ID": "20260804223111-mcpen11", "Type": "NodeParagraph", "Properties": {"id": "20260804223111-mcpen11", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "The MCP endpoint only accepts authenticated administrator access. The API token represents administrator access to the workspace. A connected client can read data and may modify or delete data, access workspace files, execute SQL, or trigger synchronization, so only connect trusted clients."}]},+ {"ID": "20260804223112-mcpen12", "Type": "NodeParagraph", "Properties": {"id": "20260804223112-mcpen12", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "Read-only mode rejects MCP POST and DELETE requests, so tools cannot be used normally. Do not expose the SiYuan service port directly to an untrusted network. For remote access, use HTTPS, a reverse proxy, or a firewall, and replace the token immediately if it is exposed."}]},+ {"ID": "20260804223113-mcpen13", "Type": "NodeParagraph", "Properties": {"id": "20260804223113-mcpen13", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "To operate SiYuan directly through HTTP endpoints, see "}, {"Type": "NodeTextMark", "TextMarkType": "block-ref", "TextMarkBlockRefID": "20201227201751-gv0fpx2", "TextMarkBlockRefSubtype": "s", "TextMarkTextContent": "Kernel API"}, {"Type": "NodeText", "Data": ". To configure external MCP services for the SiYuan AI agent, see "}, {"Type": "NodeTextMark", "TextMarkType": "block-ref", "TextMarkBlockRefID": "20260804171004-aiagt03", "TextMarkBlockRefSubtype": "s", "TextMarkTextContent": "AI Agent"}, {"Type": "NodeText", "Data": "."}]}+ ]+}diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20260804224002-secvr03.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20260804224002-secvr03.synew file mode 100644index 0000000000..94e64ee2cd--- /dev/null+++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20260804224002-secvr03.sy@@ -0,0 +1,27 @@+{+ "ID": "20260804224002-secvr03",+ "Spec": "2",+ "Type": "NodeDocument",+ "Properties": {+ "id": "20260804224002-secvr03",+ "title": "Secrets and Variables",+ "type": "doc",+ "updated": "20260804230000"+ },+ "Children": [+ {"ID": "20260804224101-secen01", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804224101-secen01", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "Overview"}]},+ {"ID": "20260804224102-secen02", "Type": "NodeParagraph", "Properties": {"id": "20260804224102-secen02", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "Secrets and variables centrally manage reusable values for skills, MCP services, agent tools, and plugins. Secrets are intended for sensitive data such as passwords and API tokens. Their values are encrypted at rest and do not enter AI conversations. Variables are intended for addresses, names, and other non-sensitive parameters. Their values are stored in plain text and may enter AI conversations."}]},+ {"ID": "20260804224103-secen03", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804224103-secen03", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "Configuration"}]},+ {"ID": "20260804224104-secen04", "Type": "NodeParagraph", "Properties": {"id": "20260804224104-secen04", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "Add, edit, or delete secrets and variables in "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "Settings"}, {"Type": "NodeText", "Data": " - "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "Secrets and Variables"}, {"Type": "NodeText", "Data": ". Each item has a name and a value. For compatibility with every reference form, use ASCII letters, digits, and underscores in names, and do not start a name with a digit."}]},+ {"ID": "20260804224105-secen05", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804224105-secen05", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "Reference forms"}]},+ {"ID": "20260804224106-secen06", "Type": "NodeParagraph", "Properties": {"id": "20260804224106-secen06", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "Use the shorthand "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "$NAME"}, {"Type": "NodeText", "Data": " or "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "${NAME}"}, {"Type": "NodeText", "Data": ", or use the namespaced forms "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "{{secrets.NAME}}"}, {"Type": "NodeText", "Data": " and "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "{{vars.NAME}}"}, {"Type": "NodeText", "Data": ". Namespaced forms are unambiguous and are recommended in shared configurations and skills."}]},+ {"ID": "20260804224107-secen07", "Type": "NodeParagraph", "Properties": {"id": "20260804224107-secen07", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "If a secret and variable have the same name, shorthand references resolve to the secret first where both stores are supported. Namespaced references select the intended store explicitly. If a name is not found, the placeholder remains unchanged so missing configuration is visible."}]},+ {"ID": "20260804224108-secen08", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804224108-secen08", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "Examples"}]},+ {"ID": "20260804224109-secen09", "Type": "NodeParagraph", "Properties": {"id": "20260804224109-secen09", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "For example, after adding a secret named "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "API_TOKEN"}, {"Type": "NodeText", "Data": " and a variable named "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "WORKSPACE"}, {"Type": "NodeText", "Data": ", reference them in the HTTP headers of an agent MCP service as follows:"}]},+ {"ID": "20260804224110-secen10", "Type": "NodeCodeBlock", "IsFencedCodeBlock": true, "CodeBlockFenceChar": 96, "CodeBlockFenceLen": 3, "CodeBlockOpenFence": "YGBg", "CodeBlockInfo": "anNvbg==", "CodeBlockCloseFence": "YGBg", "Properties": {"id": "20260804224110-secen10", "updated": "20260804230000"}, "Children": [{"Type": "NodeCodeBlockFenceOpenMarker", "Data": "```", "CodeBlockFenceLen": 3}, {"Type": "NodeCodeBlockFenceInfoMarker", "CodeBlockInfo": "anNvbg=="}, {"Type": "NodeCodeBlockCode", "Data": "{\n \"Authorization\": \"Bearer {{secrets.API_TOKEN}}\",\n \"X-Workspace\": \"{{vars.WORKSPACE}}\"\n}\n"}, {"Type": "NodeCodeBlockFenceCloseMarker", "Data": "```", "CodeBlockFenceLen": 3}]},+ {"ID": "20260804224111-secen11", "Type": "NodeParagraph", "Properties": {"id": "20260804224111-secen11", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "The agent's built-in HTTP request tool also resolves secrets and variables in URLs, HTTP headers, and request bodies. For example, a URL can be written as "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "{{vars.API_BASE}}/v1/items"}, {"Type": "NodeText", "Data": ". Skill bodies and chat messages can use variables. Secret placeholders are not expanded in AI conversations; they are resolved only when a supported tool or MCP configuration sends the request."}]},+ {"ID": "20260804224112-secen12", "Type": "NodeParagraph", "Properties": {"id": "20260804224112-secen12", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "Plugins can also read or resolve secrets and variables through APIs. Verify a plugin's source and permissions before installation because a plugin with secret access can obtain plaintext values at runtime."}]},+ {"ID": "20260804224113-secen13", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804224113-secen13", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "Security recommendations"}]},+ {"ID": "20260804224114-secen14", "Type": "NodeParagraph", "Properties": {"id": "20260804224114-secen14", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "Do not store passwords, access tokens, or private keys as variables, and do not write sensitive values directly in chat messages, skill bodies, or ordinary configuration. After deleting or replacing a secret, review the skills, MCP services, and plugin configurations that use it. For how the agent uses these settings, see "}, {"Type": "NodeTextMark", "TextMarkType": "block-ref", "TextMarkBlockRefID": "20260804171004-aiagt03", "TextMarkBlockRefSubtype": "s", "TextMarkTextContent": "AI Agent"}, {"Type": "NodeText", "Data": "."}]}+ ]+}diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.syindex 57c13e202b..d3010fea41 100644--- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy+++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy@@ -7,7 +7,7 @@"id": "20200813004551-gm0pbn1","title": "快捷键","type": "doc",- "updated": "20260803171606"+ "updated": "20260804230000"},"Children": [{@@ -3752,7 +3752,7 @@"HeadingLevel": 2,"Properties": {"id": "20201227133317-rkh4bji",- "updated": "20260803171606"+ "updated": "20260804230000"},"Children": [{@@ -3767,7 +3767,7 @@"HeadingLevel": 3,"Properties": {"id": "20201227133317-kazyttz",- "updated": "20260803171606"+ "updated": "20260804230000"},"Children": [{@@ -3791,7 +3791,7 @@"Properties": {"colgroup": "||","id": "20201227133317-vopotjc",- "updated": "20260803171606"+ "updated": "20260804230000"},"Children": [{@@ -3842,7 +3842,7 @@"Children": [{"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "聚焦面包屑"}]},{"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": ""}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "Alt"}, {"Type": "NodeText", "Data": "+"}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "Shift"}, {"Type": "NodeText", "Data": "+"}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "B"}, {"Type": "NodeText", "Data": "/ "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "⌥⇧B"}, {"Type": "NodeText", "Data": ""}]},- {"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "聚焦后使用 ← / → 切换面包屑,使用 ↓ / Enter 打开下级块菜单,使用 Esc 返回编辑器"}]}+ {"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "聚焦后使用 "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "←"}, {"Type": "NodeText", "Data": " / "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "→"}, {"Type": "NodeText", "Data": " 切换面包屑,使用 "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "↓"}, {"Type": "NodeText", "Data": " / "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "回车"}, {"Type": "NodeText", "Data": " 打开下级块菜单,使用 "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "Esc"}, {"Type": "NodeText", "Data": " 返回编辑器"}]}]},{diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20201227194925-7ipoiv6.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20201227194925-7ipoiv6.syindex adc5775364..6d9b26c5b0 100644--- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20201227194925-7ipoiv6.sy+++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20201227194925-7ipoiv6.sy@@ -6,7 +6,7 @@"id": "20201227194925-7ipoiv6","title": "内核 API","type": "doc",- "updated": "20230820185829"+ "updated": "20260804230000"},"Children": [{@@ -22,6 +22,31 @@"Data": "请浏览 API 文档 (github repo: siyuan-note/siyuan)。"}]+ },+ {+ "ID": "20260804225001-apicn01",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20260804225001-apicn01",+ "updated": "20260804230000"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "思源还通过 MCP 向外部客户端提供工具,连接方式和权限说明请参阅 "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "block-ref",+ "TextMarkBlockRefID": "20260804223000-mcpsv01",+ "TextMarkBlockRefSubtype": "s",+ "TextMarkTextContent": "MCP 服务"+ },+ {+ "Type": "NodeText",+ "Data": "。"+ }+ ]}]-}\ No newline at end of file+}diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20221223215557-o6gfsoy.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20221223215557-o6gfsoy.syindex c9362d438e..ba32646b4e 100644--- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20221223215557-o6gfsoy.sy+++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20221223215557-o6gfsoy.sy@@ -7,7 +7,7 @@"id": "20221223215557-o6gfsoy","title": "闪卡","type": "doc",- "updated": "20260803163440"+ "updated": "20260804230000"},"Children": [{@@ -267,7 +267,7 @@"HeadingLevel": 3,"Properties": {"id": "20260614194151-6msabwl",- "updated": "20260614194151"+ "updated": "20260804230000"},"Children": [{@@ -418,12 +418,30 @@"Type": "NodeParagraph","Properties": {"id": "20260614194151-0bh9rx5",- "updated": "20260614194151"+ "updated": "20260804230000"},"Children": [{"Type": "NodeText",- "Data": "进入复习后,界面会逐张展示待复习的卡片。每张卡片先展示问题面,点击「显示答案」或按空格/回车展示答案面,然后根据自己的掌握程度选择评级:"+ "Data": "进入复习后,界面会逐张展示待复习的卡片。每张卡片先展示问题面,点击「显示答案」或按 "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "空格"+ },+ {+ "Type": "NodeText",+ "Data": " / "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "回车"+ },+ {+ "Type": "NodeText",+ "Data": " 展示答案面,然后根据自己的掌握程度选择评级:"}]},@@ -742,12 +760,30 @@"Type": "NodeParagraph","Properties": {"id": "20260614194151-gu6khf3",- "updated": "20260614194151"+ "updated": "20260804230000"},"Children": [{"Type": "NodeText",- "Data": "展示答案后,空格和回车也可直接触发「良好」评级。评级直接影响卡片的复习间隔——高评级延长下次复习时间,低评级缩短下次复习时间。系统使用 FSRS 算法根据历史评级数据自动优化每个人的复习安排。"+ "Data": "展示答案后,"+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "空格"+ },+ {+ "Type": "NodeText",+ "Data": " 和 "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "回车"+ },+ {+ "Type": "NodeText",+ "Data": " 也可直接触发「良好」评级。评级直接影响卡片的复习间隔——高评级延长下次复习时间,低评级缩短下次复习时间。系统使用 FSRS 算法根据历史评级数据自动优化每个人的复习安排。"}]},@@ -1003,4 +1039,4 @@]}]-}\ No newline at end of file+}diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20230303235619-ex5l63e/20260804171000-aiagt01.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20230303235619-ex5l63e/20260804171000-aiagt01.syindex 38f003f3ea..b9fadd9408 100644--- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20230303235619-ex5l63e/20260804171000-aiagt01.sy+++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20230303235619-ex5l63e/20260804171000-aiagt01.sy@@ -6,7 +6,7 @@"id": "20260804171000-aiagt01","title": "AI 智能体","type": "doc",- "updated": "20260804205607"+ "updated": "20260804230000"},"Children": [{@@ -389,7 +389,7 @@"HeadingLevel": 3,"Properties": {"id": "20260804170039-6hkjcgx",- "updated": "20260804180000"+ "updated": "20260804230000"},"Children": [{@@ -403,7 +403,7 @@"Type": "NodeParagraph","Properties": {"id": "20260804170040-qf65tjk",- "updated": "20260804180000"+ "updated": "20260804230000"},"Children": [{@@ -413,7 +413,7 @@{"Type": "NodeTextMark","TextMarkType": "kbd",- "TextMarkTextContent": "Enter"+ "TextMarkTextContent": "回车"},{"Type": "NodeText",@@ -431,7 +431,7 @@{"Type": "NodeTextMark","TextMarkType": "kbd",- "TextMarkTextContent": "Enter"+ "TextMarkTextContent": "回车"},{"Type": "NodeText",@@ -726,7 +726,7 @@"HeadingLevel": 2,"Properties": {"id": "20260804170054-w5eqebc",- "updated": "20260804180000"+ "updated": "20260804230000"},"Children": [{@@ -740,7 +740,7 @@"Type": "NodeParagraph","Properties": {"id": "20260804170055-qbwm9vb",- "updated": "20260804180000"+ "updated": "20260804230000"},"Children": [{@@ -773,6 +773,21 @@{"Type": "NodeText","Data": " 中可以添加 stdio 或 HTTP 服务,配置命令、参数、地址、HTTP 标头和超时时间,并查看连接状态和工具数量。"+ },+ {+ "Type": "NodeText",+ "Data": "这里配置的是供智能体调用的外部 MCP 服务;如果要让外部 MCP 客户端连接思源,请参阅 "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "block-ref",+ "TextMarkBlockRefID": "20260804223000-mcpsv01",+ "TextMarkBlockRefSubtype": "s",+ "TextMarkTextContent": "MCP 服务"+ },+ {+ "Type": "NodeText",+ "Data": "。"}]},@@ -781,7 +796,7 @@"Type": "NodeParagraph","Properties": {"id": "20260804170056-3aqvrqh",- "updated": "20260804180000"+ "updated": "20260804230000"},"Children": [{@@ -800,11 +815,22 @@{"Type": "NodeTextMark","TextMarkType": "kbd",- "TextMarkTextContent": "密钥与变量"+ "TextMarkTextContent": "密钥和变量"+ },+ {+ "Type": "NodeText",+ "Data": " 中统一管理,具体说明请参阅 "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "block-ref",+ "TextMarkBlockRefID": "20260804224000-secvr01",+ "TextMarkBlockRefSubtype": "s",+ "TextMarkTextContent": "密钥和变量"},{"Type": "NodeText",- "Data": " 中统一管理。调用外部 MCP 工具可能发送本地数据、修改外部系统或产生费用,应根据确认卡片核对具体影响。"+ "Data": "。调用外部 MCP 工具可能发送本地数据、修改外部系统或产生费用,应根据确认卡片核对具体影响。"}]},diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20260804223000-mcpsv01.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20260804223000-mcpsv01.synew file mode 100644index 0000000000..ab189eb751--- /dev/null+++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20260804223000-mcpsv01.sy@@ -0,0 +1,26 @@+{+ "ID": "20260804223000-mcpsv01",+ "Spec": "2",+ "Type": "NodeDocument",+ "Properties": {+ "id": "20260804223000-mcpsv01",+ "title": "MCP 服务",+ "type": "doc",+ "updated": "20260804230000"+ },+ "Children": [+ {"ID": "20260804223001-mcpcn01", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804223001-mcpcn01", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "概述"}]},+ {"ID": "20260804223002-mcpcn02", "Type": "NodeParagraph", "Properties": {"id": "20260804223002-mcpcn02", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "思源内置 MCP 服务端,外部 MCP 客户端可以通过它发现并调用思源提供的工具,以搜索、读取和操作当前工作空间。该服务与 AI 智能体中配置的外部 MCP 服务方向相反:前者由外部客户端连接思源,后者由思源智能体连接外部服务。"}]},+ {"ID": "20260804223003-mcpcn03", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804223003-mcpcn03", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "连接服务"}]},+ {"ID": "20260804223004-mcpcn04", "Type": "NodeParagraph", "Properties": {"id": "20260804223004-mcpcn04", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "请先确保思源正在运行,并且 MCP 客户端能够访问思源的网络地址。服务使用 Streamable HTTP 传输,端点固定为 "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "/mcp"}, {"Type": "NodeText", "Data": ",本机默认地址通常为 "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "http://127.0.0.1:6806/mcp"}, {"Type": "NodeText", "Data": "。远程连接时请将主机和端口替换为实际可访问的思源地址。"}]},+ {"ID": "20260804223005-mcpcn05", "Type": "NodeParagraph", "Properties": {"id": "20260804223005-mcpcn05", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "在 "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "设置"}, {"Type": "NodeText", "Data": " - "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "鉴权"}, {"Type": "NodeText", "Data": " - "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "API token"}, {"Type": "NodeText", "Data": " 中查看或设置 API token,然后在客户端请求头中设置 "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "Authorization: Token {Your API Token}"}, {"Type": "NodeText", "Data": "。"}]},+ {"ID": "20260804223006-mcpcn06", "Type": "NodeCodeBlock", "IsFencedCodeBlock": true, "CodeBlockFenceChar": 96, "CodeBlockFenceLen": 3, "CodeBlockOpenFence": "YGBg", "CodeBlockInfo": "anNvbg==", "CodeBlockCloseFence": "YGBg", "Properties": {"id": "20260804223006-mcpcn06", "updated": "20260804230000"}, "Children": [{"Type": "NodeCodeBlockFenceOpenMarker", "Data": "```", "CodeBlockFenceLen": 3}, {"Type": "NodeCodeBlockFenceInfoMarker", "CodeBlockInfo": "anNvbg=="}, {"Type": "NodeCodeBlockCode", "Data": "{\n \"mcpServers\": {\n \"siyuan\": {\n \"url\": \"http://127.0.0.1:6806/mcp\",\n \"headers\": {\n \"Authorization\": \"Token {Your API Token}\"\n }\n }\n }\n}\n"}, {"Type": "NodeCodeBlockFenceCloseMarker", "Data": "```", "CodeBlockFenceLen": 3}]},+ {"ID": "20260804223007-mcpcn07", "Type": "NodeParagraph", "Properties": {"id": "20260804223007-mcpcn07", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "以上是通用配置示例,不同 MCP 客户端使用的配置文件位置和字段名称可能不同,请以客户端文档为准。核心配置是 Streamable HTTP 地址和鉴权请求头。"}]},+ {"ID": "20260804223008-mcpcn08", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804223008-mcpcn08", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "工具能力"}]},+ {"ID": "20260804223009-mcpcn09", "Type": "NodeParagraph", "Properties": {"id": "20260804223009-mcpcn09", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "连接成功后,客户端会动态发现当前可用工具。内置工具覆盖搜索、文档、内容块、笔记本、数据库、资源文件、历史、导入导出和同步等能力。工具集合可能随思源版本和运行环境变化,应以客户端实际发现的结果为准。"}]},+ {"ID": "20260804223010-mcpcn10", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804223010-mcpcn10", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "权限和安全"}]},+ {"ID": "20260804223011-mcpcn11", "Type": "NodeParagraph", "Properties": {"id": "20260804223011-mcpcn11", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "MCP 端点仅允许通过鉴权的管理员访问。API token 代表工作空间的管理员权限,连接的客户端可以读取数据,也可能修改或删除数据、访问工作空间文件、执行 SQL 或触发同步等操作,因此只应连接可信客户端。"}]},+ {"ID": "20260804223012-mcpcn12", "Type": "NodeParagraph", "Properties": {"id": "20260804223012-mcpcn12", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "只读模式会拒绝 MCP 的 POST 和 DELETE 请求,因而无法正常调用工具。不要直接将思源服务端口暴露到不可信网络;远程使用时应配置 HTTPS、反向代理或防火墙,并在 token 泄露后立即更换。"}]},+ {"ID": "20260804223013-mcpcn13", "Type": "NodeParagraph", "Properties": {"id": "20260804223013-mcpcn13", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "若要直接通过 HTTP 接口操作思源,请参阅 "}, {"Type": "NodeTextMark", "TextMarkType": "block-ref", "TextMarkBlockRefID": "20201227194925-7ipoiv6", "TextMarkBlockRefSubtype": "s", "TextMarkTextContent": "内核 API"}, {"Type": "NodeText", "Data": ";若要为思源 AI 智能体配置外部 MCP 服务,请参阅 "}, {"Type": "NodeTextMark", "TextMarkType": "block-ref", "TextMarkBlockRefID": "20260804171000-aiagt01", "TextMarkBlockRefSubtype": "s", "TextMarkTextContent": "AI 智能体"}, {"Type": "NodeText", "Data": "。"}]}+ ]+}diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20260804224000-secvr01.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20260804224000-secvr01.synew file mode 100644index 0000000000..2dc2d67c2e--- /dev/null+++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20260804224000-secvr01.sy@@ -0,0 +1,27 @@+{+ "ID": "20260804224000-secvr01",+ "Spec": "2",+ "Type": "NodeDocument",+ "Properties": {+ "id": "20260804224000-secvr01",+ "title": "密钥和变量",+ "type": "doc",+ "updated": "20260804230000"+ },+ "Children": [+ {"ID": "20260804224001-seccn01", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804224001-seccn01", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "概述"}]},+ {"ID": "20260804224002-seccn02", "Type": "NodeParagraph", "Properties": {"id": "20260804224002-seccn02", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "密钥和变量用于集中管理 Skill、MCP 服务、智能体工具和插件使用的可复用值。密钥适合保存密码和 API token 等敏感数据,其值会加密存储,并且不会进入 AI 对话;变量适合保存地址、名称和其他非敏感参数,其值以明文存储,并且可以进入 AI 对话。"}]},+ {"ID": "20260804224003-seccn03", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804224003-seccn03", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "配置"}]},+ {"ID": "20260804224004-seccn04", "Type": "NodeParagraph", "Properties": {"id": "20260804224004-seccn04", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "在 "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "设置"}, {"Type": "NodeText", "Data": " - "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "密钥和变量"}, {"Type": "NodeText", "Data": " 中可以分别添加、编辑和删除密钥或变量。每项由名称和值组成;为了兼容所有引用方式,名称建议使用英文字母、数字和下划线,并且不要以数字开头。"}]},+ {"ID": "20260804224005-seccn05", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804224005-seccn05", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "引用方式"}]},+ {"ID": "20260804224006-seccn06", "Type": "NodeParagraph", "Properties": {"id": "20260804224006-seccn06", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "可以使用简写 "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "$NAME"}, {"Type": "NodeText", "Data": " 或 "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "${NAME}"}, {"Type": "NodeText", "Data": ",也可以使用带命名空间的 "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "{{secrets.NAME}}"}, {"Type": "NodeText", "Data": " 和 "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "{{vars.NAME}}"}, {"Type": "NodeText", "Data": "。带命名空间的写法含义更明确,适合在共享配置和 Skill 中使用。"}]},+ {"ID": "20260804224007-seccn07", "Type": "NodeParagraph", "Properties": {"id": "20260804224007-seccn07", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "如果密钥和变量存在相同名称,在同时支持两者的引用位置使用简写时会优先取密钥;使用带命名空间的写法可以明确指定。找不到对应名称时,占位符会保留原文,便于发现尚未配置的项目。"}]},+ {"ID": "20260804224008-seccn08", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804224008-seccn08", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "使用示例"}]},+ {"ID": "20260804224009-seccn09", "Type": "NodeParagraph", "Properties": {"id": "20260804224009-seccn09", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "例如,添加名为 "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "API_TOKEN"}, {"Type": "NodeText", "Data": " 的密钥和名为 "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "WORKSPACE"}, {"Type": "NodeText", "Data": " 的变量后,可以在智能体 MCP 服务的 HTTP 标头中这样引用:"}]},+ {"ID": "20260804224010-seccn10", "Type": "NodeCodeBlock", "IsFencedCodeBlock": true, "CodeBlockFenceChar": 96, "CodeBlockFenceLen": 3, "CodeBlockOpenFence": "YGBg", "CodeBlockInfo": "anNvbg==", "CodeBlockCloseFence": "YGBg", "Properties": {"id": "20260804224010-seccn10", "updated": "20260804230000"}, "Children": [{"Type": "NodeCodeBlockFenceOpenMarker", "Data": "```", "CodeBlockFenceLen": 3}, {"Type": "NodeCodeBlockFenceInfoMarker", "CodeBlockInfo": "anNvbg=="}, {"Type": "NodeCodeBlockCode", "Data": "{\n \"Authorization\": \"Bearer {{secrets.API_TOKEN}}\",\n \"X-Workspace\": \"{{vars.WORKSPACE}}\"\n}\n"}, {"Type": "NodeCodeBlockFenceCloseMarker", "Data": "```", "CodeBlockFenceLen": 3}]},+ {"ID": "20260804224011-seccn11", "Type": "NodeParagraph", "Properties": {"id": "20260804224011-seccn11", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "智能体内置 HTTP 请求工具也会在网址、HTTP 标头和请求正文中替换密钥与变量,例如可以将网址写为 "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "{{vars.API_BASE}}/v1/items"}, {"Type": "NodeText", "Data": "。Skill 正文和对话消息可以使用变量;密钥占位符不会在 AI 对话中展开,只会在支持密钥的工具或 MCP 配置真正发起请求时替换。"}]},+ {"ID": "20260804224012-seccn12", "Type": "NodeParagraph", "Properties": {"id": "20260804224012-seccn12", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "插件也可以通过接口读取或解析密钥和变量。安装插件前应确认其来源和权限,因为能够访问密钥的插件可以取得运行时明文。"}]},+ {"ID": "20260804224013-seccn13", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804224013-seccn13", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "安全建议"}]},+ {"ID": "20260804224014-seccn14", "Type": "NodeParagraph", "Properties": {"id": "20260804224014-seccn14", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "不要将密码、访问 token 或私钥保存为变量,也不要在对话消息、Skill 正文或普通配置中直接写入敏感值。删除或更换密钥后,应同时检查使用它的 Skill、MCP 服务和插件配置。有关智能体使用这些配置的方式,请参阅 "}, {"Type": "NodeTextMark", "TextMarkType": "block-ref", "TextMarkBlockRefID": "20260804171000-aiagt01", "TextMarkBlockRefSubtype": "s", "TextMarkTextContent": "AI 智能体"}, {"Type": "NodeText", "Data": "。"}]}+ ]+}diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226121329-c5v3dto.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226121329-c5v3dto.syindex 3760deb6cc..b1f07443ad 100644--- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226121329-c5v3dto.sy+++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226121329-c5v3dto.sy@@ -6,7 +6,7 @@"id": "20211226121329-c5v3dto","title": "Kernel API","type": "doc",- "updated": "20230820185840"+ "updated": "20260804230000"},"Children": [{@@ -30,6 +30,31 @@"id": "20211226122348-5t303hg","updated": "20211226122348"}+ },+ {+ "ID": "20260804225003-apitw01",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20260804225003-apitw01",+ "updated": "20260804230000"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "思源還透過 MCP 向外部用戶端提供工具,連線方式和權限說明請參閱 "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "block-ref",+ "TextMarkBlockRefID": "20260804223001-mcpsv02",+ "TextMarkBlockRefSubtype": "s",+ "TextMarkTextContent": "MCP 服務"+ },+ {+ "Type": "NodeText",+ "Data": "。"+ }+ ]}]-}\ No newline at end of file+}diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.syindex 10a814f621..5a67f27190 100644--- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy+++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy@@ -7,7 +7,7 @@"id": "20211226122549-jktxego","title": "快捷鍵","type": "doc",- "updated": "20260803171606"+ "updated": "20260804230000"},"Children": [{@@ -3746,7 +3746,7 @@"HeadingLevel": 2,"Properties": {"id": "20211226122652-htptsmh",- "updated": "20260803171606"+ "updated": "20260804230000"},"Children": [{@@ -3761,7 +3761,7 @@"HeadingLevel": 3,"Properties": {"id": "20211226122652-xp1hi60",- "updated": "20260803171606"+ "updated": "20260804230000"},"Children": [{@@ -3781,7 +3781,7 @@"Properties": {"colgroup": "||","id": "20240112151141-ggglv0f",- "updated": "20260803171606"+ "updated": "20260804230000"},"Children": [{@@ -3832,7 +3832,7 @@"Children": [{"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "聚焦麵包屑"}]},{"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": ""}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "Alt"}, {"Type": "NodeText", "Data": "+"}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "Shift"}, {"Type": "NodeText", "Data": "+"}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "B"}, {"Type": "NodeText", "Data": "/ "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "⌥⇧B"}, {"Type": "NodeText", "Data": ""}]},- {"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "聚焦後使用 ← / → 切換麵包屑,使用 ↓ / Enter 開啟下級區塊選單,使用 Esc 返回編輯器"}]}+ {"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "聚焦後使用 "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "←"}, {"Type": "NodeText", "Data": " / "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "→"}, {"Type": "NodeText", "Data": " 切換麵包屑,使用 "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "↓"}, {"Type": "NodeText", "Data": " / "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "回車"}, {"Type": "NodeText", "Data": " 開啟下級區塊選單,使用 "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "Esc"}, {"Type": "NodeText", "Data": " 返回編輯器"}]}]},{@@ -9188,7 +9188,7 @@"HeadingLevel": 3,"Properties": {"id": "20211226122652-8191vgw",- "updated": "20260803171606"+ "updated": "20260804230000"},"Children": [{@@ -9208,7 +9208,7 @@"Properties": {"colgroup": "||","id": "20211226122652-v6as45b",- "updated": "20260803171606"+ "updated": "20260804230000"},"Children": [{@@ -9378,7 +9378,7 @@{"Type": "NodeTextMark","TextMarkType": "kbd",- "TextMarkTextContent": "Enter"+ "TextMarkTextContent": "回車"},{"Type": "NodeText",diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20221223221501-mops33i.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20221223221501-mops33i.syindex d2cb70bdf0..b59220ca21 100644--- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20221223221501-mops33i.sy+++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20221223221501-mops33i.sy@@ -7,7 +7,7 @@"id": "20221223221501-mops33i","title": "閃卡","type": "doc",- "updated": "20260803163402"+ "updated": "20260804230000"},"Children": [{@@ -267,7 +267,7 @@"HeadingLevel": 3,"Properties": {"id": "20260614194439-dpit548",- "updated": "20260614194439"+ "updated": "20260804230000"},"Children": [{@@ -418,12 +418,30 @@"Type": "NodeParagraph","Properties": {"id": "20260614194439-vi1i5u5",- "updated": "20260614194439"+ "updated": "20260804230000"},"Children": [{"Type": "NodeText",- "Data": "進入複習後,介面會逐張展示待複習的卡片。每張卡片先展示問題面,點擊「顯示答案」或按空格/Enter 展示答案面,然後根據自己的掌握程度選擇評級:"+ "Data": "進入複習後,介面會逐張展示待複習的卡片。每張卡片先展示問題面,點擊「顯示答案」或按 "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "空格"+ },+ {+ "Type": "NodeText",+ "Data": " / "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "回車"+ },+ {+ "Type": "NodeText",+ "Data": " 展示答案面,然後根據自己的掌握程度選擇評級:"}]},@@ -742,12 +760,30 @@"Type": "NodeParagraph","Properties": {"id": "20260614194439-mun0m8m",- "updated": "20260614194439"+ "updated": "20260804230000"},"Children": [{"Type": "NodeText",- "Data": "展示答案後,空格和 Enter 也可直接觸發「良好」評級。評級直接影響卡片的複習間隔——高評級延長下次複習時間,低評級縮短下次複習時間。系統使用 FSRS 演算法根據歷史評級資料自動最佳化每個人的複習安排。"+ "Data": "展示答案後,"+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "空格"+ },+ {+ "Type": "NodeText",+ "Data": " 和 "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "回車"+ },+ {+ "Type": "NodeText",+ "Data": " 也可直接觸發「良好」評級。評級直接影響卡片的複習間隔——高評級延長下次複習時間,低評級縮短下次複習時間。系統使用 FSRS 演算法根據歷史評級資料自動最佳化每個人的複習安排。"}]},@@ -1003,4 +1039,4 @@]}]-}\ No newline at end of file+}diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20230304000829-9jwu3po/20260804171002-aiagt02.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20230304000829-9jwu3po/20260804171002-aiagt02.syindex 1e341ba142..931fabd2e2 100644--- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20230304000829-9jwu3po/20260804171002-aiagt02.sy+++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20230304000829-9jwu3po/20260804171002-aiagt02.sy@@ -6,7 +6,7 @@"id": "20260804171002-aiagt02","title": "AI 智能體","type": "doc",- "updated": "20260804205607"+ "updated": "20260804230000"},"Children": [{@@ -389,7 +389,7 @@"HeadingLevel": 3,"Properties": {"id": "20260804170039-1z57i1s",- "updated": "20260804180000"+ "updated": "20260804230000"},"Children": [{@@ -403,7 +403,7 @@"Type": "NodeParagraph","Properties": {"id": "20260804170040-98fzzbm",- "updated": "20260804180000"+ "updated": "20260804230000"},"Children": [{@@ -413,7 +413,7 @@{"Type": "NodeTextMark","TextMarkType": "kbd",- "TextMarkTextContent": "Enter"+ "TextMarkTextContent": "回車"},{"Type": "NodeText",@@ -431,7 +431,7 @@{"Type": "NodeTextMark","TextMarkType": "kbd",- "TextMarkTextContent": "Enter"+ "TextMarkTextContent": "回車"},{"Type": "NodeText",@@ -726,7 +726,7 @@"HeadingLevel": 2,"Properties": {"id": "20260804170054-vppxnqj",- "updated": "20260804180000"+ "updated": "20260804230000"},"Children": [{@@ -740,7 +740,7 @@"Type": "NodeParagraph","Properties": {"id": "20260804170055-yibcbj8",- "updated": "20260804180000"+ "updated": "20260804230000"},"Children": [{@@ -773,6 +773,21 @@{"Type": "NodeText","Data": " 中可以新增 stdio 或 HTTP 服務,設定指令、參數、位址、HTTP 標頭和逾時時間,並檢視連線狀態和工具數量。"+ },+ {+ "Type": "NodeText",+ "Data": "這裡設定的是供智能體呼叫的外部 MCP 服務;如果要讓外部 MCP 用戶端連線思源,請參閱 "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "block-ref",+ "TextMarkBlockRefID": "20260804223001-mcpsv02",+ "TextMarkBlockRefSubtype": "s",+ "TextMarkTextContent": "MCP 服務"+ },+ {+ "Type": "NodeText",+ "Data": "。"}]},@@ -781,7 +796,7 @@"Type": "NodeParagraph","Properties": {"id": "20260804170056-84olaaf",- "updated": "20260804180000"+ "updated": "20260804230000"},"Children": [{@@ -800,11 +815,22 @@{"Type": "NodeTextMark","TextMarkType": "kbd",- "TextMarkTextContent": "金鑰與變數"+ "TextMarkTextContent": "金鑰和變數"+ },+ {+ "Type": "NodeText",+ "Data": " 中統一管理,具體說明請參閱 "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "block-ref",+ "TextMarkBlockRefID": "20260804224001-secvr02",+ "TextMarkBlockRefSubtype": "s",+ "TextMarkTextContent": "金鑰和變數"},{"Type": "NodeText",- "Data": " 中統一管理。呼叫外部 MCP 工具可能傳送本機資料、修改外部系統或產生費用,應根據確認卡片核對具體影響。"+ "Data": "。呼叫外部 MCP 工具可能傳送本機資料、修改外部系統或產生費用,應根據確認卡片核對具體影響。"}]},diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20240208171522-y7dxcno/20260613155453-pxxzmhc.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20240208171522-y7dxcno/20260613155453-pxxzmhc.syindex b08417cf23..85ea8c2e30 100644--- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20240208171522-y7dxcno/20260613155453-pxxzmhc.sy+++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20240208171522-y7dxcno/20260613155453-pxxzmhc.sy@@ -6,7 +6,7 @@"id": "20260613155453-pxxzmhc","title": "字段類型","type": "doc",- "updated": "20260803171606"+ "updated": "20260804230000"},"Children": [{@@ -1641,7 +1641,7 @@},"Properties": {"id": "20260613155453-hq9a0up",- "updated": "20260613155453"+ "updated": "20260804230000"},"Children": [{@@ -1694,7 +1694,7 @@},"Properties": {"id": "20260613155453-9c1296c",- "updated": "20260613155453"+ "updated": "20260804230000"},"Children": [{@@ -1702,7 +1702,7 @@"Type": "NodeParagraph","Properties": {"id": "20260613155453-zgs0m2q",- "updated": "20260613155453"+ "updated": "20260804230000"},"Children": [{@@ -1717,7 +1717,7 @@{"Type": "NodeTextMark","TextMarkType": "code",- "TextMarkTextContent": "Shift+Enter"+ "TextMarkTextContent": "Shift+回車"},{"Type": "NodeText",diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20260804223001-mcpsv02.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20260804223001-mcpsv02.synew file mode 100644index 0000000000..99a2dae027--- /dev/null+++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20260804223001-mcpsv02.sy@@ -0,0 +1,26 @@+{+ "ID": "20260804223001-mcpsv02",+ "Spec": "2",+ "Type": "NodeDocument",+ "Properties": {+ "id": "20260804223001-mcpsv02",+ "title": "MCP 服務",+ "type": "doc",+ "updated": "20260804230000"+ },+ "Children": [+ {"ID": "20260804223201-mcptw01", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804223201-mcptw01", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "概述"}]},+ {"ID": "20260804223202-mcptw02", "Type": "NodeParagraph", "Properties": {"id": "20260804223202-mcptw02", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "思源內建 MCP 服務端,外部 MCP 用戶端可以透過它探索並呼叫思源提供的工具,以搜尋、讀取和操作目前工作空間。該服務與 AI 智能體中設定的外部 MCP 服務方向相反:前者由外部用戶端連線思源,後者由思源智能體連線外部服務。"}]},+ {"ID": "20260804223203-mcptw03", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804223203-mcptw03", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "連線服務"}]},+ {"ID": "20260804223204-mcptw04", "Type": "NodeParagraph", "Properties": {"id": "20260804223204-mcptw04", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "請先確保思源正在執行,並且 MCP 用戶端能夠存取思源的網路位址。服務使用 Streamable HTTP 傳輸,端點固定為 "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "/mcp"}, {"Type": "NodeText", "Data": ",本機預設位址通常為 "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "http://127.0.0.1:6806/mcp"}, {"Type": "NodeText", "Data": "。遠端連線時請將主機和連接埠替換為實際可存取的思源位址。"}]},+ {"ID": "20260804223205-mcptw05", "Type": "NodeParagraph", "Properties": {"id": "20260804223205-mcptw05", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "在 "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "設定"}, {"Type": "NodeText", "Data": " - "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "鑑權"}, {"Type": "NodeText", "Data": " - "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "API token"}, {"Type": "NodeText", "Data": " 中檢視或設定 API token,然後在用戶端請求標頭中設定 "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "Authorization: Token {Your API Token}"}, {"Type": "NodeText", "Data": "。"}]},+ {"ID": "20260804223206-mcptw06", "Type": "NodeCodeBlock", "IsFencedCodeBlock": true, "CodeBlockFenceChar": 96, "CodeBlockFenceLen": 3, "CodeBlockOpenFence": "YGBg", "CodeBlockInfo": "anNvbg==", "CodeBlockCloseFence": "YGBg", "Properties": {"id": "20260804223206-mcptw06", "updated": "20260804230000"}, "Children": [{"Type": "NodeCodeBlockFenceOpenMarker", "Data": "```", "CodeBlockFenceLen": 3}, {"Type": "NodeCodeBlockFenceInfoMarker", "CodeBlockInfo": "anNvbg=="}, {"Type": "NodeCodeBlockCode", "Data": "{\n \"mcpServers\": {\n \"siyuan\": {\n \"url\": \"http://127.0.0.1:6806/mcp\",\n \"headers\": {\n \"Authorization\": \"Token {Your API Token}\"\n }\n }\n }\n}\n"}, {"Type": "NodeCodeBlockFenceCloseMarker", "Data": "```", "CodeBlockFenceLen": 3}]},+ {"ID": "20260804223207-mcptw07", "Type": "NodeParagraph", "Properties": {"id": "20260804223207-mcptw07", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "以上是通用設定範例,不同 MCP 用戶端使用的設定檔位置和欄位名稱可能不同,請以用戶端文件為準。核心設定是 Streamable HTTP 位址和鑑權請求標頭。"}]},+ {"ID": "20260804223208-mcptw08", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804223208-mcptw08", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "工具能力"}]},+ {"ID": "20260804223209-mcptw09", "Type": "NodeParagraph", "Properties": {"id": "20260804223209-mcptw09", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "連線成功後,用戶端會動態探索目前可用工具。內建工具涵蓋搜尋、文件、內容區塊、筆記本、資料庫、資源檔案、歷史、匯入匯出和同步等能力。工具集合可能隨思源版本和執行環境變化,應以用戶端實際探索的結果為準。"}]},+ {"ID": "20260804223210-mcptw10", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804223210-mcptw10", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "權限和安全"}]},+ {"ID": "20260804223211-mcptw11", "Type": "NodeParagraph", "Properties": {"id": "20260804223211-mcptw11", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "MCP 端點只允許通過鑑權的管理員存取。API token 代表工作空間的管理員權限,連線的用戶端可以讀取資料,也可能修改或刪除資料、存取工作空間檔案、執行 SQL 或觸發同步等操作,因此只應連線可信任的用戶端。"}]},+ {"ID": "20260804223212-mcptw12", "Type": "NodeParagraph", "Properties": {"id": "20260804223212-mcptw12", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "唯讀模式會拒絕 MCP 的 POST 和 DELETE 請求,因此無法正常呼叫工具。不要直接將思源服務連接埠暴露到不可信任的網路;遠端使用時應設定 HTTPS、反向代理或防火牆,並在 token 洩露後立即更換。"}]},+ {"ID": "20260804223213-mcptw13", "Type": "NodeParagraph", "Properties": {"id": "20260804223213-mcptw13", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "若要直接透過 HTTP 介面操作思源,請參閱 "}, {"Type": "NodeTextMark", "TextMarkType": "block-ref", "TextMarkBlockRefID": "20211226121329-c5v3dto", "TextMarkBlockRefSubtype": "s", "TextMarkTextContent": "Kernel API"}, {"Type": "NodeText", "Data": ";若要為思源 AI 智能體設定外部 MCP 服務,請參閱 "}, {"Type": "NodeTextMark", "TextMarkType": "block-ref", "TextMarkBlockRefID": "20260804171002-aiagt02", "TextMarkBlockRefSubtype": "s", "TextMarkTextContent": "AI 智能體"}, {"Type": "NodeText", "Data": "。"}]}+ ]+}diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20260804224001-secvr02.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20260804224001-secvr02.synew file mode 100644index 0000000000..b7bf6ee299--- /dev/null+++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20260804224001-secvr02.sy@@ -0,0 +1,27 @@+{+ "ID": "20260804224001-secvr02",+ "Spec": "2",+ "Type": "NodeDocument",+ "Properties": {+ "id": "20260804224001-secvr02",+ "title": "金鑰和變數",+ "type": "doc",+ "updated": "20260804230000"+ },+ "Children": [+ {"ID": "20260804224201-sectw01", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804224201-sectw01", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "概述"}]},+ {"ID": "20260804224202-sectw02", "Type": "NodeParagraph", "Properties": {"id": "20260804224202-sectw02", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "金鑰和變數用於集中管理 Skill、MCP 服務、智能體工具和外掛使用的可重複使用值。金鑰適合儲存密碼和 API token 等敏感資料,其值會加密儲存,並且不會進入 AI 對話;變數適合儲存位址、名稱和其他非敏感參數,其值以明文儲存,並且可以進入 AI 對話。"}]},+ {"ID": "20260804224203-sectw03", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804224203-sectw03", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "設定"}]},+ {"ID": "20260804224204-sectw04", "Type": "NodeParagraph", "Properties": {"id": "20260804224204-sectw04", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "在 "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "設定"}, {"Type": "NodeText", "Data": " - "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "金鑰和變數"}, {"Type": "NodeText", "Data": " 中可以分別新增、編輯和刪除金鑰或變數。每個項目由名稱和值組成;為了相容所有引用方式,名稱建議使用英文字母、數字和底線,並且不要以數字開頭。"}]},+ {"ID": "20260804224205-sectw05", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804224205-sectw05", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "引用方式"}]},+ {"ID": "20260804224206-sectw06", "Type": "NodeParagraph", "Properties": {"id": "20260804224206-sectw06", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "可以使用簡寫 "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "$NAME"}, {"Type": "NodeText", "Data": " 或 "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "${NAME}"}, {"Type": "NodeText", "Data": ",也可以使用帶命名空間的 "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "{{secrets.NAME}}"}, {"Type": "NodeText", "Data": " 和 "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "{{vars.NAME}}"}, {"Type": "NodeText", "Data": "。帶命名空間的寫法含義更明確,適合在共享設定和 Skill 中使用。"}]},+ {"ID": "20260804224207-sectw07", "Type": "NodeParagraph", "Properties": {"id": "20260804224207-sectw07", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "如果金鑰和變數存在相同名稱,在同時支援兩者的引用位置使用簡寫時會優先取得金鑰;使用帶命名空間的寫法可以明確指定。找不到對應名稱時,預留位置會保留原文,便於發現尚未設定的項目。"}]},+ {"ID": "20260804224208-sectw08", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804224208-sectw08", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "使用範例"}]},+ {"ID": "20260804224209-sectw09", "Type": "NodeParagraph", "Properties": {"id": "20260804224209-sectw09", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "例如,新增名為 "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "API_TOKEN"}, {"Type": "NodeText", "Data": " 的金鑰和名為 "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "WORKSPACE"}, {"Type": "NodeText", "Data": " 的變數後,可以在智能體 MCP 服務的 HTTP 標頭中這樣引用:"}]},+ {"ID": "20260804224210-sectw10", "Type": "NodeCodeBlock", "IsFencedCodeBlock": true, "CodeBlockFenceChar": 96, "CodeBlockFenceLen": 3, "CodeBlockOpenFence": "YGBg", "CodeBlockInfo": "anNvbg==", "CodeBlockCloseFence": "YGBg", "Properties": {"id": "20260804224210-sectw10", "updated": "20260804230000"}, "Children": [{"Type": "NodeCodeBlockFenceOpenMarker", "Data": "```", "CodeBlockFenceLen": 3}, {"Type": "NodeCodeBlockFenceInfoMarker", "CodeBlockInfo": "anNvbg=="}, {"Type": "NodeCodeBlockCode", "Data": "{\n \"Authorization\": \"Bearer {{secrets.API_TOKEN}}\",\n \"X-Workspace\": \"{{vars.WORKSPACE}}\"\n}\n"}, {"Type": "NodeCodeBlockFenceCloseMarker", "Data": "```", "CodeBlockFenceLen": 3}]},+ {"ID": "20260804224211-sectw11", "Type": "NodeParagraph", "Properties": {"id": "20260804224211-sectw11", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "智能體內建 HTTP 請求工具也會在網址、HTTP 標頭和請求本文中替換金鑰與變數,例如可以將網址寫為 "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "{{vars.API_BASE}}/v1/items"}, {"Type": "NodeText", "Data": "。Skill 本文和對話訊息可以使用變數;金鑰預留位置不會在 AI 對話中展開,只會在支援金鑰的工具或 MCP 設定真正發出請求時替換。"}]},+ {"ID": "20260804224212-sectw12", "Type": "NodeParagraph", "Properties": {"id": "20260804224212-sectw12", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "外掛也可以透過介面讀取或解析金鑰和變數。安裝外掛前應確認其來源和權限,因為能夠存取金鑰的外掛可以取得執行時期明文。"}]},+ {"ID": "20260804224213-sectw13", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804224213-sectw13", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "安全建議"}]},+ {"ID": "20260804224214-sectw14", "Type": "NodeParagraph", "Properties": {"id": "20260804224214-sectw14", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "不要將密碼、存取 token 或私密金鑰儲存為變數,也不要在對話訊息、Skill 本文或一般設定中直接寫入敏感值。刪除或更換金鑰後,應同時檢查使用它的 Skill、MCP 服務和外掛設定。有關智能體使用這些設定的方式,請參閱 "}, {"Type": "NodeTextMark", "TextMarkType": "block-ref", "TextMarkBlockRefID": "20260804171002-aiagt02", "TextMarkBlockRefSubtype": "s", "TextMarkTextContent": "AI 智能體"}, {"Type": "NodeText", "Data": "。"}]}+ ]+}diff --git a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-dytmky4.sy b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-dytmky4.syindex 7f537e62f8..90fe2cb5a5 100644--- a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-dytmky4.sy+++ b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-dytmky4.sy@@ -7,7 +7,7 @@"id": "20240530101000-dytmky4","title": "カーネル API","type": "doc",- "updated": "20240530101000"+ "updated": "20260804230000"},"Children": [{@@ -38,6 +38,31 @@"ID": "20240530101000-thrtp8y","id": "20240530101000-d6shb6a"}+ },+ {+ "ID": "20260804225004-apija01",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20260804225004-apija01",+ "updated": "20260804230000"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "SiYuan は MCP を通じて外部クライアントにもツールを提供します。接続方法と権限については、"+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "block-ref",+ "TextMarkBlockRefID": "20260804223003-mcpsv04",+ "TextMarkBlockRefSubtype": "s",+ "TextMarkTextContent": "MCP サービス"+ },+ {+ "Type": "NodeText",+ "Data": " を参照してください。"+ }+ ]}]-}\ No newline at end of file+}diff --git a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-ei5t6tt/20260804171006-aiagt04.sy b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-ei5t6tt/20260804171006-aiagt04.syindex 36d6db28ca..cae4f6e70e 100644--- a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-ei5t6tt/20260804171006-aiagt04.sy+++ b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-ei5t6tt/20260804171006-aiagt04.sy@@ -6,7 +6,7 @@"id": "20260804171006-aiagt04","title": "AI エージェント","type": "doc",- "updated": "20260804205607"+ "updated": "20260804230000"},"Children": [{@@ -714,7 +714,7 @@"HeadingLevel": 2,"Properties": {"id": "20260804170054-qfoixg9",- "updated": "20260804180000"+ "updated": "20260804230000"},"Children": [{@@ -728,7 +728,7 @@"Type": "NodeParagraph","Properties": {"id": "20260804170055-a7wg3um",- "updated": "20260804180000"+ "updated": "20260804230000"},"Children": [{@@ -761,6 +761,21 @@{"Type": "NodeText","Data": " で stdio または HTTP サービスを追加し、コマンド、引数、URL、HTTP ヘッダー、タイムアウトを設定して、接続状態とツール数を確認できます。"+ },+ {+ "Type": "NodeText",+ "Data": "ここで設定するのは、エージェントが呼び出す外部 MCP サービスです。外部 MCP クライアントを SiYuan に接続する方法については、"+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "block-ref",+ "TextMarkBlockRefID": "20260804223003-mcpsv04",+ "TextMarkBlockRefSubtype": "s",+ "TextMarkTextContent": "MCP サービス"+ },+ {+ "Type": "NodeText",+ "Data": " を参照してください。"}]},@@ -769,7 +784,7 @@"Type": "NodeParagraph","Properties": {"id": "20260804170056-7d7fak1",- "updated": "20260804180000"+ "updated": "20260804230000"},"Children": [{@@ -792,7 +807,18 @@},{"Type": "NodeText",- "Data": " で管理できます。外部 MCP ツールはローカルデータの送信、外部システムの変更、料金の発生を伴う場合があるため、確認カードの影響を確認してください。"+ "Data": " で管理できます。詳しくは、"+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "block-ref",+ "TextMarkBlockRefID": "20260804224003-secvr04",+ "TextMarkBlockRefSubtype": "s",+ "TextMarkTextContent": "シークレットと変数"+ },+ {+ "Type": "NodeText",+ "Data": " を参照してください。外部 MCP ツールはローカルデータの送信、外部システムの変更、料金の発生を伴う場合があるため、確認カードの影響を確認してください。"}]},diff --git a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.sy b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.syindex 3826bf3d4d..e6a9efbf90 100644--- a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.sy+++ b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.sy@@ -9,7 +9,7 @@"id": "20240530101000-xsbxokr","title": "ショートカット","type": "doc",- "updated": "20260803171606"+ "updated": "20260804230000"},"Children": [{@@ -3702,7 +3702,7 @@"Properties": {"ID": "20240530101000-twmuxke","id": "20240530101000-675gu9g",- "updated": "20260803171606"+ "updated": "20260804230000"},"Children": [{@@ -3728,7 +3728,7 @@"Properties": {"ID": "20240530101000-tkbdrth","id": "20240530101000-9wkmh8w",- "updated": "20260803171606"+ "updated": "20260804230000"},"Children": [{@@ -3748,7 +3748,7 @@"Properties": {"colgroup": "||","id": "20240530101000-1isfzez",- "updated": "20260803171606"+ "updated": "20260804230000"},"Children": [{@@ -3799,7 +3799,7 @@"Children": [{"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "パンくずリストにフォーカス"}]},{"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": ""}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "Alt"}, {"Type": "NodeText", "Data": "+"}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "Shift"}, {"Type": "NodeText", "Data": "+"}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "B"}, {"Type": "NodeText", "Data": "/ "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "⌥⇧B"}, {"Type": "NodeText", "Data": ""}]},- {"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "フォーカス後、← / → でパンくずリスト項目を移動し、↓ / Enter で下位ブロックメニューを開き、Esc でエディタに戻ります"}]}+ {"Type": "NodeTableCell", "Data": "td", "Children": [{"Type": "NodeText", "Data": "フォーカス後、"}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "←"}, {"Type": "NodeText", "Data": " / "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "→"}, {"Type": "NodeText", "Data": " でパンくずリスト項目を移動し、"}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "↓"}, {"Type": "NodeText", "Data": " / "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "Enter"}, {"Type": "NodeText", "Data": " で下位ブロックメニューを開き、"}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "Esc"}, {"Type": "NodeText", "Data": " でエディタに戻ります"}]}]},{diff --git a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-ynpmvl7.sy b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-ynpmvl7.syindex 9ed9cc10fe..b885715061 100644--- a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-ynpmvl7.sy+++ b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-ynpmvl7.sy@@ -8,7 +8,7 @@"id": "20240530101000-ynpmvl7","title": "フラッシュカード","type": "doc",- "updated": "20260803163402"+ "updated": "20260804230000"},"Children": [{@@ -268,7 +268,7 @@"HeadingLevel": 3,"Properties": {"id": "20260614194342-fwtjfyw",- "updated": "20260614194342"+ "updated": "20260804230000"},"Children": [{@@ -419,12 +419,30 @@"Type": "NodeParagraph","Properties": {"id": "20260614194342-4coyfp4",- "updated": "20260614194342"+ "updated": "20260804230000"},"Children": [{"Type": "NodeText",- "Data": "復習を開始すると、画面に保留中のカードが1枚ずつ表示されます。各カードは最初に問題面を表示し、「答えを表示」をクリックするかスペース/Enterで答え面を表示して、自分の理解度に応じて評価します:"+ "Data": "復習を開始すると、画面に保留中のカードが1枚ずつ表示されます。各カードは最初に問題面を表示し、「答えを表示」をクリックするか "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "スペース"+ },+ {+ "Type": "NodeText",+ "Data": " / "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "Enter"+ },+ {+ "Type": "NodeText",+ "Data": " で答え面を表示して、自分の理解度に応じて評価します:"}]},@@ -743,12 +761,30 @@"Type": "NodeParagraph","Properties": {"id": "20260614194342-ulwyhdw",- "updated": "20260614194342"+ "updated": "20260804230000"},"Children": [{"Type": "NodeText",- "Data": "答えを表示した後、スペースとEnterでも「良い」評価を直接トリガーできます。評価はカードの復習間隔に直接影響します——高い評価は次回復習までの時間を延長し、低い評価は短縮します。システムはFSRSアルゴリズムを使用して、各ユーザーの評価履歴に基づいて復習スケジュールを自動的に最適化します。"+ "Data": "答えを表示した後、"+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "スペース"+ },+ {+ "Type": "NodeText",+ "Data": " と "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "Enter"+ },+ {+ "Type": "NodeText",+ "Data": " でも「良い」評価を直接トリガーできます。評価はカードの復習間隔に直接影響します——高い評価は次回復習までの時間を延長し、低い評価は短縮します。システムは FSRS アルゴリズムを使用して、各ユーザーの評価履歴に基づいて復習スケジュールを自動的に最適化します。"}]},@@ -1000,4 +1036,4 @@]}]-}\ No newline at end of file+}diff --git a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20260804223003-mcpsv04.sy b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20260804223003-mcpsv04.synew file mode 100644index 0000000000..3b3778c383--- /dev/null+++ b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20260804223003-mcpsv04.sy@@ -0,0 +1,26 @@+{+ "ID": "20260804223003-mcpsv04",+ "Spec": "2",+ "Type": "NodeDocument",+ "Properties": {+ "id": "20260804223003-mcpsv04",+ "title": "MCP サービス",+ "type": "doc",+ "updated": "20260804230000"+ },+ "Children": [+ {"ID": "20260804223301-mcpja01", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804223301-mcpja01", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "概要"}]},+ {"ID": "20260804223302-mcpja02", "Type": "NodeParagraph", "Properties": {"id": "20260804223302-mcpja02", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "SiYuan には MCP サーバーが組み込まれており、外部 MCP クライアントは SiYuan のツールを検出して呼び出し、現在のワークスペースを検索、読み取り、操作できます。これは AI エージェントに設定する外部 MCP サービスとは接続方向が逆です。前者には外部クライアントが接続し、後者には SiYuan のエージェントが接続します。"}]},+ {"ID": "20260804223303-mcpja03", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804223303-mcpja03", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "サービスへの接続"}]},+ {"ID": "20260804223304-mcpja04", "Type": "NodeParagraph", "Properties": {"id": "20260804223304-mcpja04", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "SiYuan が起動しており、MCP クライアントから SiYuan のネットワークアドレスへアクセスできることを確認してください。サービスは Streamable HTTP を使用し、エンドポイントは "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "/mcp"}, {"Type": "NodeText", "Data": " に固定されています。ローカルの既定アドレスは通常 "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "http://127.0.0.1:6806/mcp"}, {"Type": "NodeText", "Data": " です。リモート接続では、ホストとポートをアクセス可能な SiYuan のアドレスに置き換えてください。"}]},+ {"ID": "20260804223305-mcpja05", "Type": "NodeParagraph", "Properties": {"id": "20260804223305-mcpja05", "updated": "20260804230000"}, "Children": [{"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "設定"}, {"Type": "NodeText", "Data": " - "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "認証"}, {"Type": "NodeText", "Data": " - "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "API トークン"}, {"Type": "NodeText", "Data": " で API トークンを確認または設定し、クライアントのリクエストヘッダーに "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "Authorization: Token {Your API Token}"}, {"Type": "NodeText", "Data": " を設定します。"}]},+ {"ID": "20260804223306-mcpja06", "Type": "NodeCodeBlock", "IsFencedCodeBlock": true, "CodeBlockFenceChar": 96, "CodeBlockFenceLen": 3, "CodeBlockOpenFence": "YGBg", "CodeBlockInfo": "anNvbg==", "CodeBlockCloseFence": "YGBg", "Properties": {"id": "20260804223306-mcpja06", "updated": "20260804230000"}, "Children": [{"Type": "NodeCodeBlockFenceOpenMarker", "Data": "```", "CodeBlockFenceLen": 3}, {"Type": "NodeCodeBlockFenceInfoMarker", "CodeBlockInfo": "anNvbg=="}, {"Type": "NodeCodeBlockCode", "Data": "{\n \"mcpServers\": {\n \"siyuan\": {\n \"url\": \"http://127.0.0.1:6806/mcp\",\n \"headers\": {\n \"Authorization\": \"Token {Your API Token}\"\n }\n }\n }\n}\n"}, {"Type": "NodeCodeBlockFenceCloseMarker", "Data": "```", "CodeBlockFenceLen": 3}]},+ {"ID": "20260804223307-mcpja07", "Type": "NodeParagraph", "Properties": {"id": "20260804223307-mcpja07", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "上記は一般的な設定例です。設定ファイルの場所やフィールド名は MCP クライアントによって異なるため、クライアントのドキュメントを参照してください。必要な設定は Streamable HTTP の URL と認証ヘッダーです。"}]},+ {"ID": "20260804223308-mcpja08", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804223308-mcpja08", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "ツール機能"}]},+ {"ID": "20260804223309-mcpja09", "Type": "NodeParagraph", "Properties": {"id": "20260804223309-mcpja09", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "接続後、クライアントは利用可能なツールを動的に検出します。組み込みツールは検索、ドキュメント、コンテンツブロック、ノートブック、データベース、アセット、履歴、インポートとエクスポート、同期などを扱います。ツールの構成は SiYuan のバージョンや実行環境によって異なる場合があるため、クライアントが実際に検出した結果を確認してください。"}]},+ {"ID": "20260804223310-mcpja10", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804223310-mcpja10", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "権限とセキュリティ"}]},+ {"ID": "20260804223311-mcpja11", "Type": "NodeParagraph", "Properties": {"id": "20260804223311-mcpja11", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "MCP エンドポイントには、認証済みの管理者だけがアクセスできます。API トークンはワークスペースの管理者権限を表します。接続したクライアントはデータを読み取るだけでなく、データの変更や削除、ワークスペースファイルへのアクセス、SQL の実行、同期の開始などを行えるため、信頼できるクライアントだけを接続してください。"}]},+ {"ID": "20260804223312-mcpja12", "Type": "NodeParagraph", "Properties": {"id": "20260804223312-mcpja12", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "読み取り専用モードでは MCP の POST と DELETE リクエストが拒否されるため、ツールを通常どおり使用できません。SiYuan のサービスポートを信頼できないネットワークへ直接公開しないでください。リモートで使用する場合は HTTPS、リバースプロキシ、またはファイアウォールを設定し、トークンが漏えいした場合は直ちに変更してください。"}]},+ {"ID": "20260804223313-mcpja13", "Type": "NodeParagraph", "Properties": {"id": "20260804223313-mcpja13", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "HTTP エンドポイントから SiYuan を直接操作する方法については、"}, {"Type": "NodeTextMark", "TextMarkType": "block-ref", "TextMarkBlockRefID": "20240530101000-dytmky4", "TextMarkBlockRefSubtype": "s", "TextMarkTextContent": "カーネル API"}, {"Type": "NodeText", "Data": " を参照してください。SiYuan の AI エージェントに外部 MCP サービスを設定する方法については、"}, {"Type": "NodeTextMark", "TextMarkType": "block-ref", "TextMarkBlockRefID": "20260804171006-aiagt04", "TextMarkBlockRefSubtype": "s", "TextMarkTextContent": "AI エージェント"}, {"Type": "NodeText", "Data": " を参照してください。"}]}+ ]+}diff --git a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20260804224003-secvr04.sy b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20260804224003-secvr04.synew file mode 100644index 0000000000..bbe6bc9fe6--- /dev/null+++ b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20260804224003-secvr04.sy@@ -0,0 +1,27 @@+{+ "ID": "20260804224003-secvr04",+ "Spec": "2",+ "Type": "NodeDocument",+ "Properties": {+ "id": "20260804224003-secvr04",+ "title": "シークレットと変数",+ "type": "doc",+ "updated": "20260804230000"+ },+ "Children": [+ {"ID": "20260804224301-secja01", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804224301-secja01", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "概要"}]},+ {"ID": "20260804224302-secja02", "Type": "NodeParagraph", "Properties": {"id": "20260804224302-secja02", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "シークレットと変数は、スキル、MCP サービス、エージェントツール、プラグインで使用する再利用可能な値を一元管理します。シークレットはパスワードや API トークンなどの機密データに適しており、値は暗号化して保存され、AI の会話には入りません。変数はアドレス、名前、その他の機密ではないパラメータに適しており、値は平文で保存され、AI の会話に入る場合があります。"}]},+ {"ID": "20260804224303-secja03", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804224303-secja03", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "設定"}]},+ {"ID": "20260804224304-secja04", "Type": "NodeParagraph", "Properties": {"id": "20260804224304-secja04", "updated": "20260804230000"}, "Children": [{"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "設定"}, {"Type": "NodeText", "Data": " - "}, {"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "シークレットと変数"}, {"Type": "NodeText", "Data": " でシークレットと変数を追加、編集、削除できます。各項目は名前と値で構成されます。すべての参照形式との互換性を保つため、名前には半角英字、数字、アンダースコアを使用し、数字から始めないことをお勧めします。"}]},+ {"ID": "20260804224305-secja05", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804224305-secja05", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "参照形式"}]},+ {"ID": "20260804224306-secja06", "Type": "NodeParagraph", "Properties": {"id": "20260804224306-secja06", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "短縮形式の "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "$NAME"}, {"Type": "NodeText", "Data": " または "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "${NAME}"}, {"Type": "NodeText", "Data": " を使用できるほか、名前空間付きの "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "{{secrets.NAME}}"}, {"Type": "NodeText", "Data": " と "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "{{vars.NAME}}"}, {"Type": "NodeText", "Data": " も使用できます。名前空間付きの形式は意味が明確なため、共有設定やスキルでの使用に適しています。"}]},+ {"ID": "20260804224307-secja07", "Type": "NodeParagraph", "Properties": {"id": "20260804224307-secja07", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "シークレットと変数に同じ名前がある場合、両方をサポートする参照箇所では短縮形式でシークレットが優先されます。名前空間付きの形式では保存先を明示できます。名前が見つからない場合はプレースホルダーがそのまま残るため、未設定の項目を確認できます。"}]},+ {"ID": "20260804224308-secja08", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804224308-secja08", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "使用例"}]},+ {"ID": "20260804224309-secja09", "Type": "NodeParagraph", "Properties": {"id": "20260804224309-secja09", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "たとえば、"}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "API_TOKEN"}, {"Type": "NodeText", "Data": " というシークレットと "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "WORKSPACE"}, {"Type": "NodeText", "Data": " という変数を追加すると、エージェント MCP サービスの HTTP ヘッダーで次のように参照できます。"}]},+ {"ID": "20260804224310-secja10", "Type": "NodeCodeBlock", "IsFencedCodeBlock": true, "CodeBlockFenceChar": 96, "CodeBlockFenceLen": 3, "CodeBlockOpenFence": "YGBg", "CodeBlockInfo": "anNvbg==", "CodeBlockCloseFence": "YGBg", "Properties": {"id": "20260804224310-secja10", "updated": "20260804230000"}, "Children": [{"Type": "NodeCodeBlockFenceOpenMarker", "Data": "```", "CodeBlockFenceLen": 3}, {"Type": "NodeCodeBlockFenceInfoMarker", "CodeBlockInfo": "anNvbg=="}, {"Type": "NodeCodeBlockCode", "Data": "{\n \"Authorization\": \"Bearer {{secrets.API_TOKEN}}\",\n \"X-Workspace\": \"{{vars.WORKSPACE}}\"\n}\n"}, {"Type": "NodeCodeBlockFenceCloseMarker", "Data": "```", "CodeBlockFenceLen": 3}]},+ {"ID": "20260804224311-secja11", "Type": "NodeParagraph", "Properties": {"id": "20260804224311-secja11", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "エージェントの組み込み HTTP リクエストツールも、URL、HTTP ヘッダー、リクエスト本文のシークレットと変数を置換します。たとえば、URL を "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "{{vars.API_BASE}}/v1/items"}, {"Type": "NodeText", "Data": " と記述できます。スキル本文と会話メッセージでは変数を使用できます。シークレットのプレースホルダーは AI の会話内では展開されず、対応するツールまたは MCP 設定が実際にリクエストを送信するときだけ置換されます。"}]},+ {"ID": "20260804224312-secja12", "Type": "NodeParagraph", "Properties": {"id": "20260804224312-secja12", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "プラグインも API を通じてシークレットと変数を取得または展開できます。シークレットへアクセスできるプラグインは実行時の平文を取得できるため、インストール前に提供元と権限を確認してください。"}]},+ {"ID": "20260804224313-secja13", "Type": "NodeHeading", "HeadingLevel": 2, "Properties": {"id": "20260804224313-secja13", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "セキュリティに関する推奨事項"}]},+ {"ID": "20260804224314-secja14", "Type": "NodeParagraph", "Properties": {"id": "20260804224314-secja14", "updated": "20260804230000"}, "Children": [{"Type": "NodeText", "Data": "パスワード、アクセストークン、秘密鍵を変数として保存したり、会話メッセージ、スキル本文、通常の設定に機密値を直接記述したりしないでください。シークレットを削除または変更した後は、それを使用するスキル、MCP サービス、プラグイン設定も確認してください。エージェントでの使用方法については、"}, {"Type": "NodeTextMark", "TextMarkType": "block-ref", "TextMarkBlockRefID": "20260804171006-aiagt04", "TextMarkBlockRefSubtype": "s", "TextMarkTextContent": "AI エージェント"}, {"Type": "NodeText", "Data": " を参照してください。"}]}+ ]+}