feat/docs-complete-mcp #180

Merged
haydar merged 3 commits from feat/docs-complete-mcp into develop 2026-10-30 10:37:46 +00:00
Member
No description provided.
Extend the MCP Wiki.js tool set to cover the whole documentation
workspace contract:

- wikijs.spaces.list: accessible docs spaces from stored bindings
  (docs_space_path/docs_url) — members see org + project spaces,
  guests see only the orgs/{slug}/public subtree, project spaces are
  never guest-enumerable.
- wikijs.spaces.get: one space's binding, overview path, provisioning
  status, effective capabilities, and a live probePageByPath verdict
  (found/missing/inaccessible/incomplete/error) with an honest stale
  flag for anything but found.
- wikijs.tree.list: DocsHierarchyService org/project trees with the
  same boundary + visibility filtering as the workspace endpoint;
  complete/truncated verdicts pass through — a truncated walk is
  never rendered as the full hierarchy.
- wikijs.folders.create: createFolder behind mcp.write + write:pages,
  project-space confinement with explicit traversal refusal, dwb-*
  tag refusal, and bound-root protection.
- wikijs.assets.list/get/upload: the Wiki.js 3 assets API (tree
  types=asset view, /assets get+content, raw-bytes session upload),
  confined to the org subtree with the same read:assets/write:assets
  role gates.
- wikijs.pages.list/search now return {root,results,limit,complete,
  truncated} — walked to verified exhaustion; a caller-bounded slice
  reports truncated='limit' rather than implying completeness.
- wikijs.pages.update gains expected_updated_at/expected_version as a
  documented optimistic check (no server CAS exists): a mismatch
  fails as conflict before any write.
- wikijs.pages.delete shares the Docs UI's protected-resource rules
  via DocsHierarchyService (bound roots, canonical sections, dwb-*
  markers) and refuses pages with descendants unless
  confirm_descendants recycles the whole verified subtree.

All write/delete tools emit the established mcp.mutation audit line;
new tools are container-bound in AppServiceProvider per the SDK's
has()-then-resolve contract.
- wikijs.tree.list: guests get orgs/{slug}/public as bound_root (null
  when unprovisioned) — a rebound private org root no longer leaks
  through space metadata
- wikijs.assets.get / WikiJsClient::getAssetContent: enforce the 1 MiB
  cap during transfer — streamed download with manual, host-revalidated
  redirects (provisioner cookie never leaves the Wiki.js host),
  Content-Length pre-check, and mid-stream verification; unknown or
  incorrect size serves metadata only, never bytes
- wikijs.pages.delete: recursive deletion is refused entirely — an
  unverifiable or non-empty descendant set always fails, even with
  confirm_descendants; single-page deletes unchanged
- wikijs.folders.create: project is now optional — authorized members
  can create under any writable org-subtree parent, with archived
  project subtrees still read-only
- wikijs.pages.list/search: real continuation via offset/next_offset;
  complete=false stays honest on every page
fix(mcp): same-origin asset redirect validation, bounded error reads
All checks were successful
ci / portal-php (pull_request) Successful in 6m24s
ci / openproject-spec (pull_request) Successful in 39s
ci / commit-trailers (pull_request) Successful in 8s
ci / portal-frontend (pull_request) Successful in 37s
ci / integrations-js (pull_request) Successful in 23s
ci / secret-scan (pull_request) Successful in 17s
ci / release-tests (pull_request) Successful in 1m31s
ci / openproject-rspec (pull_request) Successful in 4m39s
27f73da7c9
fix(mcp): same-origin asset redirect validation, bounded error reads
All checks were successful
ci / portal-php (pull_request) Successful in 6m24s
ci / openproject-spec (pull_request) Successful in 39s
ci / commit-trailers (pull_request) Successful in 8s
ci / portal-frontend (pull_request) Successful in 37s
ci / integrations-js (pull_request) Successful in 23s
ci / secret-scan (pull_request) Successful in 17s
ci / release-tests (pull_request) Successful in 1m31s
ci / openproject-rspec (pull_request) Successful in 4m39s
27f73da7c9
haydar merged commit f78c72fa3e into develop 2026-10-30 10:37:46 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
developing4all/devworkbase!180
No description provided.