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": "20260804185002-secvr03",
"Spec": "2",
"Type": "NodeDocument",
"Properties": {
"id": "20260804185002-secvr03",
"title": "Secrets and Variables",
"type": "doc",
"updated": "20261024164212"
},
"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": "20261024164212"}, "Children": [{"Type": "NodeText", "Data": "Configuration"}]},
{"ID": "20260804224104-secen04", "Type": "NodeParagraph", "Properties": {"id": "20260804224104-secen04", "updated": "20261024164212"}, "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 value; secrets also have Allowed hosts. Enter exact hostnames without a scheme or port, such as "},
{"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "api.example.com"},
{"Type": "NodeText", "Data": ", separated by commas, whitespace, or semicolons."}
]},
{
"ID": "20261024164212-6ffoamb",
"Type": "NodeParagraph",
"Properties": {
"id": "20261024164212-6ffoamb",
"updated": "20261024164212"
},
"Children": [
{
"Type": "NodeText",
"Data": "Matching is case-insensitive; subdomains are not implicitly allowed, and an empty list disables secret substitution in all outgoing HTTP requests. Variables have no host restriction. 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": "20261024161816"}, "Children": [{"Type": "NodeText", "Data": "Examples"}]},
{"ID": "20260804224109-secen09", "Type": "NodeParagraph", "Properties": {"id": "20260804224109-secen09", "updated": "20261016112115"}, "Children": [{"Type": "NodeText", "Data": "For an HTTP MCP service at "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "https://api.example.com"}, {"Type": "NodeText", "Data": ", add the secret "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "API_TOKEN"}, {"Type": "NodeText", "Data": ", include "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "api.example.com"}, {"Type": "NodeText", "Data": " in its Allowed hosts, and add the variable "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "WORKSPACE"}, {"Type": "NodeText", "Data": ". The headers can then reference them 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": "20261024161816"}, "Children": [
{"Type": "NodeText", "Data": "The built-in HTTP request tool substitutes only variables in URLs, for example "},
{"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "{{vars.API_BASE}}/v1/items"},
{"Type": "NodeText", "Data": ". Secret references in HTTP headers and request bodies, and in HTTP MCP service headers, are substituted only for an allowed destination host; otherwise the placeholder remains unchanged. A stdio MCP service inherits only the kernel environment variables selected by the user."}
]},
{
"ID": "20261024161816-6xp6ngs",
"Type": "NodeParagraph",
"Properties": {
"id": "20261024161816-6xp6ngs",
"updated": "20261024161816"
},
"Children": [
{
"Type": "NodeText",
"Data": "Its configured environment entries can reference secrets and variables without HTTP host restrictions, which explicitly gives that program and its child processes the plaintext secret. Only configure this for trusted programs. Skill bodies and chat messages can use variables; secret placeholders are not expanded in AI conversations."
}
]
},
{"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": "."}]}
]
}