fix(mcp): stage ingest uploads outside vault

Move remote MCP ingest uploads from the vault inbox to the MCP runtime staging area so uploaded files are not accepted into the vault before wiki-ingest processes them.

Reject ingest runtime roots that resolve inside the vault, and update the generated OpenCode prompt plus docs to describe uploads as temporary staging inputs.

Validation: python3 -m unittest discover -v; python3 -m py_compile obsidian_wiki/mcp_ingest.py tests/test_mcp_ingest.py; git diff --check
This commit is contained in:
Codex
2026-07-05 15:04:16 +00:00
parent 691e5aa8ea
commit e7adfbe9a6
5 changed files with 36 additions and 4 deletions
+2
View File
@@ -52,6 +52,8 @@ OBSIDIAN_MCP_PATH=/mcp
# Optional write-capable MCP ingest tools. Default is disabled.
# When enabled, remote MCP clients sharing this token can upload files and
# trigger a local `opencode run --auto` wiki-ingest job for those uploads.
# Keep this runtime root outside OBSIDIAN_VAULT_PATH; uploads are staging inputs,
# and wiki-ingest decides how sources are archived into the vault.
OBSIDIAN_MCP_ENABLE_INGEST=0
OBSIDIAN_MCP_INGEST_MAX_FILE_BYTES=104857600
OBSIDIAN_MCP_INGEST_MAX_CHUNK_BYTES=4194304