Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

9.2 KB
Raw Blame
{
	"ID": "20260804185003-secvr04",
	"Spec": "2",
	"Type": "NodeDocument",
	"Properties": {
		"id": "20260804185003-secvr04",
		"title": "シークレットと変数",
		"type": "doc",
		"updated": "20261024164212"
	},
	"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": "20261024164212"}, "Children": [{"Type": "NodeText", "Data": "設定"}]},
		{"ID": "20260804224304-secja04", "Type": "NodeParagraph", "Properties": {"id": "20260804224304-secja04", "updated": "20261024164212"}, "Children": [
				{"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "設定"},
				{"Type": "NodeText", "Data": " - "},
				{"Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "シークレットと変数"},
				{"Type": "NodeText", "Data": " で追加、編集、削除できます。各項目には名前と値があり、シークレットには許可するホストもあります。"},
				{"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "api.example.com"},
				{"Type": "NodeText", "Data": " のようにプロトコルやポートを含まない完全なホスト名を、カンマ、空白、セミコロンで区切って入力します。"}
			]},
		{
			"ID": "20261024164212-h4nh7uw",
			"Type": "NodeParagraph",
			"Properties": {
				"id": "20261024164212-h4nh7uw",
				"updated": "20261024164212"
			},
			"Children": [
				{
					"Type": "NodeText",
					"Data": "大文字小文字を区別せず完全一致で照合し、サブドメインは自動的に許可されません。空のリストでは、すべての送信 HTTP リクエストでシークレットの展開が無効になります。変数にホスト制限はありません。すべての参照形式に対応するため、名前には半角英字、数字、アンダースコアを使い、数字から始めないことをお勧めします。"
				}
			]
		},
		{"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": "20261024161816"}, "Children": [{"Type": "NodeText", "Data": "使用例"}]},
		{"ID": "20260804224309-secja09", "Type": "NodeParagraph", "Properties": {"id": "20260804224309-secja09", "updated": "20261016112115"}, "Children": [{"Type": "NodeText", "Data": "たとえば、HTTP MCP サービスの URL が "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "https://api.example.com"}, {"Type": "NodeText", "Data": " の場合、シークレット "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "API_TOKEN"}, {"Type": "NodeText", "Data": " を追加し、許可するホストに "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "api.example.com"}, {"Type": "NodeText", "Data": " を登録します。変数 "}, {"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "WORKSPACE"}, {"Type": "NodeText", "Data": " も追加すると、ヘッダーで次のように参照できます。"}]},
		{"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": "20261024161816"}, "Children": [
				{"Type": "NodeText", "Data": "組み込み HTTP リクエストツールの URL では、"},
				{"Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "{{vars.API_BASE}}/v1/items"},
				{"Type": "NodeText", "Data": " のように変数だけが展開されます。HTTP ヘッダー、リクエスト本文、HTTP MCP サービスのヘッダー内のシークレットは、宛先ホストが許可されている場合だけ展開され、それ以外ではプレースホルダーが残ります。"}
			]},
		{
			"ID": "20261024161816-16hycbl",
			"Type": "NodeParagraph",
			"Properties": {
				"id": "20261024161816-16hycbl",
				"updated": "20261024161816"
			},
			"Children": [
				{
					"Type": "NodeText",
					"Data": "stdio MCP サービスはユーザーが選択したカーネル環境変数だけを継承します。設定する環境変数の項目では、HTTP のホスト制限なしにシークレットと変数を参照できます。これはプログラムとその子プロセスに平文のシークレットを渡す明示的な許可になるため、信頼するプログラムにだけ設定してください。スキル本文と会話メッセージでは変数を使用できますが、シークレットのプレースホルダーは AI の会話内では展開されません。"
				}
			]
		},
		{"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": " を参照してください。"}]}
	]
}