Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ jobs:
python -m pip install --upgrade pip
pip install -e .
pip install pyinstaller uvicorn
- name: Set frontend package version
run: |
VERSION="${{ env.RELEASE_VERSION }}"
VERSION_CLEAN="${VERSION#v}"
python -c "import json; p='src/frontend/package.json'; d=json.load(open(p)); d['version']='${VERSION_CLEAN}'; json.dump(d, open(p, 'w'), indent=2)"
- name: Build Frontend
run: |
cd src/frontend
npm ci
npm run build
Expand Down Expand Up @@ -151,6 +158,13 @@ jobs:
python -m pip install --upgrade pip
pip install -e .
pip install pyinstaller uvicorn
- name: Set frontend package version
run: |
VERSION="${{ env.RELEASE_VERSION }}"
VERSION_CLEAN="${VERSION#v}"
python -c "import json; p='src/frontend/package.json'; d=json.load(open(p)); d['version']='${VERSION_CLEAN}'; json.dump(d, open(p, 'w'), indent=2)"
- name: Build Frontend
run: |
cd src/frontend
npm ci
npm run build
Expand Down
34 changes: 30 additions & 4 deletions resources/config/instructions.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@
"- After major milestones, it is acceptable to pause and ask whether the user wants to continue unless the user asked for mostly autonomous progress.",
"",
"CORE TOOLS:",
"- call_writing_llm: Use this whenever new story prose, new scene text, or any other fresh narrative content must be written. This tool is stateless: never assume the WRITING LLM knows chapter order, chapter IDs, or current chapter content unless you pass that data in this call. Set write_mode='append' to add to the end of a chapter, 'replace' to overwrite, 'insert_at_marker' to insert at ~~~, or omit write_mode to get text without writing. For append continuity, provide preceding_content with the prose immediately before the insertion point when available; if omitted, the backend auto-fills it from the target chapter tail. Provide only the parameters shown in the active function schema.",
"- call_writing_llm: Use this whenever new story prose, new scene text, or any other fresh narrative content must be written. This tool is stateless: never assume the WRITING LLM knows chapter order, chapter IDs, or current chapter content unless you pass that data in this call. Set write_mode='append' to add to the end of a chapter, 'replace' to swap out a specific passage (provide replace_target with the exact text to replace — first occurrence only), 'replace_all' to REPLACE THE COMPLETE EXISTING CONTENT of the chapter/draft (all prior text is permanently overwritten — use only for full rewrites), 'insert_at_marker' to insert at ~~~, or omit write_mode to get text without writing. For append continuity, provide preceding_content with the prose immediately before the insertion point when available; if omitted, the backend auto-fills it from the target chapter tail. Provide only the parameters shown in the active function schema.",
"- call_editing_assistant: Use this ONLY when existing prose in the active writing unit must be corrected, refined, rewritten, or structurally revised. The task argument must always reference actual stored project text.",
"- get_project_overview: List the current structure with IDs for the active project. This overview omits per-unit notes by default; request them when needed.",
"- get_project_overview: List the current structure with IDs for the active project. This overview includes per-unit notes by default; omit them only when the overview must stay brief.",
"- get_story_metadata / update_story_metadata: Maintain story-level metadata (title, summary, tags, notes, conflicts when present). Prefer *_patch arguments (summary_patch, notes_patch, tags_patch, conflicts_patch) for partial edits so existing content is preserved unless explicit full replacement is intended. These are the only story-metadata tools; get_story_summary and set_story_tags no longer exist as separate tools.",
"- get_chapter_metadata / update_chapter_metadata / get_chapter_summaries / write_chapter_summary / sync_summary: Maintain chapter-level metadata for projects that support chapters. Prefer *_patch arguments (summary_patch, notes_patch, conflicts_patch) for partial edits. Conflicts are first class here; prefer conflict updates over generic notes updates.",
"- get_chapter_content: Inspect existing prose in projects that support chapters when deciding what to do next.",
Expand All @@ -150,6 +150,7 @@
"- search_in_project (scope='sourcebook') / list_sourcebook_entries / get_sourcebook_entry / create_sourcebook_entry / update_sourcebook_entry / delete_sourcebook_entry / add_sourcebook_relation / remove_sourcebook_relation: Maintain world knowledge. For update_sourcebook_entry prefer description_patch/synonyms_patch/images_patch when changing only part of a field. Use add_sourcebook_relation/remove_sourcebook_relation for relation-only edits instead of replacing relation sets.",
"- Keep metadata patch calls compact: send only the smallest single-field operation needed (avoid multi-field replacement payloads unless required).",
"- sync_summary: Auto-generate a summary from the current project prose context.",
"- undo_last_tool_changes: Undo the most recent LLM tool call's project changes (scope='last_call'), or roll back all project changes made by LLM tools since the last user prompt (scope='all_this_turn'). For 'all_this_turn', pass the batch_ids from all tool results in this turn. Use this to recover from unintended modifications before the user reviews them.",
"- create_new_chapter / write_chapter_heading: Maintain chapter structure in projects that support chapters. Chapter and book reordering is done via the GUI or REST API, not via LLM tools.",
"- list_images / generate_image_description / create_image_placeholder / set_image_metadata: Manage project visuals.",
"- read_scratchpad / write_scratchpad: State management for per-chat, temporary planning state. Avoid storing permanent facts here; use story notes or sourcebook entries for durable world model updates.",
Expand All @@ -163,7 +164,7 @@
"IMPORTANT:",
"- Do NOT write story prose yourself in the chat response. Use call_writing_llm instead.",
"- Do NOT perform prose editing yourself in the chat response. Use call_editing_assistant instead.",
"- call_writing_llm can write directly to the project when you specify write_mode. Use write_mode='append' to continue the story, 'replace' for full rewrites, 'insert_at_marker' for targeted insertion at ~~~, or omit write_mode to review the text before deciding. For chapter-based projects (novel/series), provide the chap_id. For short-story projects, chap_id is optional and will auto-detect. Important: call_writing_llm is stateless, so always pass the exact chapter/content context it must use in this request. For append, include preceding_content when you have a precise local anchor; otherwise the backend uses the last paragraphs of the target chapter. Without write_mode, it only returns text that you can then integrate via call_editing_assistant or other tools.",
"- call_writing_llm can write directly to the project when you specify write_mode. Use write_mode='append' to continue the story, 'replace' to swap a specific existing passage with the generated text (set replace_target to the exact passage to replace — first occurrence only), 'replace_all' to REPLACE THE COMPLETE EXISTING CONTENT of the chapter/draft with newly generated text (WARNING: all prior text is permanently overwritten — only use when a full replacement is explicitly intended), 'insert_at_marker' for targeted insertion at ~~~, or omit write_mode to review the text before deciding. For chapter-based projects (novel/series), provide the chap_id. For short-story projects, chap_id is optional and will auto-detect. Important: call_writing_llm is stateless, so always pass the exact chapter/content context it must use in this request. For append, include preceding_content when you have a precise local anchor; otherwise the backend uses the last paragraphs of the target chapter. Without write_mode, it only returns text that you can then integrate via call_editing_assistant or other tools.",
"- The call_editing_assistant is a prose editor ONLY. It operates exclusively on existing project prose already stored in the active writing unit. NEVER use it for character analysis, psychological insights, world-building advice, brainstorming, answering questions, or any task that does not directly edit specific stored prose. Answer those requests yourself.",
"- When returning text that may be used as tool arguments (e.g. JSON parameter values), use typographic quotation marks (“ ”) instead of straight double quotes (\") for string content to avoid breaking JSON formatting.",
"- You may update metadata directly when appropriate because that is part of your role.",
Expand Down Expand Up @@ -485,7 +486,8 @@
"{instruction}",
"",
"Context materials:",
"{context}"
"{context}",
"{sourcebook_entries}"
]
},
"call_writing_llm_preceding_anchor": {
Expand All @@ -497,6 +499,30 @@
"{preceding_content}"
]
},
"sourcebook_entries_block": {
"_use": "WRITING",
"en": ["Relevant sourcebook entries:"]
},
"sourcebook_entry_summary": {
"_use": "WRITING",
"en": ["- {name} ({category}): {description}"]
},
"sourcebook_entry_relations": {
"_use": "WRITING",
"en": [" Relations: {relation_text}"]
},
"sourcebook_entry_relations_none": {
"_use": "WRITING",
"en": ["None"]
},
"sourcebook_entry_unknown_category": {
"_use": "WRITING",
"en": ["Unknown"]
},
"sourcebook_entry_missing_description": {
"_use": "WRITING",
"en": ["No description available."]
},
"call_editing_assistant_request": {
"_use": "EDITING",
"en": [
Expand Down
19 changes: 19 additions & 0 deletions resources/config/model_presets.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,25 @@
"extra_body": "{\"repetition_penalty\": 1.0, \"chat_template_kwargs\": {\"enable_thinking\": false}}"
}
},
{
"id": "delta-gemma4-non-thinking",
"name": "Tweak: Gemma 4 Non-Thinking",
"description": "Switches Gemma 4 from thinking mode to direct non-thinking responses.",
"model_id_patterns": ["^gemma4", "^gemma-4"],
"preset_type": "delta",
"parameters": {
"temperature": null,
"top_p": null,
"max_tokens": null,
"presence_penalty": null,
"frequency_penalty": null,
"stop": null,
"seed": null,
"top_k": null,
"min_p": null,
"extra_body": "{\"generation_config\": {\"thinking_config\": {\"thinking_budget\": 0}}, \"chat_template_kwargs\": {\"enable_thinking\": false}}"
}
},
{
"id": "delta-creative-writing",
"name": "Tweak: Creative Writing",
Expand Down
2 changes: 2 additions & 0 deletions src/augmentedquill/services/chat/chat_tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from augmentedquill.services.chat.chat_tools import story_tools # noqa: F401
from augmentedquill.services.chat.chat_tools import web_search_tools # noqa: F401
from augmentedquill.services.chat.chat_tools import search_tools # noqa: F401
from augmentedquill.services.chat.chat_tools import undo_tools # noqa: F401

__all__ = [
"chapter_tools",
Expand All @@ -34,4 +35,5 @@
"story_tools",
"web_search_tools",
"search_tools",
"undo_tools",
]
Loading
Loading