fix: Add revisionCount and content for document listing
Documents require: - revisionCount >= 1 (was 0) - content field with ProseMirror JSON structure Without these, documents don't appear in collection sidebar. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -68,7 +68,7 @@ async function main() {
|
||||
JSON.stringify({
|
||||
status: 'ok',
|
||||
transport: 'streamable-http',
|
||||
version: '1.3.12',
|
||||
version: '1.3.13',
|
||||
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.12'
|
||||
version: '1.3.13'
|
||||
});
|
||||
|
||||
// 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.12'
|
||||
version: '1.3.13'
|
||||
});
|
||||
|
||||
// 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.12'
|
||||
version: config.version || '1.3.13'
|
||||
});
|
||||
|
||||
// Set capabilities (required for MCP v2.2+)
|
||||
|
||||
@@ -244,12 +244,13 @@ const createDocument: BaseTool<CreateDocumentArgs> = {
|
||||
INSERT INTO documents (
|
||||
id, "urlId", title, text, "collectionId", "teamId", "parentDocumentId", "createdById",
|
||||
"lastModifiedById", template, "publishedAt", "createdAt", "updatedAt", version,
|
||||
"isWelcome", "fullWidth", "insightsEnabled", "collaboratorIds"
|
||||
"isWelcome", "fullWidth", "insightsEnabled", "collaboratorIds", "revisionCount", content
|
||||
)
|
||||
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, ARRAY[$6]::uuid[]
|
||||
$1, $2, $3, $4, $5, $6, $7, $8, $9, NOW(), NOW(), 1, false, false, false, ARRAY[$6]::uuid[],
|
||||
1, '{"type": "doc", "content": [{"type": "paragraph"}]}'::jsonb
|
||||
)
|
||||
RETURNING id, "urlId", title, "collectionId", "publishedAt", "createdAt"
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user