autoblogger 0.1.15 → 0.1.17
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/README.md +136 -54
- package/dist/cli/index.js +1224 -0
- package/dist/index.d.mts +54 -8
- package/dist/index.d.ts +54 -8
- package/dist/index.js +932 -99
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +928 -99
- package/dist/index.mjs.map +1 -1
- package/dist/styles/article.d.mts +4 -4
- package/dist/styles/article.d.ts +4 -4
- package/dist/styles/article.js +4 -4
- package/dist/styles/article.js.map +1 -1
- package/dist/styles/article.mjs +4 -4
- package/dist/styles/article.mjs.map +1 -1
- package/dist/styles/autoblogger.css +165 -0
- package/dist/styles/preset.js +48 -8
- package/dist/ui.d.mts +5 -2
- package/dist/ui.d.ts +5 -2
- package/dist/ui.js +1814 -1369
- package/dist/ui.js.map +1 -1
- package/dist/ui.mjs +1734 -1290
- package/dist/ui.mjs.map +1 -1
- package/package.json +15 -2
- package/prisma/schema.prisma +4 -0
package/dist/index.d.mts
CHANGED
|
@@ -190,6 +190,9 @@ declare function createAISettingsData(prisma: any): {
|
|
|
190
190
|
autoDraftTemplate?: string | null;
|
|
191
191
|
planTemplate?: string | null;
|
|
192
192
|
expandPlanTemplate?: string | null;
|
|
193
|
+
agentTemplate?: string | null;
|
|
194
|
+
anthropicKey?: string | null;
|
|
195
|
+
openaiKey?: string | null;
|
|
193
196
|
}): Promise<any>;
|
|
194
197
|
};
|
|
195
198
|
|
|
@@ -402,54 +405,97 @@ declare function buildGeneratePrompt(options: {
|
|
|
402
405
|
rules?: string;
|
|
403
406
|
template?: string | null;
|
|
404
407
|
wordCount?: number;
|
|
408
|
+
styleExamples?: string;
|
|
405
409
|
}): string;
|
|
406
410
|
/**
|
|
407
411
|
* Build a system prompt for chat interactions.
|
|
408
412
|
*/
|
|
409
413
|
declare function buildChatPrompt(options: {
|
|
410
414
|
chatRules?: string;
|
|
415
|
+
rules?: string;
|
|
411
416
|
template?: string | null;
|
|
412
417
|
essayContext?: {
|
|
413
418
|
title: string;
|
|
414
419
|
subtitle?: string;
|
|
415
420
|
markdown: string;
|
|
416
421
|
} | null;
|
|
422
|
+
styleExamples?: string;
|
|
423
|
+
}): string;
|
|
424
|
+
/**
|
|
425
|
+
* Build a system prompt for expanding a plan into a full essay.
|
|
426
|
+
*/
|
|
427
|
+
declare function buildExpandPlanPrompt(options: {
|
|
428
|
+
rules?: string;
|
|
429
|
+
template?: string | null;
|
|
430
|
+
plan: string;
|
|
431
|
+
styleExamples?: string;
|
|
432
|
+
}): string;
|
|
433
|
+
/**
|
|
434
|
+
* Build a system prompt for plan/outline generation.
|
|
435
|
+
*/
|
|
436
|
+
declare function buildPlanPrompt(options: {
|
|
437
|
+
planRules?: string;
|
|
438
|
+
template?: string | null;
|
|
439
|
+
styleExamples?: string;
|
|
440
|
+
}): string;
|
|
441
|
+
/**
|
|
442
|
+
* Build a system prompt for text rewriting.
|
|
443
|
+
*/
|
|
444
|
+
declare function buildRewritePrompt(options: {
|
|
445
|
+
rewriteRules?: string;
|
|
446
|
+
rules?: string;
|
|
447
|
+
template?: string | null;
|
|
448
|
+
styleExamples?: string;
|
|
449
|
+
}): string;
|
|
450
|
+
/**
|
|
451
|
+
* Build a system prompt for auto-drafting essays from news articles.
|
|
452
|
+
*/
|
|
453
|
+
declare function buildAutoDraftPrompt(options: {
|
|
454
|
+
autoDraftRules?: string;
|
|
455
|
+
rules?: string;
|
|
456
|
+
template?: string | null;
|
|
457
|
+
wordCount?: number;
|
|
458
|
+
styleExamples?: string;
|
|
459
|
+
topicName?: string;
|
|
460
|
+
articleTitle?: string;
|
|
461
|
+
articleSummary?: string;
|
|
462
|
+
articleUrl?: string;
|
|
417
463
|
}): string;
|
|
418
464
|
|
|
419
465
|
/**
|
|
420
466
|
* Default template for essay generation.
|
|
421
467
|
* Placeholders: {{RULES}}, {{WORD_COUNT}}
|
|
422
468
|
*/
|
|
423
|
-
declare const DEFAULT_GENERATE_TEMPLATE = "
|
|
469
|
+
declare const DEFAULT_GENERATE_TEMPLATE = "<system>\n<role>Expert essay writer creating engaging, thoughtful content</role>\n\n<critical>\nALWAYS output a complete essay. NEVER respond conversationally.\n- Do NOT ask questions or request clarification\n- Do NOT say \"Here is your essay\" or similar preamble\n- Do NOT explain what you're going to write\n- If the prompt is vague, make creative choices and proceed\n- Output ONLY the essay in markdown format\n</critical>\n\n<rules>\n{{RULES}}\n</rules>\n\n<constraints>\n<word_count>{{WORD_COUNT}}</word_count>\n</constraints>\n\n<output_format>\nCRITICAL: Your response MUST start with exactly this format:\n\nLine 1: # [Your Title Here]\nLine 2: *[Your subtitle here]*\nLine 3: (blank line)\nLine 4+: Essay body in markdown\n\n<title_guidelines>\n- Be SPECIFIC, not generic (avoid \"The Power of\", \"Why X Matters\", \"A Guide to\")\n- Include a concrete detail, angle, or unexpected element\n- Create curiosity or make a bold claim\n- 5-12 words ideal\n</title_guidelines>\n\n<subtitle_guidelines>\n- One sentence that hooks the reader\n- Tease the main argument or reveal a key insight\n- Create tension, curiosity, or promise value\n- Make readers want to continue reading\n</subtitle_guidelines>\n</output_format>\n</system>";
|
|
424
470
|
/**
|
|
425
471
|
* Default template for chat interactions.
|
|
426
472
|
* Placeholders: {{CHAT_RULES}}, {{ESSAY_CONTEXT}}
|
|
427
473
|
*/
|
|
428
|
-
declare const DEFAULT_CHAT_TEMPLATE = "
|
|
474
|
+
declare const DEFAULT_CHAT_TEMPLATE = "<system>\n<role>Helpful writing assistant for essay creation and editing</role>\n\n<rules>\n{{CHAT_RULES}}\n</rules>\n\n<context>\n{{ESSAY_CONTEXT}}\n</context>\n\n<behavior>\n- Be concise and actionable\n- When suggesting edits, be specific about what to change\n- Match the author's voice and style when writing\n- Ask clarifying questions if the request is ambiguous\n</behavior>\n</system>";
|
|
429
475
|
/**
|
|
430
476
|
* Default template for text rewriting.
|
|
431
477
|
* Placeholders: {{REWRITE_RULES}}
|
|
432
478
|
*/
|
|
433
|
-
declare const DEFAULT_REWRITE_TEMPLATE = "
|
|
479
|
+
declare const DEFAULT_REWRITE_TEMPLATE = "<system>\n<role>Writing assistant that improves text quality</role>\n\n<rules>\n{{REWRITE_RULES}}\n</rules>\n\n<behavior>\n- Preserve the original meaning exactly\n- Improve clarity, flow, and readability\n- Fix grammar and punctuation issues\n- Maintain the author's voice and tone\n- Output only the improved text, no explanations\n</behavior>\n</system>";
|
|
434
480
|
/**
|
|
435
481
|
* Default template for auto-drafting from news articles.
|
|
436
482
|
* Placeholders: {{AUTO_DRAFT_RULES}}, {{RULES}}, {{AUTO_DRAFT_WORD_COUNT}}
|
|
437
483
|
*/
|
|
438
|
-
declare const DEFAULT_AUTO_DRAFT_TEMPLATE = "
|
|
484
|
+
declare const DEFAULT_AUTO_DRAFT_TEMPLATE = "<system>\n<role>Expert essay writer creating engaging content from news articles</role>\n\n<auto_draft_rules>\n{{AUTO_DRAFT_RULES}}\n</auto_draft_rules>\n\n<writing_rules>\n{{RULES}}\n</writing_rules>\n\n<constraints>\n<word_count>{{AUTO_DRAFT_WORD_COUNT}}</word_count>\n</constraints>\n\n<output_format>\nCRITICAL: Your response MUST start with exactly this format:\n\nLine 1: # [Your Title Here]\nLine 2: *[Your subtitle here]*\nLine 3: (blank line)\nLine 4+: Essay body in markdown\n\n<title_guidelines>\n- Be SPECIFIC about the news angle, not generic\n- Include a concrete detail or unexpected element\n- Create curiosity or make a bold claim\n- 5-12 words ideal\n</title_guidelines>\n\n<subtitle_guidelines>\n- One sentence that hooks the reader\n- Tease the main argument or unique perspective\n- Create tension, curiosity, or promise value\n</subtitle_guidelines>\n</output_format>\n</system>";
|
|
439
485
|
/**
|
|
440
486
|
* Default template for essay outline generation.
|
|
441
487
|
* Placeholders: {{PLAN_RULES}}, {{STYLE_EXAMPLES}}
|
|
442
488
|
*/
|
|
443
|
-
declare const DEFAULT_PLAN_TEMPLATE = "
|
|
489
|
+
declare const DEFAULT_PLAN_TEMPLATE = "<system>\n<role>Writing assistant that creates essay outlines</role>\n\n<critical>\nWrap your ENTIRE response in <plan> tags. Output NOTHING outside the tags.\n</critical>\n\n<rules>\n{{PLAN_RULES}}\n</rules>\n\n<style_reference>\n{{STYLE_EXAMPLES}}\n</style_reference>\n</system>";
|
|
444
490
|
/**
|
|
445
491
|
* Default rules for plan generation format.
|
|
446
492
|
*/
|
|
447
|
-
declare const DEFAULT_PLAN_RULES = "
|
|
493
|
+
declare const DEFAULT_PLAN_RULES = "<format>\nSTRICT LIMIT: Maximum 3 bullets per section. Most sections should have 1-2 bullets.\n\n<plan>\n# Essay Title\n*One-line subtitle*\n\n## Section Name\n- Key point\n\n## Section Name\n- Key point\n- Another point\n\n## Section Name\n- Key point\n</plan>\n</format>\n\n<constraints>\n- 4-6 section headings (## lines)\n- 1-3 bullets per section \u2014 NEVER 4 or more\n- Bullets are short phrases, not sentences\n- No prose, no paragraphs, no explanations\n- When revising, output the complete updated plan\n</constraints>\n\n<title_guidelines>\n- Be SPECIFIC about the essay's angle\n- Include a concrete detail or unexpected element\n- Avoid generic patterns like \"The Power of\", \"Why X Matters\"\n- 5-12 words ideal\n</title_guidelines>\n\n<subtitle_guidelines>\n- One sentence that previews the main argument\n- Create curiosity or make a bold claim\n</subtitle_guidelines>";
|
|
448
494
|
/**
|
|
449
495
|
* Default template for expanding outlines into full essays.
|
|
450
496
|
* Placeholders: {{RULES}}, {{STYLE_EXAMPLES}}, {{PLAN}}
|
|
451
497
|
*/
|
|
452
|
-
declare const DEFAULT_EXPAND_PLAN_TEMPLATE = "
|
|
498
|
+
declare const DEFAULT_EXPAND_PLAN_TEMPLATE = "<system>\n<role>Writing assistant that expands essay outlines into full drafts</role>\n\n<writing_rules>\n{{RULES}}\n</writing_rules>\n\n<style_reference>\n{{STYLE_EXAMPLES}}\n</style_reference>\n\n<plan_to_expand>\n{{PLAN}}\n</plan_to_expand>\n\n<output_format>\nCRITICAL: Your response MUST start with exactly this format:\n\nLine 1: # [Title from plan, refined if needed]\nLine 2: *[Subtitle from plan, refined if needed]*\nLine 3: (blank line)\nLine 4+: Essay body with ## section headings\n\n<requirements>\n- Use the section headers from the plan as H2 headings\n- Expand each section's bullet points into full paragraphs\n- Match the author's voice and style from the examples\n- Output ONLY markdown \u2014 no preamble, no \"Here is...\", no explanations\n</requirements>\n\n<title_refinement>\nIf the plan title is generic, improve it to be:\n- More specific and concrete\n- Curiosity-inducing or bold\n- 5-12 words\n</title_refinement>\n</output_format>\n</system>";
|
|
453
499
|
|
|
454
500
|
/**
|
|
455
501
|
* Format a date for display
|
|
@@ -536,4 +582,4 @@ declare function applyCommentMarks(editor: Editor, comments: CommentWithUser[]):
|
|
|
536
582
|
*/
|
|
537
583
|
declare function scrollToComment(editor: Editor, commentId: string): void;
|
|
538
584
|
|
|
539
|
-
export { type AIModel, AI_MODELS, type AutobloggerServer as Autoblogger, type AutobloggerServerConfig as AutobloggerConfig, type BaseCrud, CommentMark, type CommentWithUser, type CreateCommentData, type CrudOptions, type CustomFieldConfig, type CustomFieldProps, DEFAULT_AUTO_DRAFT_TEMPLATE, DEFAULT_CHAT_TEMPLATE, DEFAULT_EXPAND_PLAN_TEMPLATE, DEFAULT_GENERATE_TEMPLATE, DEFAULT_PLAN_RULES, DEFAULT_PLAN_TEMPLATE, DEFAULT_REWRITE_TEMPLATE, Post, type SelectionState, type Session, type StylesConfig, addCommentMark, applyCommentMarks, buildChatPrompt, buildGeneratePrompt, canDeleteComment, canEditComment, createAPIHandler, createAutoblogger, createCommentsClient, createCrudData, formatDate, getDefaultModel, getModel, removeCommentMark, scrollToComment, truncate, validateSchema };
|
|
585
|
+
export { type AIModel, AI_MODELS, type AutobloggerServer as Autoblogger, type AutobloggerServerConfig as AutobloggerConfig, type BaseCrud, CommentMark, type CommentWithUser, type CreateCommentData, type CrudOptions, type CustomFieldConfig, type CustomFieldProps, DEFAULT_AUTO_DRAFT_TEMPLATE, DEFAULT_CHAT_TEMPLATE, DEFAULT_EXPAND_PLAN_TEMPLATE, DEFAULT_GENERATE_TEMPLATE, DEFAULT_PLAN_RULES, DEFAULT_PLAN_TEMPLATE, DEFAULT_REWRITE_TEMPLATE, Post, type SelectionState, type Session, type StylesConfig, addCommentMark, applyCommentMarks, buildAutoDraftPrompt, buildChatPrompt, buildExpandPlanPrompt, buildGeneratePrompt, buildPlanPrompt, buildRewritePrompt, canDeleteComment, canEditComment, createAPIHandler, createAutoblogger, createCommentsClient, createCrudData, formatDate, getDefaultModel, getModel, removeCommentMark, scrollToComment, truncate, validateSchema };
|
package/dist/index.d.ts
CHANGED
|
@@ -190,6 +190,9 @@ declare function createAISettingsData(prisma: any): {
|
|
|
190
190
|
autoDraftTemplate?: string | null;
|
|
191
191
|
planTemplate?: string | null;
|
|
192
192
|
expandPlanTemplate?: string | null;
|
|
193
|
+
agentTemplate?: string | null;
|
|
194
|
+
anthropicKey?: string | null;
|
|
195
|
+
openaiKey?: string | null;
|
|
193
196
|
}): Promise<any>;
|
|
194
197
|
};
|
|
195
198
|
|
|
@@ -402,54 +405,97 @@ declare function buildGeneratePrompt(options: {
|
|
|
402
405
|
rules?: string;
|
|
403
406
|
template?: string | null;
|
|
404
407
|
wordCount?: number;
|
|
408
|
+
styleExamples?: string;
|
|
405
409
|
}): string;
|
|
406
410
|
/**
|
|
407
411
|
* Build a system prompt for chat interactions.
|
|
408
412
|
*/
|
|
409
413
|
declare function buildChatPrompt(options: {
|
|
410
414
|
chatRules?: string;
|
|
415
|
+
rules?: string;
|
|
411
416
|
template?: string | null;
|
|
412
417
|
essayContext?: {
|
|
413
418
|
title: string;
|
|
414
419
|
subtitle?: string;
|
|
415
420
|
markdown: string;
|
|
416
421
|
} | null;
|
|
422
|
+
styleExamples?: string;
|
|
423
|
+
}): string;
|
|
424
|
+
/**
|
|
425
|
+
* Build a system prompt for expanding a plan into a full essay.
|
|
426
|
+
*/
|
|
427
|
+
declare function buildExpandPlanPrompt(options: {
|
|
428
|
+
rules?: string;
|
|
429
|
+
template?: string | null;
|
|
430
|
+
plan: string;
|
|
431
|
+
styleExamples?: string;
|
|
432
|
+
}): string;
|
|
433
|
+
/**
|
|
434
|
+
* Build a system prompt for plan/outline generation.
|
|
435
|
+
*/
|
|
436
|
+
declare function buildPlanPrompt(options: {
|
|
437
|
+
planRules?: string;
|
|
438
|
+
template?: string | null;
|
|
439
|
+
styleExamples?: string;
|
|
440
|
+
}): string;
|
|
441
|
+
/**
|
|
442
|
+
* Build a system prompt for text rewriting.
|
|
443
|
+
*/
|
|
444
|
+
declare function buildRewritePrompt(options: {
|
|
445
|
+
rewriteRules?: string;
|
|
446
|
+
rules?: string;
|
|
447
|
+
template?: string | null;
|
|
448
|
+
styleExamples?: string;
|
|
449
|
+
}): string;
|
|
450
|
+
/**
|
|
451
|
+
* Build a system prompt for auto-drafting essays from news articles.
|
|
452
|
+
*/
|
|
453
|
+
declare function buildAutoDraftPrompt(options: {
|
|
454
|
+
autoDraftRules?: string;
|
|
455
|
+
rules?: string;
|
|
456
|
+
template?: string | null;
|
|
457
|
+
wordCount?: number;
|
|
458
|
+
styleExamples?: string;
|
|
459
|
+
topicName?: string;
|
|
460
|
+
articleTitle?: string;
|
|
461
|
+
articleSummary?: string;
|
|
462
|
+
articleUrl?: string;
|
|
417
463
|
}): string;
|
|
418
464
|
|
|
419
465
|
/**
|
|
420
466
|
* Default template for essay generation.
|
|
421
467
|
* Placeholders: {{RULES}}, {{WORD_COUNT}}
|
|
422
468
|
*/
|
|
423
|
-
declare const DEFAULT_GENERATE_TEMPLATE = "
|
|
469
|
+
declare const DEFAULT_GENERATE_TEMPLATE = "<system>\n<role>Expert essay writer creating engaging, thoughtful content</role>\n\n<critical>\nALWAYS output a complete essay. NEVER respond conversationally.\n- Do NOT ask questions or request clarification\n- Do NOT say \"Here is your essay\" or similar preamble\n- Do NOT explain what you're going to write\n- If the prompt is vague, make creative choices and proceed\n- Output ONLY the essay in markdown format\n</critical>\n\n<rules>\n{{RULES}}\n</rules>\n\n<constraints>\n<word_count>{{WORD_COUNT}}</word_count>\n</constraints>\n\n<output_format>\nCRITICAL: Your response MUST start with exactly this format:\n\nLine 1: # [Your Title Here]\nLine 2: *[Your subtitle here]*\nLine 3: (blank line)\nLine 4+: Essay body in markdown\n\n<title_guidelines>\n- Be SPECIFIC, not generic (avoid \"The Power of\", \"Why X Matters\", \"A Guide to\")\n- Include a concrete detail, angle, or unexpected element\n- Create curiosity or make a bold claim\n- 5-12 words ideal\n</title_guidelines>\n\n<subtitle_guidelines>\n- One sentence that hooks the reader\n- Tease the main argument or reveal a key insight\n- Create tension, curiosity, or promise value\n- Make readers want to continue reading\n</subtitle_guidelines>\n</output_format>\n</system>";
|
|
424
470
|
/**
|
|
425
471
|
* Default template for chat interactions.
|
|
426
472
|
* Placeholders: {{CHAT_RULES}}, {{ESSAY_CONTEXT}}
|
|
427
473
|
*/
|
|
428
|
-
declare const DEFAULT_CHAT_TEMPLATE = "
|
|
474
|
+
declare const DEFAULT_CHAT_TEMPLATE = "<system>\n<role>Helpful writing assistant for essay creation and editing</role>\n\n<rules>\n{{CHAT_RULES}}\n</rules>\n\n<context>\n{{ESSAY_CONTEXT}}\n</context>\n\n<behavior>\n- Be concise and actionable\n- When suggesting edits, be specific about what to change\n- Match the author's voice and style when writing\n- Ask clarifying questions if the request is ambiguous\n</behavior>\n</system>";
|
|
429
475
|
/**
|
|
430
476
|
* Default template for text rewriting.
|
|
431
477
|
* Placeholders: {{REWRITE_RULES}}
|
|
432
478
|
*/
|
|
433
|
-
declare const DEFAULT_REWRITE_TEMPLATE = "
|
|
479
|
+
declare const DEFAULT_REWRITE_TEMPLATE = "<system>\n<role>Writing assistant that improves text quality</role>\n\n<rules>\n{{REWRITE_RULES}}\n</rules>\n\n<behavior>\n- Preserve the original meaning exactly\n- Improve clarity, flow, and readability\n- Fix grammar and punctuation issues\n- Maintain the author's voice and tone\n- Output only the improved text, no explanations\n</behavior>\n</system>";
|
|
434
480
|
/**
|
|
435
481
|
* Default template for auto-drafting from news articles.
|
|
436
482
|
* Placeholders: {{AUTO_DRAFT_RULES}}, {{RULES}}, {{AUTO_DRAFT_WORD_COUNT}}
|
|
437
483
|
*/
|
|
438
|
-
declare const DEFAULT_AUTO_DRAFT_TEMPLATE = "
|
|
484
|
+
declare const DEFAULT_AUTO_DRAFT_TEMPLATE = "<system>\n<role>Expert essay writer creating engaging content from news articles</role>\n\n<auto_draft_rules>\n{{AUTO_DRAFT_RULES}}\n</auto_draft_rules>\n\n<writing_rules>\n{{RULES}}\n</writing_rules>\n\n<constraints>\n<word_count>{{AUTO_DRAFT_WORD_COUNT}}</word_count>\n</constraints>\n\n<output_format>\nCRITICAL: Your response MUST start with exactly this format:\n\nLine 1: # [Your Title Here]\nLine 2: *[Your subtitle here]*\nLine 3: (blank line)\nLine 4+: Essay body in markdown\n\n<title_guidelines>\n- Be SPECIFIC about the news angle, not generic\n- Include a concrete detail or unexpected element\n- Create curiosity or make a bold claim\n- 5-12 words ideal\n</title_guidelines>\n\n<subtitle_guidelines>\n- One sentence that hooks the reader\n- Tease the main argument or unique perspective\n- Create tension, curiosity, or promise value\n</subtitle_guidelines>\n</output_format>\n</system>";
|
|
439
485
|
/**
|
|
440
486
|
* Default template for essay outline generation.
|
|
441
487
|
* Placeholders: {{PLAN_RULES}}, {{STYLE_EXAMPLES}}
|
|
442
488
|
*/
|
|
443
|
-
declare const DEFAULT_PLAN_TEMPLATE = "
|
|
489
|
+
declare const DEFAULT_PLAN_TEMPLATE = "<system>\n<role>Writing assistant that creates essay outlines</role>\n\n<critical>\nWrap your ENTIRE response in <plan> tags. Output NOTHING outside the tags.\n</critical>\n\n<rules>\n{{PLAN_RULES}}\n</rules>\n\n<style_reference>\n{{STYLE_EXAMPLES}}\n</style_reference>\n</system>";
|
|
444
490
|
/**
|
|
445
491
|
* Default rules for plan generation format.
|
|
446
492
|
*/
|
|
447
|
-
declare const DEFAULT_PLAN_RULES = "
|
|
493
|
+
declare const DEFAULT_PLAN_RULES = "<format>\nSTRICT LIMIT: Maximum 3 bullets per section. Most sections should have 1-2 bullets.\n\n<plan>\n# Essay Title\n*One-line subtitle*\n\n## Section Name\n- Key point\n\n## Section Name\n- Key point\n- Another point\n\n## Section Name\n- Key point\n</plan>\n</format>\n\n<constraints>\n- 4-6 section headings (## lines)\n- 1-3 bullets per section \u2014 NEVER 4 or more\n- Bullets are short phrases, not sentences\n- No prose, no paragraphs, no explanations\n- When revising, output the complete updated plan\n</constraints>\n\n<title_guidelines>\n- Be SPECIFIC about the essay's angle\n- Include a concrete detail or unexpected element\n- Avoid generic patterns like \"The Power of\", \"Why X Matters\"\n- 5-12 words ideal\n</title_guidelines>\n\n<subtitle_guidelines>\n- One sentence that previews the main argument\n- Create curiosity or make a bold claim\n</subtitle_guidelines>";
|
|
448
494
|
/**
|
|
449
495
|
* Default template for expanding outlines into full essays.
|
|
450
496
|
* Placeholders: {{RULES}}, {{STYLE_EXAMPLES}}, {{PLAN}}
|
|
451
497
|
*/
|
|
452
|
-
declare const DEFAULT_EXPAND_PLAN_TEMPLATE = "
|
|
498
|
+
declare const DEFAULT_EXPAND_PLAN_TEMPLATE = "<system>\n<role>Writing assistant that expands essay outlines into full drafts</role>\n\n<writing_rules>\n{{RULES}}\n</writing_rules>\n\n<style_reference>\n{{STYLE_EXAMPLES}}\n</style_reference>\n\n<plan_to_expand>\n{{PLAN}}\n</plan_to_expand>\n\n<output_format>\nCRITICAL: Your response MUST start with exactly this format:\n\nLine 1: # [Title from plan, refined if needed]\nLine 2: *[Subtitle from plan, refined if needed]*\nLine 3: (blank line)\nLine 4+: Essay body with ## section headings\n\n<requirements>\n- Use the section headers from the plan as H2 headings\n- Expand each section's bullet points into full paragraphs\n- Match the author's voice and style from the examples\n- Output ONLY markdown \u2014 no preamble, no \"Here is...\", no explanations\n</requirements>\n\n<title_refinement>\nIf the plan title is generic, improve it to be:\n- More specific and concrete\n- Curiosity-inducing or bold\n- 5-12 words\n</title_refinement>\n</output_format>\n</system>";
|
|
453
499
|
|
|
454
500
|
/**
|
|
455
501
|
* Format a date for display
|
|
@@ -536,4 +582,4 @@ declare function applyCommentMarks(editor: Editor, comments: CommentWithUser[]):
|
|
|
536
582
|
*/
|
|
537
583
|
declare function scrollToComment(editor: Editor, commentId: string): void;
|
|
538
584
|
|
|
539
|
-
export { type AIModel, AI_MODELS, type AutobloggerServer as Autoblogger, type AutobloggerServerConfig as AutobloggerConfig, type BaseCrud, CommentMark, type CommentWithUser, type CreateCommentData, type CrudOptions, type CustomFieldConfig, type CustomFieldProps, DEFAULT_AUTO_DRAFT_TEMPLATE, DEFAULT_CHAT_TEMPLATE, DEFAULT_EXPAND_PLAN_TEMPLATE, DEFAULT_GENERATE_TEMPLATE, DEFAULT_PLAN_RULES, DEFAULT_PLAN_TEMPLATE, DEFAULT_REWRITE_TEMPLATE, Post, type SelectionState, type Session, type StylesConfig, addCommentMark, applyCommentMarks, buildChatPrompt, buildGeneratePrompt, canDeleteComment, canEditComment, createAPIHandler, createAutoblogger, createCommentsClient, createCrudData, formatDate, getDefaultModel, getModel, removeCommentMark, scrollToComment, truncate, validateSchema };
|
|
585
|
+
export { type AIModel, AI_MODELS, type AutobloggerServer as Autoblogger, type AutobloggerServerConfig as AutobloggerConfig, type BaseCrud, CommentMark, type CommentWithUser, type CreateCommentData, type CrudOptions, type CustomFieldConfig, type CustomFieldProps, DEFAULT_AUTO_DRAFT_TEMPLATE, DEFAULT_CHAT_TEMPLATE, DEFAULT_EXPAND_PLAN_TEMPLATE, DEFAULT_GENERATE_TEMPLATE, DEFAULT_PLAN_RULES, DEFAULT_PLAN_TEMPLATE, DEFAULT_REWRITE_TEMPLATE, Post, type SelectionState, type Session, type StylesConfig, addCommentMark, applyCommentMarks, buildAutoDraftPrompt, buildChatPrompt, buildExpandPlanPrompt, buildGeneratePrompt, buildPlanPrompt, buildRewritePrompt, canDeleteComment, canEditComment, createAPIHandler, createAutoblogger, createCommentsClient, createCrudData, formatDate, getDefaultModel, getModel, removeCommentMark, scrollToComment, truncate, validateSchema };
|