Commit Graph
6 Commits
Author SHA1 Message Date
thanhnv e0ab653a61 feat(mcp): add project knowledge search
CI / test (pull_request) Canceled after 0s
Complete the Project Context MCP MVP with the second read-only tool,
search_project_knowledge, so an agent can go from an issue's requirement
to the project documents that explain it, with citable evidence.

Retrieval reuses what Cowork already owns instead of adding a vector DB,
an embedding pipeline, or a new RAG framework:
- core/projects.py already defines a project's knowledge as the files at
  its workspace root, so that folder is the entire corpus. Isolation is
  structural, not a filter applied after the fact.
- core/doc_extract.py already extracts docx/pptx/xlsx/pdf/text, so the
  provider inherits format support and duplicates none of it.

Security properties:
- Read-only. The workspace root resolves from the identity, never from
  the request; project_id only verifies scope and is never routing
  authority. Symlinks escaping the workspace are dropped.
- Policy runs before provider resolution; target and access resolution
  are separate seams so a pilot local root can become an on-behalf-of
  served backend without changing the tool or the provider.
- Bounded output per detail mode with cursor pagination; no unlimited
  mode. Backend failures map to safe errors that leak no internals.

score is honest term coverage, not a fabricated similarity; the upgrade
path is documented on _score_chunk.

Adds tests/test_project_context_knowledge.py (40 tests) and
tests/test_project_context_e2e.py, which proves the two tools compose:
issue -> requirement -> related knowledge -> evidence.
2026-09-04 10:46:41 +09:00
thanhnv fecbe7cb25 fix(mcp): harden project context issue provider and prove shared audit path
- Share cursor decoding in foundation.decode_offset_cursor so both tools
  reject an invalid cursor identically, before any upstream call.
- Add regression coverage that a malformed repo slug (owner/repo/extra,
  missing owner, empty segment) is refused before any network call.
- Add evidence that BOTH project context tools inherit the shared MCP
  client audit record and untrusted-content fence, instead of each tool
  shipping its own. No audit subsystem is duplicated.
2026-09-04 10:46:17 +09:00
thanhnv bbf67d8db9 fix: address project context PR review
CI / test (pull_request) Canceled after 0s
2026-08-28 17:33:01 +09:00
taiph9 98f4a1ed77 create feature mcp-issue-context
CI / test (pull_request) Canceled after 0s
2026-08-25 22:54:56 +09:00
thanhnv 202925e6ed feat(mcp): scaffold three project context tools
CI / test (pull_request) Canceled after 0s
2026-08-20 20:50:37 +07:00
thanhnv 414eaddca3 chore(repo): initialize Cowork Local Gitea repository
CI / test (push) Canceled after 0s
2026-08-09 20:12:05 +07:00