diff --git a/CHANGELOG.md b/CHANGELOG.md index 157452f..3161c57 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.8] - 2026-01-31 + +### Fixed + +- **Collection Sort Field:** `create_collection` now sets default `sort` value + - Was: `sort` column left NULL, causing frontend error "Cannot read properties of null (reading 'field')" + - Now: Sets `{"field": "index", "direction": "asc"}` as default + - Outline frontend requires this field to render collections + ## [1.3.7] - 2026-01-31 ### Fixed diff --git a/CLAUDE.md b/CLAUDE.md index d9cffcb..81c9d30 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.7 +**Version:** 1.3.8 **Total Tools:** 164 tools across 33 modules **Production:** hub.descomplicar.pt (via SSH tunnel) diff --git a/CONTINUE.md b/CONTINUE.md index 6c6a09b..f85fb75 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.7 +**Versao Actual:** 1.3.8 **Progresso:** ~95/164 tools testadas (58%) - **CÓDIGO VALIDADO** --- diff --git a/package-lock.json b/package-lock.json index b43f879..4c19042 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mcp-outline-postgresql", - "version": "1.3.7", + "version": "1.3.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "mcp-outline-postgresql", - "version": "1.3.7", + "version": "1.3.8", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.0.0", diff --git a/package.json b/package.json index 7817af8..124fc05 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mcp-outline-postgresql", - "version": "1.3.7", + "version": "1.3.8", "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 9d62425..586a504 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.7', + version: '1.3.8', 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.7' + version: '1.3.8' }); // Track session if stateful diff --git a/src/index.ts b/src/index.ts index 0ee2e44..78368db 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.7' + version: '1.3.8' }); // Connect stdio transport diff --git a/src/server/create-server.ts b/src/server/create-server.ts index 16d1b0f..cb55769 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.7' + version: config.version || '1.3.8' }); // Set capabilities (required for MCP v2.2+) diff --git a/src/tools/collections.ts b/src/tools/collections.ts index 9a0165d..6b4d0e7 100644 --- a/src/tools/collections.ts +++ b/src/tools/collections.ts @@ -272,12 +272,12 @@ export const collectionsTools: BaseTool[] = [ const query = ` INSERT INTO collections ( id, name, "urlId", "teamId", "createdById", description, icon, color, - permission, sharing, "maintainerApprovalRequired", index, "createdAt", "updatedAt" + permission, sharing, "maintainerApprovalRequired", index, sort, "createdAt", "updatedAt" ) - VALUES (gen_random_uuid(), $1, $2, $3, $4, $5, $6, $7, $8, $9, false, $10, NOW(), NOW()) + VALUES (gen_random_uuid(), $1, $2, $3, $4, $5, $6, $7, $8, $9, false, $10, '{"field": "index", "direction": "asc"}', NOW(), NOW()) RETURNING id, "urlId", name, description, icon, color, index, permission, - sharing, "teamId", "createdById", "createdAt", "updatedAt" + sharing, "teamId", "createdById", "createdAt", "updatedAt", sort `; const result = await pool.query(query, [