fix: Add collaboratorIds field to document creation
Outline requires collaboratorIds to be an array, not NULL. Error was: "TypeError: b.collaboratorIds is not iterable" Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,14 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [1.3.11] - 2026-01-31
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Document collaboratorIds:** Added missing `collaboratorIds` field (empty array)
|
||||
- Error: `TypeError: b.collaboratorIds is not iterable`
|
||||
- Outline expects this field to be an array, not NULL
|
||||
|
||||
## [1.3.10] - 2026-01-31
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -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.10
|
||||
**Version:** 1.3.11
|
||||
**Total Tools:** 164 tools across 33 modules
|
||||
**Production:** hub.descomplicar.pt (via SSH tunnel)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# MCP Outline PostgreSQL - Continuacao de Testes
|
||||
|
||||
**Ultima Sessao:** 2026-01-31 (actualizado)
|
||||
**Versao Actual:** 1.3.10
|
||||
**Versao Actual:** 1.3.11
|
||||
**Progresso:** ~95/164 tools testadas (58%) - **CÓDIGO VALIDADO**
|
||||
|
||||
---
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "mcp-outline-postgresql",
|
||||
"version": "1.3.10",
|
||||
"version": "1.3.11",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "mcp-outline-postgresql",
|
||||
"version": "1.3.10",
|
||||
"version": "1.3.11",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@modelcontextprotocol/sdk": "^1.0.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mcp-outline-postgresql",
|
||||
"version": "1.3.10",
|
||||
"version": "1.3.11",
|
||||
"description": "MCP Server for Outline Wiki via PostgreSQL direct access",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -68,7 +68,7 @@ async function main() {
|
||||
JSON.stringify({
|
||||
status: 'ok',
|
||||
transport: 'streamable-http',
|
||||
version: '1.3.10',
|
||||
version: '1.3.11',
|
||||
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.10'
|
||||
version: '1.3.11'
|
||||
});
|
||||
|
||||
// Track session if stateful
|
||||
|
||||
@@ -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.10'
|
||||
version: '1.3.11'
|
||||
});
|
||||
|
||||
// Connect stdio transport
|
||||
|
||||
@@ -122,7 +122,7 @@ export function createMcpServer(
|
||||
): Server {
|
||||
const server = new Server({
|
||||
name: config.name || 'mcp-outline-postgresql',
|
||||
version: config.version || '1.3.10'
|
||||
version: config.version || '1.3.11'
|
||||
});
|
||||
|
||||
// Set capabilities (required for MCP v2.2+)
|
||||
|
||||
@@ -244,12 +244,12 @@ const createDocument: BaseTool<CreateDocumentArgs> = {
|
||||
INSERT INTO documents (
|
||||
id, "urlId", title, text, "collectionId", "teamId", "parentDocumentId", "createdById",
|
||||
"lastModifiedById", template, "publishedAt", "createdAt", "updatedAt", version,
|
||||
"isWelcome", "fullWidth", "insightsEnabled"
|
||||
"isWelcome", "fullWidth", "insightsEnabled", "collaboratorIds"
|
||||
)
|
||||
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, '{}'
|
||||
)
|
||||
RETURNING id, "urlId", title, "collectionId", "publishedAt", "createdAt"
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user