From b0ec9558f2401b2f25acf47c5841e90e0ffaa5c0 Mon Sep 17 00:00:00 2001 From: Emanuel Almeida Date: Sat, 31 Jan 2026 21:05:12 +0000 Subject: [PATCH] fix: Include creator in collaboratorIds for document listing Documents with empty collaboratorIds don't appear in collection sidebar. Now includes creator's userId in the array. Co-Authored-By: Claude Opus 4.5 --- CHANGELOG.md | 9 +++++++++ CLAUDE.md | 2 +- CONTINUE.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- src/index-http.ts | 4 ++-- src/index.ts | 2 +- src/server/create-server.ts | 2 +- src/tools/documents.ts | 2 +- 9 files changed, 19 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f03ab3e..1e836a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ All notable changes to this project will be documented in this file. +## [1.3.12] - 2026-01-31 + +### Fixed + +- **Document Listing:** Documents now appear in collection sidebar + - `collaboratorIds` must contain the creator's userId, not empty array + - Documents with empty `collaboratorIds` don't appear in listing + - Now uses `ARRAY[$userId]::uuid[]` to include creator + ## [1.3.11] - 2026-01-31 ### Fixed diff --git a/CLAUDE.md b/CLAUDE.md index 94341d4..7609814 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co MCP server for direct PostgreSQL access to Outline Wiki database. Follows patterns established by `mcp-desk-crm-sql-v3`. -**Version:** 1.3.11 +**Version:** 1.3.12 **Total Tools:** 164 tools across 33 modules **Production:** hub.descomplicar.pt (via SSH tunnel) diff --git a/CONTINUE.md b/CONTINUE.md index 54354a6..94e6232 100644 --- a/CONTINUE.md +++ b/CONTINUE.md @@ -1,7 +1,7 @@ # MCP Outline PostgreSQL - Continuacao de Testes **Ultima Sessao:** 2026-01-31 (actualizado) -**Versao Actual:** 1.3.11 +**Versao Actual:** 1.3.12 **Progresso:** ~95/164 tools testadas (58%) - **CÓDIGO VALIDADO** --- diff --git a/package-lock.json b/package-lock.json index 56496d2..8859233 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mcp-outline-postgresql", - "version": "1.3.11", + "version": "1.3.12", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "mcp-outline-postgresql", - "version": "1.3.11", + "version": "1.3.12", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.0.0", diff --git a/package.json b/package.json index 0f71949..ebf67a5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mcp-outline-postgresql", - "version": "1.3.11", + "version": "1.3.12", "description": "MCP Server for Outline Wiki via PostgreSQL direct access", "main": "dist/index.js", "scripts": { diff --git a/src/index-http.ts b/src/index-http.ts index 6f5f94b..7e5393a 100644 --- a/src/index-http.ts +++ b/src/index-http.ts @@ -68,7 +68,7 @@ async function main() { JSON.stringify({ status: 'ok', transport: 'streamable-http', - version: '1.3.11', + version: '1.3.12', sessions: sessions.size, stateful: STATEFUL, tools: allTools.length @@ -101,7 +101,7 @@ async function main() { // Create MCP server const server = createMcpServer(pgClient.getPool(), { name: 'mcp-outline-http', - version: '1.3.11' + version: '1.3.12' }); // Track session if stateful diff --git a/src/index.ts b/src/index.ts index 8186b61..d6ca34c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -39,7 +39,7 @@ async function main() { // Create MCP server with shared configuration const server = createMcpServer(pgClient.getPool(), { name: 'mcp-outline-postgresql', - version: '1.3.11' + version: '1.3.12' }); // Connect stdio transport diff --git a/src/server/create-server.ts b/src/server/create-server.ts index 461d87b..8e4b592 100644 --- a/src/server/create-server.ts +++ b/src/server/create-server.ts @@ -122,7 +122,7 @@ export function createMcpServer( ): Server { const server = new Server({ name: config.name || 'mcp-outline-postgresql', - version: config.version || '1.3.11' + version: config.version || '1.3.12' }); // Set capabilities (required for MCP v2.2+) diff --git a/src/tools/documents.ts b/src/tools/documents.ts index 392d61f..30531b1 100644 --- a/src/tools/documents.ts +++ b/src/tools/documents.ts @@ -249,7 +249,7 @@ const createDocument: BaseTool = { VALUES ( gen_random_uuid(), substring(md5(random()::text) from 1 for 10), - $1, $2, $3, $4, $5, $6, $7, $8, $9, NOW(), NOW(), 1, false, false, false, '{}' + $1, $2, $3, $4, $5, $6, $7, $8, $9, NOW(), NOW(), 1, false, false, false, ARRAY[$6]::uuid[] ) RETURNING id, "urlId", title, "collectionId", "publishedAt", "createdAt" `;