openwriter 0.8.3 → 0.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/documents.js +2 -2
- package/dist/server/mcp.js +2 -2
- package/package.json +1 -1
package/dist/server/documents.js
CHANGED
|
@@ -438,7 +438,7 @@ export function createDocument(title, content, path) {
|
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
else {
|
|
441
|
-
newDoc = { type: 'doc', content: [{ type: 'paragraph', content: [] }] };
|
|
441
|
+
newDoc = { type: 'doc', content: [{ type: 'paragraph', attrs: { id: generateNodeId() }, content: [] }] };
|
|
442
442
|
}
|
|
443
443
|
const metadata = { title: docTitle, docId: generateNodeId() };
|
|
444
444
|
setActiveDocument(newDoc, docTitle, filePath, isTemp, undefined, metadata);
|
|
@@ -489,7 +489,7 @@ export function createDocumentFile(title, path, extraMeta) {
|
|
|
489
489
|
}
|
|
490
490
|
filename = filePath.split(/[/\\]/).pop();
|
|
491
491
|
}
|
|
492
|
-
const newDoc = { type: 'doc', content: [{ type: 'paragraph', content: [] }] };
|
|
492
|
+
const newDoc = { type: 'doc', content: [{ type: 'paragraph', attrs: { id: generateNodeId() }, content: [] }] };
|
|
493
493
|
const metadata = { title: docTitle, docId: generateNodeId(), agentCreated: true, ...extraMeta };
|
|
494
494
|
const markdown = tiptapToMarkdown(newDoc, docTitle, metadata);
|
|
495
495
|
ensureDataDir();
|
package/dist/server/mcp.js
CHANGED
|
@@ -271,13 +271,13 @@ export const TOOL_REGISTRY = [
|
|
|
271
271
|
},
|
|
272
272
|
{
|
|
273
273
|
name: 'create_document',
|
|
274
|
-
description: 'Create a new
|
|
274
|
+
description: 'Create a new document. Always provide a title. By default shows a sidebar spinner — call populate_document next to deliver content and clear it. This two-step flow is REQUIRED for all content documents: create_document → populate_document. Do NOT use empty=true to skip this — empty=true is ONLY for content_type template docs (tweets, articles) that start blank and get metadata via set_metadata. If workspace is provided, the doc is automatically added to it (workspace is created if it doesn\'t exist). If container is also provided, the doc is placed inside that container (created if it doesn\'t exist).',
|
|
275
275
|
schema: {
|
|
276
276
|
title: z.string().optional().describe('Title for the new document. Defaults to "Untitled".'),
|
|
277
277
|
path: z.string().optional().describe('Absolute file path to create the document at (e.g. "C:/projects/doc.md"). If omitted, creates in ~/.openwriter/.'),
|
|
278
278
|
workspace: z.string().optional().describe('Workspace title to add this doc to. Creates the workspace if it doesn\'t exist.'),
|
|
279
279
|
container: z.string().optional().describe('Container name within the workspace (e.g. "Chapters", "Notes", "References"). Creates the container if it doesn\'t exist. Requires workspace.'),
|
|
280
|
-
empty: z.boolean().optional().describe('
|
|
280
|
+
empty: z.boolean().optional().describe('ONLY for content_type template docs (tweets, articles) that start blank. Skips the spinner and switches immediately. Do NOT set this for content documents — use the two-step flow (create_document → populate_document) instead.'),
|
|
281
281
|
content_type: z.string().optional().describe('Content type: tweet, reply, quote, article, linkedin, newsletter, or blog. Sets metadata so the doc is recognized as that type. For reply/quote, use set_metadata after creation to set the target tweet URL.'),
|
|
282
282
|
},
|
|
283
283
|
handler: async ({ title, path, workspace, container, empty, content_type }) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openwriter",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.5",
|
|
4
4
|
"description": "The open-source writing surface for AI agents. Markdown-native editor with pending change review — your agent writes, you accept or reject.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|