18 Commits
Author SHA1 Message Date
alelebaandClaude Sonnet 5.5 456a19ca58 feat: add upload_file tool for images and attachments
Docker Build & Push / build-and-push (push) Successful in 14m7s
Upload base64 files to a page with MIME type auto-detection (magic bytes,
then extension). Images are inserted as image blocks and other files as
attachments at the end of the page via realtime collaboration. Request
body limit raised to 50MB (MCP_MAX_BODY_MB).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 14:09:48 -06:00
aleleba 8332dc9679 fixing the missing update to version.
Docker Build & Push / build-and-push (push) Successful in 10m55s
2026-06-11 06:05:03 +00:00
aleleba e28c6abcad Merge pull request 'fix/markdown-task-list-rendering: Render markdown checklists as task lists on update_page' (#12) from fix/markdown-task-list-rendering into main
Docker Build & Push / build-and-push (push) Has started running
2026-06-11 00:02:03 -06:00
aleleba 45958ec063 fix: render markdown checklists as task lists on update_page
Markdown checklist items (`- [ ]` / `- [x]`) were rendered as plain
bullet points instead of checkboxes. The client-side conversion pipeline
(marked -> generateJSON) dropped the checkbox because:

- tiptapExtensions did not register TaskList/TaskItem.
- marked emits `<ul><li><input type="checkbox">`, but TipTap's parseHTML
  rules only match `ul[data-type="taskList"]` / `li[data-type="taskItem"]`
  with the checked state in `data-checked`.

Register TaskList/TaskItem and add normalizeTaskLists() to rewrite marked's
checkbox markup into the format TipTap expects before generateJSON runs.
collaboration.ts now reuses markdownToTiptapJson() so update_page and
comments share the same conversion.
2026-06-11 06:00:02 +00:00
aleleba e7cf1fa022 fix: remove worker mutex and increase collab timeout to 120s
Docker Build & Push / build-and-push (push) Successful in 13m36s
2026-06-01 14:27:18 -06:00
alelebaandClaude Sonnet 4.5 8a533d028d fix: remove worker mutex and increase collab timeout to 120s
- Remove workerBusy promise chain (mutex) in src/index.ts: each
  StreamableHTTPServerTransport is stateless and per-request, so
  concurrent handling within a worker is safe. Eliminates request
  starvation when long page writes are in flight.
- Raise the Hocuspocus safety timeout in collaboration.ts from 25 s
  to 120 s, giving large documents enough time to complete the Yjs
  sync phase before the hard abort fires.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-06-01 20:24:19 +00:00
aleleba a089a92205 Merge pull request 'feat: replace StdioTransport with StreamableHTTP + Node.js cluster' (#10) from feat/streamable-http into main
Docker Build & Push / build-and-push (push) Successful in 10m44s
2026-05-30 21:16:46 -06:00
alelebaandClaude Sonnet 4.6 007c676ff2 feat: replace StdioTransport with StreamableHTTP + Node.js cluster
Integrates StreamableHTTP natively into the MCP server instead of
using StdioServerTransport. Adds Node.js cluster support so multiple
workers can handle concurrent MCP clients simultaneously.

Changes:
- src/index.ts: replace StdioServerTransport with StreamableHTTPServerTransport
  + Node.js cluster (primary forks N workers, each worker handles HTTP
  requests on :8080/mcp with a serializing mutex)
- Dockerfile: multi-stage build (node:22-slim builder + runtime)
- .gitea/workflows/docker-build.yml: CI/CD pipeline — on push to main,
  builds and pushes Docker image to gitea.p-lao.com registry

Environment variables:
- MCP_WORKERS (default: 4) — number of cluster workers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 03:15:12 +00:00
aleleba a8b40641ac feat: add comment support (list, get, create, update, delete, check_new) 2026-05-30 20:46:35 -06:00
alelebaandClaude Sonnet 4.6 c520713291 feat: add comment support (list, get, create, update, delete, check_new)
Adds 6 new MCP tools for managing Docmost page comments:
- list_comments: list all comments on a page (content as Markdown)
- get_comment: retrieve a single comment by ID
- create_comment: create page-level or inline comment (Markdown input)
- update_comment: update comment content (creator only)
- delete_comment: delete a comment (creator or space admin)
- check_new_comments: poll for new comments since a timestamp

Implementation details:
- New markdownToTiptapJson() utility in src/lib/markdown-to-json.ts
- New filterComment() in src/lib/filters.ts
- Supports inline comments, threaded replies via parentCommentId
- README updated with comment tools documentation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 02:45:43 +00:00
aleleba 73ffcfec17 feat: add filterComment function for comment responses 2026-05-30 20:39:05 -06:00
aleleba 7ff32cc6e6 feat: add markdownToTiptapJson utility for comment creation 2026-05-30 20:39:01 -06:00
aleleba 77201154d0 fix: normalize search response for Docmost 0.25+ API change
Closes #1
Closes #8

Docmost changed the search API response format in v0.25.0:
- Before: response.data.data was a direct array
- After:  response.data.data is { items: [...], meta: {...} }

The old code assumed the array format and crashed with
"items.map is not a function" on Docmost 0.25+.

Fix normalizes both formats for backwards compatibility.
2026-05-30 20:35:26 -06:00
aleleba 9be42aa0b4 chore: add @tiptap/extension-table dependency for GFM table support 2026-05-30 20:32:51 -06:00
aleleba 23fa372774 fix: add TableKit to preserve GFM tables on updatePage
Closes #2

GFM tables were corrupted when using update_page because the
Markdown → HTML (marked) → ProseMirror JSON (generateJSON) flow did not
recognize <table>, <tr>, <th>, <td> elements. Adding TableKit from
@tiptap/extension-table registers the required schema so tables round-trip
correctly in both create and update flows.

Tested on Docmost 0.70.1. Fixes PR #6 from the original repo.
2026-05-30 20:32:44 -06:00
aleleba 67e4c13102 fix: configure Image extension as block-level to match Docmost's schema
Closes #4

When update_page contained images, they were silently dropped because
the Image extension was configured with inline: true, but Docmost's
editor uses inline: false, group: "block". The Yjs merge discarded
mismatched inline image nodes.

Fixes PR #5 from the original repo.
2026-05-30 20:31:21 -06:00
Moritz Krause 493ce01254 feat: Introduce markdown converter and auth utilities, alongside various client and server-side updates and dependency changes. 2026-02-01 04:24:41 +01:00
Moritz Krause 0900260765 feat: implement initial Docmost Model Context Protocol (MCP) server for documentation management. 2026-02-01 00:05:22 +01:00