Commit Graph
13 Commits
Author SHA1 Message Date
Codex e7adfbe9a6 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
2026-07-05 15:04:16 +00:00
Codex 691e5aa8ea fix(mcp): pass ingest flag through service CLI
Ensure mcp_service.sh start --enable-ingest actually writes OBSIDIAN_MCP_ENABLE_INGEST=1 by forwarding the parsed flag to start_service.

Also stop the new-token command from referencing the start-only flag, and cover both CLI paths with regression tests.

Validation: python3 -m unittest discover -v; git diff --check
2026-07-05 14:58:03 +00:00
Codex b174df642f feat(mcp): queue local OpenCode ingest jobs
Add optional write-capable MCP ingest tools for chunked uploads, SHA-verified completion, and asynchronous local OpenCode wiki-ingest jobs. The tools remain disabled by default and are gated by OBSIDIAN_MCP_ENABLE_INGEST or mcp_service.sh start --enable-ingest.

Remote clients can upload files into the vault inbox, start a restricted fixed-prompt ingest job, poll job status/result, and cancel queued or running work. The implementation keeps arbitrary prompt and shell execution out of the MCP surface.

Validation: python3 -m unittest discover -v; python3 -m py_compile obsidian_wiki/mcp_ingest.py obsidian_wiki/mcp_server.py scripts/manage_mcp_service.py tests/test_mcp_ingest.py tests/test_mcp_server_remote.py tests/test_mcp_service.py; git diff --check.
2026-07-05 14:54:29 +00:00
Codex b89d141f03 fix(mcp): preserve structured file asset identifiers
Preserve curated source-registry identifiers when rebuilding the file asset index so part-number queries such as 101049 can match drawings even when the filename omits the part number.

Raise ranking for structured identifier matches above incidental substrings like timestamps, expose safe part-number fields through the MCP result payload, and allow customer-shareable engineering deliverables in the source-file MCP profile path while keeping blocked doc types enforced.

Validation: python3 -m unittest discover -v; python3 -m py_compile obsidian_wiki/file_assets.py obsidian_wiki/mcp_assets.py tests/test_file_assets.py tests/test_mcp_assets.py; git diff --check; rebuilt the configured bjd vault file index; verified HTTP MCP search_file_assets and asset resource read for 101049 图纸.
2026-07-05 13:32:05 +00:00
Codex 57b98f1979 feat: add file asset listing prompt
Expose list_file_assets so agents can browse allowed source files without relying on empty search queries.

Add a how_to_use_wiki_file_assets prompt to make the MCP purpose and workflow visible to clients that inspect prompts/resources before tools.
2026-07-05 12:25:36 +00:00
Codex a6ef696d84 refactor: rename file asset MCP service
Rename the Streamable HTTP MCP server and generated client config key from obsidian-wiki to wiki-file-assets so remote agents see the narrower file lookup purpose.

Keep existing tool names unchanged and cover the service name in tests.
2026-07-05 12:14:25 +00:00
Codex acff3c14db fix: make remote MCP service start reliably
Use the Python module entrypoint in the user service, prepare the MCP optional runtime before restart, and serve the configured vault path instead of the repo root.

Verify binary asset resources use an octet-stream MIME type and cover service vault resolution in tests.
2026-07-05 12:05:12 +00:00
Codex d543831b5e feat: print remote config on MCP service start
Make scripts/mcp_service.sh start create the token env file when missing, then start the user service and print the remote MCP URL, Authorization header, and client JSON.

Document the one-command startup flow and cover automatic token creation with tests.
2026-07-05 11:44:24 +00:00
Codex baa8c0beae refactor: consolidate MCP service scripts
Replace per-command shell wrappers with a single scripts/mcp_service.sh entrypoint that forwards subcommands to manage_mcp_service.py.

Update docs and tests so remote MCP service management stays on the consolidated command surface.
2026-07-05 11:38:49 +00:00
Codex 31b0e8dba2 feat: support remote MCP asset server
Add Streamable HTTP transport for the source-file MCP server with bearer-token auth, configurable HTTP runtime options, and user-level systemd service helpers.

Document remote client setup and cover auth/service behavior with unit tests.
2026-07-05 11:30:42 +00:00
nac 76a480a0b7 feat(mcp): serve safe source file assets
Add a stdio MCP server for searching and reading safe engineering source files from the wiki file asset index.

The implementation uses registry-backed ACL checks, engineering-file whitelisting, asset:// resource URIs, read-only SQLite access, CLI entrypoints, optional MCP packaging, and unittest coverage for search, metadata, resource reads, blocked sources, bot ACLs, and size limits.

Validation: python3 -m unittest discover -v; python3 -m py_compile obsidian_wiki/config.py obsidian_wiki/file_assets.py obsidian_wiki/mcp_assets.py obsidian_wiki/mcp_server.py obsidian_wiki/cli.py tests/test_mcp_assets.py; real BJD vault search/read smoke tests.
2026-07-05 11:10:41 +00:00
nac 777607dc29 chore(repo): establish project baseline
Track the source-of-truth code, skills, bootstrap rules, docs, and packaging files before adding new features.

Exclude local vault config, generated skill mirrors, temporary exports, virtual environments, and business data files from version control.

Validation: inspected staged file list and git ignored status before commit.
2026-07-05 11:03:40 +00:00
nac 2a3b69eaa7 docs(agent-rules): require git-backed feature commits
Add an agent rule requiring Git initialization for projects, one focused commit per feature, complete Conventional Commit messages, and status review before staging files.

Validation: inspected AGENTS.md placement and git status.
2026-07-05 10:38:05 +00:00