contextweave 0.3.0__tar.gz → 0.3.1__tar.gz

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.
Files changed (550) hide show
  1. {contextweave-0.3.0 → contextweave-0.3.1}/PKG-INFO +1 -1
  2. contextweave-0.3.1/context_aware_translation/core/galgame_document_handler.py +65 -0
  3. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/galgame.py +42 -6
  4. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/ops/export_ops.py +0 -2
  5. {contextweave-0.3.0 → contextweave-0.3.1}/pyproject.toml +1 -1
  6. contextweave-0.3.1/tests/core/test_galgame_document_handler.py +57 -0
  7. {contextweave-0.3.0 → contextweave-0.3.1}/tests/documents/test_galgame.py +42 -21
  8. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/test_import_export.py +3 -4
  9. {contextweave-0.3.0 → contextweave-0.3.1}/uv.lock +1 -1
  10. contextweave-0.3.0/context_aware_translation/core/galgame_document_handler.py +0 -101
  11. contextweave-0.3.0/tests/core/test_galgame_document_handler.py +0 -98
  12. {contextweave-0.3.0 → contextweave-0.3.1}/.github/workflows/release.yml +0 -0
  13. {contextweave-0.3.0 → contextweave-0.3.1}/.gitignore +0 -0
  14. {contextweave-0.3.0 → contextweave-0.3.1}/AGENTS.md +0 -0
  15. {contextweave-0.3.0 → contextweave-0.3.1}/LICENSE +0 -0
  16. {contextweave-0.3.0 → contextweave-0.3.1}/Makefile +0 -0
  17. {contextweave-0.3.0 → contextweave-0.3.1}/README.md +0 -0
  18. {contextweave-0.3.0 → contextweave-0.3.1}/README_ZH.md +0 -0
  19. {contextweave-0.3.0 → contextweave-0.3.1}/cat-ui.spec +0 -0
  20. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/AGENTS.md +0 -0
  21. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/__init__.py +0 -0
  22. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/adapters/__init__.py +0 -0
  23. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/adapters/files/__init__.py +0 -0
  24. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/adapters/files/glossary_io.py +0 -0
  25. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/adapters/qt/__init__.py +0 -0
  26. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/adapters/qt/application_event_bridge.py +0 -0
  27. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/adapters/qt/task_engine.py +0 -0
  28. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/adapters/qt/workers/__init__.py +0 -0
  29. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/adapters/qt/workers/base_worker.py +0 -0
  30. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/adapters/qt/workers/batch_task_overlap_guard.py +0 -0
  31. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/adapters/qt/workers/batch_translation_task_worker.py +0 -0
  32. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/adapters/qt/workers/chunk_retranslation_task_worker.py +0 -0
  33. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/adapters/qt/workers/export_worker.py +0 -0
  34. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/adapters/qt/workers/glossary_export_task_worker.py +0 -0
  35. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/adapters/qt/workers/glossary_extraction_task_worker.py +0 -0
  36. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/adapters/qt/workers/glossary_review_task_worker.py +0 -0
  37. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/adapters/qt/workers/glossary_translation_task_worker.py +0 -0
  38. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/adapters/qt/workers/image_reembedding_task_worker.py +0 -0
  39. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/adapters/qt/workers/import_worker.py +0 -0
  40. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/adapters/qt/workers/ocr_task_worker.py +0 -0
  41. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/adapters/qt/workers/operation_tracker.py +0 -0
  42. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/adapters/qt/workers/translate_and_export_task_worker.py +0 -0
  43. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/adapters/qt/workers/translation_manga_task_worker.py +0 -0
  44. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/adapters/qt/workers/translation_text_task_worker.py +0 -0
  45. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/app_identity.py +0 -0
  46. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/application/__init__.py +0 -0
  47. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/application/composition.py +0 -0
  48. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/application/contracts/__init__.py +0 -0
  49. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/application/contracts/app_setup.py +0 -0
  50. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/application/contracts/common.py +0 -0
  51. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/application/contracts/document.py +0 -0
  52. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/application/contracts/project_setup.py +0 -0
  53. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/application/contracts/projects.py +0 -0
  54. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/application/contracts/queue.py +0 -0
  55. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/application/contracts/terms.py +0 -0
  56. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/application/contracts/work.py +0 -0
  57. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/application/errors.py +0 -0
  58. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/application/events.py +0 -0
  59. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/application/runtime.py +0 -0
  60. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/application/services/__init__.py +0 -0
  61. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/application/services/_export_support.py +0 -0
  62. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/application/services/app_setup.py +0 -0
  63. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/application/services/document.py +0 -0
  64. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/application/services/project_setup.py +0 -0
  65. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/application/services/projects.py +0 -0
  66. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/application/services/queue.py +0 -0
  67. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/application/services/terms.py +0 -0
  68. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/application/services/work.py +0 -0
  69. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/cli/__init__.py +0 -0
  70. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/cli/config_file.py +0 -0
  71. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/cli/galgame_skill.py +0 -0
  72. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/cli/main.py +0 -0
  73. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/cli/output.py +0 -0
  74. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/cli/runtime.py +0 -0
  75. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/cli/wait.py +0 -0
  76. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/config.py +0 -0
  77. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/core/AGENTS.md +0 -0
  78. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/core/__init__.py +0 -0
  79. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/core/cancellation.py +0 -0
  80. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/core/context_extractor.py +0 -0
  81. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/core/context_manager.py +0 -0
  82. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/core/manga_document_handler.py +0 -0
  83. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/core/models.py +0 -0
  84. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/core/progress.py +0 -0
  85. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/core/term_memory.py +0 -0
  86. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/core/term_memory_builder.py +0 -0
  87. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/core/translation_strategies.py +0 -0
  88. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/AGENTS.md +0 -0
  89. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/__init__.py +0 -0
  90. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/base.py +0 -0
  91. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/content/AGENTS.md +0 -0
  92. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/content/__init__.py +0 -0
  93. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/content/ocr_content.py +0 -0
  94. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/content/ocr_items.py +0 -0
  95. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/epub.py +0 -0
  96. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/epub_container.py +0 -0
  97. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/epub_support/AGENTS.md +0 -0
  98. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/epub_support/__init__.py +0 -0
  99. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/epub_support/container_model.py +0 -0
  100. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/epub_support/container_patch.py +0 -0
  101. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/epub_support/container_reader.py +0 -0
  102. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/epub_support/container_shared.py +0 -0
  103. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/epub_support/container_writer.py +0 -0
  104. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/epub_support/inline_markers.py +0 -0
  105. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/epub_support/nav_ops.py +0 -0
  106. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/epub_support/slot_lines.py +0 -0
  107. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/epub_support/xml_utils.py +0 -0
  108. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/epub_xhtml_utils.py +0 -0
  109. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/manga.py +0 -0
  110. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/manga_alignment.py +0 -0
  111. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/manga_reembed_planner.py +0 -0
  112. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/pdf.py +0 -0
  113. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/scanned_book.py +0 -0
  114. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/subtitle.py +0 -0
  115. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/documents/text.py +0 -0
  116. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/AGENTS.md +0 -0
  117. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/__init__.py +0 -0
  118. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/batch_jobs/AGENTS.md +0 -0
  119. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/batch_jobs/__init__.py +0 -0
  120. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/batch_jobs/base.py +0 -0
  121. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/batch_jobs/gemini_gateway.py +0 -0
  122. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/client.py +0 -0
  123. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/epub_ocr.py +0 -0
  124. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/extractor.py +0 -0
  125. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/glossary_translator.py +0 -0
  126. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/image_backend_base.py +0 -0
  127. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/image_backends/AGENTS.md +0 -0
  128. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/image_backends/__init__.py +0 -0
  129. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/image_backends/gemini_backend.py +0 -0
  130. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/image_backends/openai_backend.py +0 -0
  131. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/image_backends/qwen_backend.py +0 -0
  132. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/image_generator.py +0 -0
  133. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/language_detector.py +0 -0
  134. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/manga_ocr.py +0 -0
  135. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/manga_translator.py +0 -0
  136. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/ocr.py +0 -0
  137. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/reviewer.py +0 -0
  138. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/session_trace.py +0 -0
  139. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/summarizor.py +0 -0
  140. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/token_tracker.py +0 -0
  141. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/translation_strategies.py +0 -0
  142. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/llm/translator.py +0 -0
  143. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/config/hk2s.json +0 -0
  144. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/config/jp2s.json +0 -0
  145. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/config/s2hk.json +0 -0
  146. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/config/s2t.json +0 -0
  147. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/config/s2tw.json +0 -0
  148. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/config/s2twp.json +0 -0
  149. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/config/t2hk.json +0 -0
  150. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/config/t2s.json +0 -0
  151. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/config/t2tw.json +0 -0
  152. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/config/tw2s.json +0 -0
  153. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/config/tw2sp.json +0 -0
  154. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/dictionary/HKVariants.txt +0 -0
  155. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/dictionary/HKVariantsPhrases.txt +0 -0
  156. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/dictionary/HKVariantsRev.txt +0 -0
  157. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/dictionary/HKVariantsRevPhrases.txt +0 -0
  158. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/dictionary/JPVariants.txt +0 -0
  159. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/dictionary/JPVariantsRev.txt +0 -0
  160. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/dictionary/STCharacters.txt +0 -0
  161. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/dictionary/STPhrases.txt +0 -0
  162. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/dictionary/TSCharacters.txt +0 -0
  163. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/dictionary/TSPhrases.txt +0 -0
  164. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/dictionary/TWPhrases.txt +0 -0
  165. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/dictionary/TWPhrasesRev.txt +0 -0
  166. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/dictionary/TWVariants.txt +0 -0
  167. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/dictionary/TWVariantsRev.txt +0 -0
  168. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/opencc/dictionary/TWVariantsRevPhrases.txt +0 -0
  169. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/tokenizers/deepseek-v3/special_tokens_map.json +0 -0
  170. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/tokenizers/deepseek-v3/tokenizer.json +0 -0
  171. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/resources/tokenizers/deepseek-v3/tokenizer_config.json +0 -0
  172. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/storage/AGENTS.md +0 -0
  173. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/storage/__init__.py +0 -0
  174. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/storage/library/__init__.py +0 -0
  175. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/storage/library/book_manager.py +0 -0
  176. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/storage/models/__init__.py +0 -0
  177. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/storage/models/book.py +0 -0
  178. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/storage/models/config_profile.py +0 -0
  179. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/storage/models/endpoint_profile.py +0 -0
  180. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/storage/repositories/__init__.py +0 -0
  181. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/storage/repositories/document_repository.py +0 -0
  182. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/storage/repositories/llm_batch_store.py +0 -0
  183. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/storage/repositories/task_store.py +0 -0
  184. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/storage/repositories/term_repository.py +0 -0
  185. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/storage/repositories/translation_batch_task_store.py +0 -0
  186. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/storage/schema/__init__.py +0 -0
  187. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/storage/schema/book_db.py +0 -0
  188. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/storage/schema/registry_db.py +0 -0
  189. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/storage/sqlite_locking.py +0 -0
  190. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/AGENTS.md +0 -0
  191. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/__init__.py +0 -0
  192. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/chrome_sizing.py +0 -0
  193. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/constants.py +0 -0
  194. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/features/app_settings_pane.py +0 -0
  195. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/features/app_setup_view.py +0 -0
  196. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/features/document_images_view.py +0 -0
  197. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/features/document_ocr_tab.py +0 -0
  198. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/features/document_translation_view.py +0 -0
  199. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/features/document_workspace_view.py +0 -0
  200. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/features/library_view.py +0 -0
  201. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/features/project_settings_pane.py +0 -0
  202. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/features/queue_drawer_view.py +0 -0
  203. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/features/terms_table_widget.py +0 -0
  204. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/features/terms_view.py +0 -0
  205. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/features/work_view.py +0 -0
  206. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/features/workflow_profile_editor.py +0 -0
  207. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/i18n.py +0 -0
  208. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/json_utils.py +0 -0
  209. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/main.py +0 -0
  210. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/main_window.py +0 -0
  211. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/qml/BootstrapProbe.qml +0 -0
  212. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/qml/app/AppShellChrome.qml +0 -0
  213. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/qml/dialogs/app_settings/AppSettingsDialogChrome.qml +0 -0
  214. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/qml/dialogs/app_settings/AppSettingsPane.qml +0 -0
  215. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/qml/dialogs/project_settings/ProjectSettingsDialogChrome.qml +0 -0
  216. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/qml/dialogs/project_settings/ProjectSettingsPane.qml +0 -0
  217. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/qml/document/DocumentShellChrome.qml +0 -0
  218. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/qml/document/export/DocumentExportPaneChrome.qml +0 -0
  219. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/qml/document/images/DocumentImagesPaneChrome.qml +0 -0
  220. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/qml/document/ocr/DocumentOCRPaneChrome.qml +0 -0
  221. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/qml/document/translation/DocumentTranslationPaneChrome.qml +0 -0
  222. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/qml/project/ProjectShellChrome.qml +0 -0
  223. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/qml/project/terms/TermsPaneChrome.qml +0 -0
  224. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/qml/project/work_home/WorkHomeChrome.qml +0 -0
  225. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/qml/queue/QueueShellChrome.qml +0 -0
  226. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/qml_resources.py +0 -0
  227. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/resources/__init__.py +0 -0
  228. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/resources/styles.qss +0 -0
  229. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/shell_hosts/__init__.py +0 -0
  230. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/shell_hosts/app_settings_dialog_host.py +0 -0
  231. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/shell_hosts/app_shell_host.py +0 -0
  232. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/shell_hosts/document_shell_host.py +0 -0
  233. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/shell_hosts/hybrid.py +0 -0
  234. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/shell_hosts/project_settings_dialog_host.py +0 -0
  235. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/shell_hosts/project_shell_host.py +0 -0
  236. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/shell_hosts/queue_shell_host.py +0 -0
  237. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/sleep_inhibitor.py +0 -0
  238. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/startup.py +0 -0
  239. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/tips.py +0 -0
  240. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/translations/zh_CN.qm +0 -0
  241. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/translations/zh_CN.ts +0 -0
  242. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/viewmodels/__init__.py +0 -0
  243. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/viewmodels/app_settings_dialog.py +0 -0
  244. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/viewmodels/app_settings_pane.py +0 -0
  245. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/viewmodels/app_shell.py +0 -0
  246. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/viewmodels/base.py +0 -0
  247. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/viewmodels/document_export_pane.py +0 -0
  248. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/viewmodels/document_images_pane.py +0 -0
  249. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/viewmodels/document_ocr_pane.py +0 -0
  250. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/viewmodels/document_shell.py +0 -0
  251. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/viewmodels/document_translation_pane.py +0 -0
  252. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/viewmodels/project_settings_dialog.py +0 -0
  253. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/viewmodels/project_settings_pane.py +0 -0
  254. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/viewmodels/project_shell.py +0 -0
  255. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/viewmodels/queue_shell.py +0 -0
  256. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/viewmodels/router.py +0 -0
  257. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/viewmodels/terms_pane.py +0 -0
  258. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/viewmodels/work_home.py +0 -0
  259. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/widgets/AGENTS.md +0 -0
  260. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/widgets/hybrid_controls.py +0 -0
  261. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/widgets/image_viewer.py +0 -0
  262. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/widgets/progress_widget.py +0 -0
  263. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/widgets/table_support.py +0 -0
  264. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/ui/window_controllers.py +0 -0
  265. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/utils/AGENTS.md +0 -0
  266. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/utils/__init__.py +0 -0
  267. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/utils/chunking.py +0 -0
  268. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/utils/cjk_normalize.py +0 -0
  269. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/utils/compression_marker.py +0 -0
  270. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/utils/file_utils.py +0 -0
  271. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/utils/hard_wrap.py +0 -0
  272. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/utils/hashing.py +0 -0
  273. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/utils/image_utils.py +0 -0
  274. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/utils/llm_json_cleaner.py +0 -0
  275. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/utils/markdown_escape.py +0 -0
  276. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/utils/pandoc_export.py +0 -0
  277. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/utils/semantic_chunker.py +0 -0
  278. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/utils/string_similarity.py +0 -0
  279. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/utils/symbol_check.py +0 -0
  280. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/AGENTS.md +0 -0
  281. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/__init__.py +0 -0
  282. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/bootstrap.py +0 -0
  283. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/image_fetcher.py +0 -0
  284. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/ops/__init__.py +0 -0
  285. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/ops/bootstrap_ops.py +0 -0
  286. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/ops/glossary_ops.py +0 -0
  287. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/ops/import_ops.py +0 -0
  288. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/ops/import_support.py +0 -0
  289. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/ops/ocr_ops.py +0 -0
  290. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/ops/translation_ops.py +0 -0
  291. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/runtime.py +0 -0
  292. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/session.py +0 -0
  293. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/task_runtime.py +0 -0
  294. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/AGENTS.md +0 -0
  295. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/__init__.py +0 -0
  296. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/claims.py +0 -0
  297. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/engine_core.py +0 -0
  298. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/exceptions.py +0 -0
  299. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/execution/AGENTS.md +0 -0
  300. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/execution/__init__.py +0 -0
  301. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/execution/batch_translation_executor.py +0 -0
  302. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/execution/batch_translation_ops.py +0 -0
  303. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/glossary_preflight.py +0 -0
  304. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/handlers/AGENTS.md +0 -0
  305. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/handlers/__init__.py +0 -0
  306. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/handlers/base.py +0 -0
  307. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/handlers/batch_translation.py +0 -0
  308. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/handlers/chunk_retranslation.py +0 -0
  309. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/handlers/glossary_export.py +0 -0
  310. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/handlers/glossary_extraction.py +0 -0
  311. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/handlers/glossary_review.py +0 -0
  312. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/handlers/glossary_translation.py +0 -0
  313. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/handlers/image_reembedding.py +0 -0
  314. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/handlers/ocr.py +0 -0
  315. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/handlers/translate_and_export.py +0 -0
  316. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/handlers/translation_manga.py +0 -0
  317. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/handlers/translation_text.py +0 -0
  318. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/models.py +0 -0
  319. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/translate_and_export_support.py +0 -0
  320. {contextweave-0.3.0 → contextweave-0.3.1}/context_aware_translation/workflow/tasks/worker_deps.py +0 -0
  321. {contextweave-0.3.0 → contextweave-0.3.1}/demo/The Count of Monte Cristo.epub +0 -0
  322. {contextweave-0.3.0 → contextweave-0.3.1}/demo//345/237/272/347/235/243/345/261/261/344/274/257/347/210/265.epub" +0 -0
  323. {contextweave-0.3.0 → contextweave-0.3.1}/docs/.nojekyll +0 -0
  324. {contextweave-0.3.0 → contextweave-0.3.1}/docs/examples/contextweave-cli.yaml +0 -0
  325. {contextweave-0.3.0 → contextweave-0.3.1}/docs/index.html +0 -0
  326. {contextweave-0.3.0 → contextweave-0.3.1}/docs/project-terms-manual-entry-ux.md +0 -0
  327. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/CN/API/351/205/215/347/275/256.png" +0 -0
  328. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/CN/latest_new_project_dialog.png +0 -0
  329. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/CN/latest_project_work_overview.png +0 -0
  330. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/CN/latest_projects_overview.png +0 -0
  331. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/CN/latest_setup_wizard_provider_selection.png +0 -0
  332. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/CN/latest_setup_wizard_workflow_profile_review.png +0 -0
  333. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/CN/latest_terms_overview.png +0 -0
  334. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/CN//345/257/274/345/205/245.png" +0 -0
  335. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/CN//345/257/274/345/207/272.png" +0 -0
  336. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/CN//346/226/260/351/241/271/347/233/256.png" +0 -0
  337. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/CN//346/234/257/350/257/255.png" +0 -0
  338. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/CN//347/277/273/350/257/221.png" +0 -0
  339. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/CN//350/256/276/347/275/256.png" +0 -0
  340. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/CN//350/256/276/347/275/256/345/220/221/345/257/274.png" +0 -0
  341. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/CN//350/256/276/347/275/256/347/273/223/346/235/237.png" +0 -0
  342. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/EN/APISetup.png +0 -0
  343. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/EN/Export.png +0 -0
  344. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/EN/Import.png +0 -0
  345. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/EN/InitialSetup.png +0 -0
  346. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/EN/Language.png +0 -0
  347. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/EN/NewProject.png +0 -0
  348. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/EN/Terms.png +0 -0
  349. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/EN/Translate.png +0 -0
  350. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/EN/TranslateAndExport.png +0 -0
  351. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/EN/Wizard.png +0 -0
  352. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/EN/latest_new_project_dialog.png +0 -0
  353. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/EN/latest_project_work_overview.png +0 -0
  354. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/EN/latest_projects_overview.png +0 -0
  355. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/EN/latest_setup_wizard_provider_selection.png +0 -0
  356. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/EN/latest_setup_wizard_workflow_profile_review.png +0 -0
  357. {contextweave-0.3.0 → contextweave-0.3.1}/docs/screenshots/EN/latest_terms_overview.png +0 -0
  358. {contextweave-0.3.0 → contextweave-0.3.1}/docs/styles.css +0 -0
  359. {contextweave-0.3.0 → contextweave-0.3.1}/installer/AGENTS.md +0 -0
  360. {contextweave-0.3.0 → contextweave-0.3.1}/installer/macos/AGENTS.md +0 -0
  361. {contextweave-0.3.0 → contextweave-0.3.1}/installer/macos/entitlements.plist +0 -0
  362. {contextweave-0.3.0 → contextweave-0.3.1}/installer/windows/AGENTS.md +0 -0
  363. {contextweave-0.3.0 → contextweave-0.3.1}/scripts/AGENTS.md +0 -0
  364. {contextweave-0.3.0 → contextweave-0.3.1}/scripts/build_ui.py +0 -0
  365. {contextweave-0.3.0 → contextweave-0.3.1}/scripts/generate_readme_screenshots.py +0 -0
  366. {contextweave-0.3.0 → contextweave-0.3.1}/scripts/run_ui_tests.py +0 -0
  367. {contextweave-0.3.0 → contextweave-0.3.1}/tests/AGENTS.md +0 -0
  368. {contextweave-0.3.0 → contextweave-0.3.1}/tests/adapters/AGENTS.md +0 -0
  369. {contextweave-0.3.0 → contextweave-0.3.1}/tests/adapters/files/test_glossary_io.py +0 -0
  370. {contextweave-0.3.0 → contextweave-0.3.1}/tests/application/fakes.py +0 -0
  371. {contextweave-0.3.0 → contextweave-0.3.1}/tests/application/test_composition.py +0 -0
  372. {contextweave-0.3.0 → contextweave-0.3.1}/tests/application/test_contracts.py +0 -0
  373. {contextweave-0.3.0 → contextweave-0.3.1}/tests/application/test_document_service.py +0 -0
  374. {contextweave-0.3.0 → contextweave-0.3.1}/tests/application/test_document_translation_service.py +0 -0
  375. {contextweave-0.3.0 → contextweave-0.3.1}/tests/application/test_events.py +0 -0
  376. {contextweave-0.3.0 → contextweave-0.3.1}/tests/application/test_export_services.py +0 -0
  377. {contextweave-0.3.0 → contextweave-0.3.1}/tests/application/test_queue_service.py +0 -0
  378. {contextweave-0.3.0 → contextweave-0.3.1}/tests/application/test_terms_service.py +0 -0
  379. {contextweave-0.3.0 → contextweave-0.3.1}/tests/application/test_ui_harness_pattern.py +0 -0
  380. {contextweave-0.3.0 → contextweave-0.3.1}/tests/architecture/test_migrated_ui_boundaries.py +0 -0
  381. {contextweave-0.3.0 → contextweave-0.3.1}/tests/architecture/test_packaging_hidden_imports.py +0 -0
  382. {contextweave-0.3.0 → contextweave-0.3.1}/tests/architecture/test_qml_ui_boundaries.py +0 -0
  383. {contextweave-0.3.0 → contextweave-0.3.1}/tests/cli/test_cli.py +0 -0
  384. {contextweave-0.3.0 → contextweave-0.3.1}/tests/config/AGENTS.md +0 -0
  385. {contextweave-0.3.0 → contextweave-0.3.1}/tests/config/__init__.py +0 -0
  386. {contextweave-0.3.0 → contextweave-0.3.1}/tests/config/test_endpoint_profiles.py +0 -0
  387. {contextweave-0.3.0 → contextweave-0.3.1}/tests/conftest.py +0 -0
  388. {contextweave-0.3.0 → contextweave-0.3.1}/tests/core/AGENTS.md +0 -0
  389. {contextweave-0.3.0 → contextweave-0.3.1}/tests/core/__init__.py +0 -0
  390. {contextweave-0.3.0 → contextweave-0.3.1}/tests/core/expected_batching_output.json +0 -0
  391. {contextweave-0.3.0 → contextweave-0.3.1}/tests/core/test-terms.json +0 -0
  392. {contextweave-0.3.0 → contextweave-0.3.1}/tests/core/test_context_extractor.py +0 -0
  393. {contextweave-0.3.0 → contextweave-0.3.1}/tests/core/test_context_manager.py +0 -0
  394. {contextweave-0.3.0 → contextweave-0.3.1}/tests/core/test_manga_document_handler.py +0 -0
  395. {contextweave-0.3.0 → contextweave-0.3.1}/tests/core/test_models.py +0 -0
  396. {contextweave-0.3.0 → contextweave-0.3.1}/tests/core/test_noise_filtering_pipeline.py +0 -0
  397. {contextweave-0.3.0 → contextweave-0.3.1}/tests/core/test_term_memory_builder.py +0 -0
  398. {contextweave-0.3.0 → contextweave-0.3.1}/tests/core/test_translation_context_manager_strategy_api.py +0 -0
  399. {contextweave-0.3.0 → contextweave-0.3.1}/tests/data/test_chunk.txt +0 -0
  400. {contextweave-0.3.0 → contextweave-0.3.1}/tests/data/test_chunk2.txt +0 -0
  401. {contextweave-0.3.0 → contextweave-0.3.1}/tests/documents/AGENTS.md +0 -0
  402. {contextweave-0.3.0 → contextweave-0.3.1}/tests/documents/__init__.py +0 -0
  403. {contextweave-0.3.0 → contextweave-0.3.1}/tests/documents/content/AGENTS.md +0 -0
  404. {contextweave-0.3.0 → contextweave-0.3.1}/tests/documents/content/test_ocr_content.py +0 -0
  405. {contextweave-0.3.0 → contextweave-0.3.1}/tests/documents/content/test_ocr_items.py +0 -0
  406. {contextweave-0.3.0 → contextweave-0.3.1}/tests/documents/test_base.py +0 -0
  407. {contextweave-0.3.0 → contextweave-0.3.1}/tests/documents/test_epub.py +0 -0
  408. {contextweave-0.3.0 → contextweave-0.3.1}/tests/documents/test_epub_container.py +0 -0
  409. {contextweave-0.3.0 → contextweave-0.3.1}/tests/documents/test_epub_inline_markers.py +0 -0
  410. {contextweave-0.3.0 → contextweave-0.3.1}/tests/documents/test_epub_xhtml_utils.py +0 -0
  411. {contextweave-0.3.0 → contextweave-0.3.1}/tests/documents/test_manga.py +0 -0
  412. {contextweave-0.3.0 → contextweave-0.3.1}/tests/documents/test_manga_alignment.py +0 -0
  413. {contextweave-0.3.0 → contextweave-0.3.1}/tests/documents/test_ocr_image_embedded_text.py +0 -0
  414. {contextweave-0.3.0 → contextweave-0.3.1}/tests/documents/test_pdf.py +0 -0
  415. {contextweave-0.3.0 → contextweave-0.3.1}/tests/documents/test_scanned_book.py +0 -0
  416. {contextweave-0.3.0 → contextweave-0.3.1}/tests/documents/test_subtitle.py +0 -0
  417. {contextweave-0.3.0 → contextweave-0.3.1}/tests/documents/test_text.py +0 -0
  418. {contextweave-0.3.0 → contextweave-0.3.1}/tests/integration/AGENTS.md +0 -0
  419. {contextweave-0.3.0 → contextweave-0.3.1}/tests/integration/__init__.py +0 -0
  420. {contextweave-0.3.0 → contextweave-0.3.1}/tests/integration/test_business_logic.py +0 -0
  421. {contextweave-0.3.0 → contextweave-0.3.1}/tests/llm/AGENTS.md +0 -0
  422. {contextweave-0.3.0 → contextweave-0.3.1}/tests/llm/__init__.py +0 -0
  423. {contextweave-0.3.0 → contextweave-0.3.1}/tests/llm/test_extractor.py +0 -0
  424. {contextweave-0.3.0 → contextweave-0.3.1}/tests/llm/test_extractor_unit.py +0 -0
  425. {contextweave-0.3.0 → contextweave-0.3.1}/tests/llm/test_gemini_backend.py +0 -0
  426. {contextweave-0.3.0 → contextweave-0.3.1}/tests/llm/test_gemini_batch_gateway.py +0 -0
  427. {contextweave-0.3.0 → contextweave-0.3.1}/tests/llm/test_glossary_translator.py +0 -0
  428. {contextweave-0.3.0 → contextweave-0.3.1}/tests/llm/test_image_generator.py +0 -0
  429. {contextweave-0.3.0 → contextweave-0.3.1}/tests/llm/test_image_token_usage.py +0 -0
  430. {contextweave-0.3.0 → contextweave-0.3.1}/tests/llm/test_language_detector.py +0 -0
  431. {contextweave-0.3.0 → contextweave-0.3.1}/tests/llm/test_llm_client.py +0 -0
  432. {contextweave-0.3.0 → contextweave-0.3.1}/tests/llm/test_manga_translator.py +0 -0
  433. {contextweave-0.3.0 → contextweave-0.3.1}/tests/llm/test_ocr.py +0 -0
  434. {contextweave-0.3.0 → contextweave-0.3.1}/tests/llm/test_reviewer.py +0 -0
  435. {contextweave-0.3.0 → contextweave-0.3.1}/tests/llm/test_session_trace.py +0 -0
  436. {contextweave-0.3.0 → contextweave-0.3.1}/tests/llm/test_summarizor.py +0 -0
  437. {contextweave-0.3.0 → contextweave-0.3.1}/tests/llm/test_token_tracker.py +0 -0
  438. {contextweave-0.3.0 → contextweave-0.3.1}/tests/llm/test_token_usage_extraction.py +0 -0
  439. {contextweave-0.3.0 → contextweave-0.3.1}/tests/llm/test_translator.py +0 -0
  440. {contextweave-0.3.0 → contextweave-0.3.1}/tests/storage/AGENTS.md +0 -0
  441. {contextweave-0.3.0 → contextweave-0.3.1}/tests/storage/__init__.py +0 -0
  442. {contextweave-0.3.0 → contextweave-0.3.1}/tests/storage/test_book_db.py +0 -0
  443. {contextweave-0.3.0 → contextweave-0.3.1}/tests/storage/test_book_manager.py +0 -0
  444. {contextweave-0.3.0 → contextweave-0.3.1}/tests/storage/test_document_repository.py +0 -0
  445. {contextweave-0.3.0 → contextweave-0.3.1}/tests/storage/test_document_tables.py +0 -0
  446. {contextweave-0.3.0 → contextweave-0.3.1}/tests/storage/test_llm_batch_store.py +0 -0
  447. {contextweave-0.3.0 → contextweave-0.3.1}/tests/storage/test_task_store.py +0 -0
  448. {contextweave-0.3.0 → contextweave-0.3.1}/tests/storage/test_term_repository.py +0 -0
  449. {contextweave-0.3.0 → contextweave-0.3.1}/tests/storage/test_token_tracking.py +0 -0
  450. {contextweave-0.3.0 → contextweave-0.3.1}/tests/storage/test_translation_batch_task_store.py +0 -0
  451. {contextweave-0.3.0 → contextweave-0.3.1}/tests/test_logging_handlers.py +0 -0
  452. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/AGENTS.md +0 -0
  453. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/__init__.py +0 -0
  454. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/conftest.py +0 -0
  455. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/tasks/test_task_engine.py +0 -0
  456. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_app_settings_dialog_host.py +0 -0
  457. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_app_settings_dialog_viewmodel.py +0 -0
  458. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_app_settings_pane.py +0 -0
  459. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_app_settings_pane_viewmodel.py +0 -0
  460. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_app_setup_view.py +0 -0
  461. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_app_shell_host.py +0 -0
  462. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_app_shell_viewmodel.py +0 -0
  463. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_document_export_pane_viewmodel.py +0 -0
  464. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_document_images_pane_viewmodel.py +0 -0
  465. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_document_images_view.py +0 -0
  466. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_document_ocr_tab.py +0 -0
  467. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_document_shell_host.py +0 -0
  468. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_document_shell_viewmodel.py +0 -0
  469. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_document_translation_pane_viewmodel.py +0 -0
  470. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_document_translation_view.py +0 -0
  471. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_document_workspace_view.py +0 -0
  472. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_i18n_progress_messages.py +0 -0
  473. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_image_viewer.py +0 -0
  474. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_library_view.py +0 -0
  475. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_main.py +0 -0
  476. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_main_window_shell.py +0 -0
  477. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_progress_widget.py +0 -0
  478. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_project_settings_dialog_host.py +0 -0
  479. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_project_settings_dialog_viewmodel.py +0 -0
  480. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_project_settings_pane.py +0 -0
  481. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_project_settings_pane_viewmodel.py +0 -0
  482. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_project_shell_host.py +0 -0
  483. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_project_shell_viewmodel.py +0 -0
  484. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_qml_bootstrap.py +0 -0
  485. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_qml_viewmodel_harness.py +0 -0
  486. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_queue_drawer_view.py +0 -0
  487. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_queue_shell_host.py +0 -0
  488. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_queue_shell_viewmodel.py +0 -0
  489. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_shell_host_infrastructure.py +0 -0
  490. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_sleep_inhibitor.py +0 -0
  491. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_terms_pane_viewmodel.py +0 -0
  492. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_terms_view.py +0 -0
  493. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_ui_clickthrough_smoke.py +0 -0
  494. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_viewmodel_base.py +0 -0
  495. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_work_view.py +0 -0
  496. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_worker_cancellation_reporting.py +0 -0
  497. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/test_workflow_profile_editor.py +0 -0
  498. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/workers/test_batch_task_overlap_guard.py +0 -0
  499. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/workers/test_chunk_retranslation_task_worker.py +0 -0
  500. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/workers/test_config_snapshot_workers.py +0 -0
  501. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/workers/test_glossary_export_task_worker.py +0 -0
  502. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/workers/test_glossary_review_task_worker.py +0 -0
  503. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/workers/test_ocr_task_worker.py +0 -0
  504. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/workers/test_operation_tracker.py +0 -0
  505. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/workers/test_translate_and_export_task_worker.py +0 -0
  506. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/workers/test_translation_manga_task_worker.py +0 -0
  507. {contextweave-0.3.0 → contextweave-0.3.1}/tests/ui/workers/test_translation_text_task_worker.py +0 -0
  508. {contextweave-0.3.0 → contextweave-0.3.1}/tests/utils/AGENTS.md +0 -0
  509. {contextweave-0.3.0 → contextweave-0.3.1}/tests/utils/__init__.py +0 -0
  510. {contextweave-0.3.0 → contextweave-0.3.1}/tests/utils/test_chunking.py +0 -0
  511. {contextweave-0.3.0 → contextweave-0.3.1}/tests/utils/test_cjk_normalize.py +0 -0
  512. {contextweave-0.3.0 → contextweave-0.3.1}/tests/utils/test_file_utils.py +0 -0
  513. {contextweave-0.3.0 → contextweave-0.3.1}/tests/utils/test_hard_wrap.py +0 -0
  514. {contextweave-0.3.0 → contextweave-0.3.1}/tests/utils/test_hashing.py +0 -0
  515. {contextweave-0.3.0 → contextweave-0.3.1}/tests/utils/test_llm_json_cleaner.py +0 -0
  516. {contextweave-0.3.0 → contextweave-0.3.1}/tests/utils/test_markdown_escape.py +0 -0
  517. {contextweave-0.3.0 → contextweave-0.3.1}/tests/utils/test_semantic_chunker.py +0 -0
  518. {contextweave-0.3.0 → contextweave-0.3.1}/tests/utils/test_string_similarity.py +0 -0
  519. {contextweave-0.3.0 → contextweave-0.3.1}/tests/utils/test_symbol_check.py +0 -0
  520. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/AGENTS.md +0 -0
  521. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/__init__.py +0 -0
  522. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/tasks/AGENTS.md +0 -0
  523. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/tasks/__init__.py +0 -0
  524. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/tasks/execution/AGENTS.md +0 -0
  525. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/tasks/execution/__init__.py +0 -0
  526. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/tasks/execution/test_batch_translation_executor.py +0 -0
  527. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/tasks/handlers/AGENTS.md +0 -0
  528. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/tasks/handlers/__init__.py +0 -0
  529. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/tasks/handlers/test_batch_translation_handler.py +0 -0
  530. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/tasks/handlers/test_chunk_retranslation_handler.py +0 -0
  531. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/tasks/handlers/test_glossary_export_handler.py +0 -0
  532. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/tasks/handlers/test_glossary_extraction_handler.py +0 -0
  533. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/tasks/handlers/test_glossary_review_handler.py +0 -0
  534. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/tasks/handlers/test_glossary_translation_handler.py +0 -0
  535. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/tasks/handlers/test_image_reembedding_handler.py +0 -0
  536. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/tasks/handlers/test_ocr_handler.py +0 -0
  537. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/tasks/handlers/test_translate_and_export_handler.py +0 -0
  538. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/tasks/handlers/test_translation_manga_handler.py +0 -0
  539. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/tasks/handlers/test_translation_text_handler.py +0 -0
  540. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/tasks/test_claims.py +0 -0
  541. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/tasks/test_engine_core.py +0 -0
  542. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/test_glossary_ops_scoping.py +0 -0
  543. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/test_multi_document.py +0 -0
  544. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/test_ocr_required_for_translation.py +0 -0
  545. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/test_run_ocr.py +0 -0
  546. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/test_service_bootstrap_lock.py +0 -0
  547. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/test_service_cancellation_semantics.py +0 -0
  548. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/test_session.py +0 -0
  549. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/test_translator_image_fetcher.py +0 -0
  550. {contextweave-0.3.0 → contextweave-0.3.1}/tests/workflow/test_translator_import_path.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: contextweave
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: ContextWeave: context-aware document translation with glossary management
5
5
  Project-URL: Homepage, https://github.com/bot-32142/ContextWeave
6
6
  Project-URL: Documentation, https://bot-32142.github.io/ContextWeave/
@@ -0,0 +1,65 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Callable
4
+ from typing import TYPE_CHECKING
5
+
6
+ from context_aware_translation.core.cancellation import raise_if_cancelled
7
+
8
+ if TYPE_CHECKING:
9
+ from context_aware_translation.core.context_manager import TranslationContextManager
10
+ from context_aware_translation.core.progress import ProgressCallback
11
+
12
+
13
+ class GalgameDocumentHandler:
14
+ """DocumentTypeHandler for galgame documents using the generic text pipeline."""
15
+
16
+ def __init__(
17
+ self,
18
+ *,
19
+ concurrency: int = 5,
20
+ batch_size: int = 0,
21
+ max_tokens_per_batch: int = 2000,
22
+ ) -> None:
23
+ self._concurrency = max(1, concurrency)
24
+ self._batch_size = batch_size
25
+ self._max_tokens_per_batch = max(1, max_tokens_per_batch)
26
+
27
+ def add_text(
28
+ self,
29
+ text: str,
30
+ max_token_size_per_chunk: int,
31
+ document_id: int,
32
+ manager: TranslationContextManager,
33
+ ) -> int:
34
+ """Let the normal semantic chunker group galgame text."""
35
+ return manager.add_text(text, max_token_size_per_chunk, document_id)
36
+
37
+ async def translate_chunks(
38
+ self,
39
+ document_ids: list[int],
40
+ manager: TranslationContextManager,
41
+ force: bool = False,
42
+ source_ids: list[int] | None = None,
43
+ cancel_check: Callable[[], bool] | None = None,
44
+ progress_callback: ProgressCallback | None = None,
45
+ ) -> None:
46
+ """Delegate to generic text translation with configured batching."""
47
+ _ = source_ids
48
+ raise_if_cancelled(cancel_check)
49
+ await manager.translate_chunks(
50
+ concurrency=self._concurrency,
51
+ batch_size=self._batch_size,
52
+ max_tokens_per_batch=self._max_tokens_per_batch,
53
+ document_ids=document_ids,
54
+ force=force,
55
+ cancel_check=cancel_check,
56
+ progress_callback=progress_callback,
57
+ )
58
+
59
+ def get_translated_lines(
60
+ self,
61
+ document_id: int,
62
+ manager: TranslationContextManager,
63
+ ) -> list[str]:
64
+ """Use the normal chunk concatenation and newline split behavior."""
65
+ return manager.get_translated_lines(document_id)
@@ -1148,11 +1148,7 @@ class GalgameDocument(Document):
1148
1148
  return 0
1149
1149
 
1150
1150
  def get_text(self) -> str:
1151
- units: list[TranslationUnit] = []
1152
- for source in self._ordered_sources():
1153
- relative_path, text_content, adapter = _source_adapter(source)
1154
- units.extend(adapter.extract_units(relative_path, text_content))
1155
- return serialize_translation_units(units)
1151
+ return "\n".join(unit.text for unit in self._all_translation_units())
1156
1152
 
1157
1153
  def get_glossary_seeds(self) -> tuple[GalgameGlossarySeed, ...]:
1158
1154
  seeds: list[GalgameGlossarySeed] = []
@@ -1180,7 +1176,7 @@ class GalgameDocument(Document):
1180
1176
  ) -> int:
1181
1177
  _ = progress_callback
1182
1178
  raise_if_cancelled(cancel_check)
1183
- self._translated_lines = [_coerce_export_line_to_translation(line) for line in lines]
1179
+ self._translated_lines = _expand_galgame_export_lines(lines, self._all_translation_units())
1184
1180
  return len(lines)
1185
1181
 
1186
1182
  async def reembed(
@@ -1251,6 +1247,13 @@ class GalgameDocument(Document):
1251
1247
  sources = cast("list[dict[str, object]]", self.repo.get_document_sources(self.document_id))
1252
1248
  return sorted(sources, key=_source_sequence_number)
1253
1249
 
1250
+ def _all_translation_units(self) -> list[TranslationUnit]:
1251
+ units: list[TranslationUnit] = []
1252
+ for source in self._ordered_sources():
1253
+ relative_path, text_content, adapter = _source_adapter(source)
1254
+ units.extend(adapter.extract_units(relative_path, text_content))
1255
+ return units
1256
+
1254
1257
  def _source_translation_batches(
1255
1258
  self,
1256
1259
  ) -> list[tuple[dict[str, object], GalgameAdapter, list[TranslationUnit], dict[str, str]]]:
@@ -1623,6 +1626,39 @@ def _safe_output_path(output_folder: Path, relative_path: str) -> Path:
1623
1626
  return output_folder.joinpath(*relative.parts)
1624
1627
 
1625
1628
 
1629
+ def _expand_galgame_export_lines(lines: list[str], units: list[TranslationUnit]) -> list[str]:
1630
+ translated_lines: list[str] = []
1631
+ for line in lines:
1632
+ translated_lines.extend(_split_galgame_chunk_translation(_coerce_export_line_to_translation(line)))
1633
+
1634
+ expanded: list[str] = []
1635
+ unit_index = 0
1636
+ line_index = 0
1637
+ while unit_index < len(units):
1638
+ source_line_count = _galgame_unit_line_count(units[unit_index].text)
1639
+ next_line_index = line_index + source_line_count
1640
+ if next_line_index > len(translated_lines):
1641
+ raise ValueError("Translated galgame line stream is shorter than the source unit stream.")
1642
+ expanded.append("\n".join(translated_lines[line_index:next_line_index]))
1643
+ unit_index += 1
1644
+ line_index = next_line_index
1645
+
1646
+ extra_lines = [line for line in translated_lines[line_index:] if line]
1647
+ if extra_lines:
1648
+ raise ValueError("Translated galgame line stream is longer than the source unit stream.")
1649
+ return expanded
1650
+
1651
+
1652
+ def _split_galgame_chunk_translation(text: str) -> list[str]:
1653
+ normalized = text.replace("\r\n", "\n").replace("\r", "\n")
1654
+ return [decode_compressed_line(line) for line in normalized.split("\n")]
1655
+
1656
+
1657
+ def _galgame_unit_line_count(text: str) -> int:
1658
+ normalized = text.replace("\r\n", "\n").replace("\r", "\n")
1659
+ return max(1, len(normalized.split("\n")))
1660
+
1661
+
1626
1662
  def _coerce_export_line_to_translation(line: str) -> str:
1627
1663
  decoded_line = decode_compressed_line(line)
1628
1664
  if not decoded_line.strip().startswith("{"):
@@ -26,8 +26,6 @@ def get_lines_with_original_fallback(workflow: WorkflowContext, document: Docume
26
26
 
27
27
  if document.document_type == "manga":
28
28
  return [chunk.translation if chunk.is_translated and chunk.translation is not None else "" for chunk in chunks]
29
- if document.document_type == "galgame":
30
- return [chunk.translation if chunk.is_translated and chunk.translation is not None else chunk.text for chunk in chunks]
31
29
 
32
30
  merged_chunks = [
33
31
  chunk.translation if chunk.is_translated and chunk.translation is not None else chunk.text for chunk in chunks
@@ -7,7 +7,7 @@ packages = ["context_aware_translation"]
7
7
 
8
8
  [project]
9
9
  name = "contextweave"
10
- version = "0.3.0"
10
+ version = "0.3.1"
11
11
  description = "ContextWeave: context-aware document translation with glossary management"
12
12
  readme = "README.md"
13
13
  license = "GPL-3.0-only"
@@ -0,0 +1,57 @@
1
+ from __future__ import annotations
2
+
3
+ from context_aware_translation.core.galgame_document_handler import GalgameDocumentHandler
4
+
5
+
6
+ class DummyManager:
7
+ def __init__(self) -> None:
8
+ self.add_text_calls: list[tuple[str, int, int]] = []
9
+ self.translate_calls: list[dict[str, object]] = []
10
+ self.translated_lines = ["你好", "再见"]
11
+
12
+ def add_text(self, text: str, max_token_size_per_chunk: int, document_id: int) -> int:
13
+ self.add_text_calls.append((text, max_token_size_per_chunk, document_id))
14
+ return 42
15
+
16
+ async def translate_chunks(self, **kwargs): # noqa: ANN003
17
+ self.translate_calls.append(kwargs)
18
+
19
+ def get_translated_lines(self, document_id: int) -> list[str]:
20
+ assert document_id == 7
21
+ return self.translated_lines
22
+
23
+
24
+ def test_galgame_handler_delegates_add_text_to_generic_pipeline() -> None:
25
+ manager = DummyManager()
26
+ handler = GalgameDocumentHandler()
27
+
28
+ last_chunk_id = handler.add_text("こんにちは\nまたね", 500, 7, manager)
29
+
30
+ assert last_chunk_id == 42
31
+ assert manager.add_text_calls == [("こんにちは\nまたね", 500, 7)]
32
+
33
+
34
+ def test_galgame_handler_delegates_get_translated_lines_to_generic_pipeline() -> None:
35
+ manager = DummyManager()
36
+ handler = GalgameDocumentHandler()
37
+
38
+ assert handler.get_translated_lines(7, manager) == ["你好", "再见"]
39
+
40
+
41
+ async def test_galgame_handler_delegates_translation_with_configured_batching() -> None:
42
+ manager = DummyManager()
43
+ handler = GalgameDocumentHandler(concurrency=3, batch_size=0, max_tokens_per_batch=1234)
44
+
45
+ await handler.translate_chunks([7], manager, force=True)
46
+
47
+ assert manager.translate_calls == [
48
+ {
49
+ "concurrency": 3,
50
+ "batch_size": 0,
51
+ "max_tokens_per_batch": 1234,
52
+ "document_ids": [7],
53
+ "force": True,
54
+ "cancel_check": None,
55
+ "progress_callback": None,
56
+ }
57
+ ]
@@ -20,7 +20,6 @@ from context_aware_translation.documents.galgame import (
20
20
  TranslatorPlusPlusTransAdapter,
21
21
  VnTextJsonAdapter,
22
22
  WolfRpgXlsxAdapter,
23
- deserialize_translation_unit_stream,
24
23
  get_galgame_bridge_formats,
25
24
  get_galgame_external_tool_specs,
26
25
  inspect_galgame_external_helpers,
@@ -462,8 +461,7 @@ async def test_galgame_document_preserve_export_uses_imported_json_adapter_mime_
462
461
  sources = repo.get_document_sources(row["document_id"])
463
462
  assert sources[0]["mime_type"] == VnTextJsonAdapter.mime_type
464
463
 
465
- units = deserialize_translation_unit_stream(document.get_text())
466
- assert [(unit.text, unit.speaker) for unit in units] == [("こんにちは", "Alice")]
464
+ assert document.get_text().splitlines() == ["こんにちは"]
467
465
 
468
466
  await document.set_text(["你好"])
469
467
  output_folder = tmp_path / "out"
@@ -492,8 +490,7 @@ async def test_galgame_document_preserve_export_writes_imported_xlsx_adapter(tmp
492
490
  sources = repo.get_document_sources(row["document_id"])
493
491
  assert sources[0]["mime_type"] == TppXlsxAdapter.mime_type
494
492
 
495
- units = deserialize_translation_unit_stream(document.get_text())
496
- assert [(unit.text, unit.speaker) for unit in units] == [("こんにちは", "Alice")]
493
+ assert document.get_text().splitlines() == ["こんにちは"]
497
494
 
498
495
  await document.set_text(["你好"])
499
496
  output_folder = tmp_path / "out"
@@ -518,8 +515,7 @@ async def test_galgame_document_imports_and_exports_renpy_script(tmp_path: Path)
518
515
  sources = repo.get_document_sources(row["document_id"])
519
516
  assert sources[0]["mime_type"] == RenPyScriptAdapter.mime_type
520
517
 
521
- units = deserialize_translation_unit_stream(document.get_text())
522
- assert [(unit.relative_path, unit.text, unit.speaker) for unit in units] == [("script.rpy", "こんにちは", "e")]
518
+ assert document.get_text().splitlines() == ["こんにちは"]
523
519
 
524
520
  await document.set_text(["你好"])
525
521
  output_folder = tmp_path / "out"
@@ -561,10 +557,7 @@ async def test_galgame_document_imports_and_exports_rpg_maker_folder(tmp_path: P
561
557
  sources = repo.get_document_sources(row["document_id"])
562
558
  assert sources[0]["mime_type"] == RpgMakerMvMzJsonAdapter.mime_type
563
559
 
564
- units = deserialize_translation_unit_stream(document.get_text())
565
- assert [(unit.relative_path, unit.text, unit.context) for unit in units] == [
566
- ("www/data/Map001.json", "こんにちは", "Map event 1, page 1")
567
- ]
560
+ assert document.get_text().splitlines() == ["こんにちは"]
568
561
 
569
562
  await document.set_text(["你好"])
570
563
  output_folder = tmp_path / "out"
@@ -589,8 +582,7 @@ async def test_galgame_document_imports_single_rpg_maker_map_file(tmp_path: Path
589
582
  sources = repo.get_document_sources(row["document_id"])
590
583
  assert sources[0]["relative_path"] == "Map001.json"
591
584
  assert sources[0]["mime_type"] == RpgMakerMvMzJsonAdapter.mime_type
592
- units = deserialize_translation_unit_stream(document.get_text())
593
- assert [(unit.relative_path, unit.text) for unit in units] == [("Map001.json", "こんにちは")]
585
+ assert document.get_text().splitlines() == ["こんにちは"]
594
586
 
595
587
 
596
588
  def test_galgame_folder_scan_rejects_rpg_maker_named_json_outside_data_folder(tmp_path: Path) -> None:
@@ -649,11 +641,7 @@ async def test_galgame_document_import_get_text_and_preserve_export(tmp_path: Pa
649
641
  assert sources[0]["relative_path"] == "data/script.json"
650
642
 
651
643
  document = GalgameDocument(repo, row["document_id"])
652
- units = deserialize_translation_unit_stream(document.get_text())
653
- assert [(unit.relative_path, unit.unit_id, unit.text) for unit in units] == [
654
- ("data/script.json", "0", "こんにちは"),
655
- ("data/script.json", "1", "またね"),
656
- ]
644
+ assert document.get_text().splitlines() == ["こんにちは", "またね"]
657
645
 
658
646
  await document.set_text(["你好", "再见"])
659
647
  output_folder = tmp_path / "out"
@@ -663,6 +651,40 @@ async def test_galgame_document_import_get_text_and_preserve_export(tmp_path: Pa
663
651
  assert patched == {"こんにちは": "你好", "またね": "再见"}
664
652
 
665
653
 
654
+ async def test_galgame_document_splits_grouped_chunk_translation_by_original_unit_lines(tmp_path: Path) -> None:
655
+ source = tmp_path / "script.json"
656
+ _write_mtool_json(source, {"こんにちは": "", "またね": ""})
657
+ repo = _setup_repo(tmp_path)
658
+ GalgameDocument.do_import(repo, source)
659
+ row = repo.get_document_row()
660
+ assert row is not None
661
+ document = GalgameDocument(repo, row["document_id"])
662
+
663
+ await document.set_text(["你好\n再见"])
664
+ output_folder = tmp_path / "out"
665
+ document.export_preserve_structure(output_folder)
666
+
667
+ patched = json.loads((output_folder / "script.json").read_text(encoding="utf-8"))
668
+ assert patched == {"こんにちは": "你好", "またね": "再见"}
669
+
670
+
671
+ async def test_galgame_document_splits_multiline_units_by_original_line_counts(tmp_path: Path) -> None:
672
+ source = tmp_path / "script.json"
673
+ _write_mtool_json(source, {"こんにちは\n世界": "", "またね": ""})
674
+ repo = _setup_repo(tmp_path)
675
+ GalgameDocument.do_import(repo, source)
676
+ row = repo.get_document_row()
677
+ assert row is not None
678
+ document = GalgameDocument(repo, row["document_id"])
679
+
680
+ await document.set_text(["你好\n世界\n再见"])
681
+ output_folder = tmp_path / "out"
682
+ document.export_preserve_structure(output_folder)
683
+
684
+ patched = json.loads((output_folder / "script.json").read_text(encoding="utf-8"))
685
+ assert patched == {"こんにちは\n世界": "你好\n世界", "またね": "再见"}
686
+
687
+
666
688
  async def test_galgame_document_coerces_serialized_units_for_original_fallback(tmp_path: Path) -> None:
667
689
  source = tmp_path / "script.json"
668
690
  _write_mtool_json(source, {"こんにちは": "", "またね": ""})
@@ -680,7 +702,7 @@ async def test_galgame_document_coerces_serialized_units_for_original_fallback(t
680
702
  assert patched == {"こんにちは": "こんにちは", "またね": "またね"}
681
703
 
682
704
 
683
- async def test_galgame_export_raises_on_short_translation_stream(tmp_path: Path) -> None:
705
+ async def test_galgame_export_raises_on_short_translation_stream() -> None:
684
706
  mock_repo = MagicMock()
685
707
  mock_repo.get_document_sources.return_value = [
686
708
  {
@@ -690,7 +712,6 @@ async def test_galgame_export_raises_on_short_translation_stream(tmp_path: Path)
690
712
  }
691
713
  ]
692
714
  document = GalgameDocument(mock_repo, 1)
693
- await document.set_text(["你好"])
694
715
 
695
716
  with pytest.raises(ValueError, match="shorter than the source unit stream"):
696
- document.export_preserve_structure(tmp_path / "out")
717
+ await document.set_text(["你好"])
@@ -640,10 +640,9 @@ Yes.
640
640
  db.update_all_sources_text_added(doc_id)
641
641
 
642
642
  chunks = translator.manager.term_repo.list_chunks(document_id=doc_id)
643
- assert [chunk.text for chunk in chunks] == ["こんにちは", "またね"]
644
- for chunk, translation in zip(chunks, ["你好", "再见"], strict=True):
645
- chunk.is_translated = True
646
- chunk.translation = translation
643
+ assert [chunk.text for chunk in chunks] == ["こんにちは\nまたね"]
644
+ chunks[0].is_translated = True
645
+ chunks[0].translation = "你好\n再见"
647
646
  translator.manager.term_repo.apply_batch(BatchUpdate(keyed_context=[], chunk_records=chunks))
648
647
 
649
648
  await _export_preserve_structure(translator, output_folder)
@@ -171,7 +171,7 @@ wheels = [
171
171
 
172
172
  [[package]]
173
173
  name = "contextweave"
174
- version = "0.3.0"
174
+ version = "0.3.1"
175
175
  source = { editable = "." }
176
176
  dependencies = [
177
177
  { name = "defusedxml" },
@@ -1,101 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from collections.abc import Callable
4
- from typing import TYPE_CHECKING
5
-
6
- from context_aware_translation.core.cancellation import raise_if_cancelled
7
- from context_aware_translation.documents.galgame import deserialize_translation_unit_stream
8
- from context_aware_translation.storage.schema.book_db import ChunkRecord
9
- from context_aware_translation.utils.hashing import compute_chunk_hash
10
-
11
- if TYPE_CHECKING:
12
- from context_aware_translation.core.context_manager import TranslationContextManager
13
- from context_aware_translation.core.progress import ProgressCallback
14
-
15
-
16
- class GalgameDocumentHandler:
17
- """DocumentTypeHandler for unit-preserving galgame translation."""
18
-
19
- def __init__(
20
- self,
21
- *,
22
- concurrency: int = 5,
23
- batch_size: int = 0,
24
- max_tokens_per_batch: int = 2000,
25
- ) -> None:
26
- self._concurrency = max(1, concurrency)
27
- self._batch_size = batch_size
28
- self._max_tokens_per_batch = max(1, max_tokens_per_batch)
29
-
30
- def add_text(
31
- self,
32
- text: str,
33
- max_token_size_per_chunk: int, # noqa: ARG002
34
- document_id: int,
35
- manager: TranslationContextManager,
36
- ) -> int:
37
- """Store one chunk per translation unit without deduping repeated dialogue text."""
38
- units = deserialize_translation_unit_stream(text)
39
- chunk_records: list[ChunkRecord] = []
40
- chunk_id = manager.term_repo.get_next_chunk_id()
41
- for unit in units:
42
- if not unit.text.strip():
43
- continue
44
- identity_text = f"{unit.relative_path}\0{unit.unit_id}\0{unit.text}"
45
- chunk_records.append(
46
- ChunkRecord(
47
- chunk_id=chunk_id,
48
- hash=compute_chunk_hash(identity_text, document_id=document_id),
49
- text=unit.text,
50
- document_id=document_id,
51
- is_extracted=False,
52
- is_summarized=False,
53
- )
54
- )
55
- chunk_id += 1
56
-
57
- new_chunk_records = [
58
- chunk_record for chunk_record in chunk_records if not manager.term_repo.chunk_exists_by_hash(chunk_record.hash)
59
- ]
60
- if new_chunk_records:
61
- manager._state_update([], new_chunk_records)
62
- return chunk_id - 1
63
-
64
- async def translate_chunks(
65
- self,
66
- document_ids: list[int],
67
- manager: TranslationContextManager,
68
- force: bool = False,
69
- source_ids: list[int] | None = None,
70
- cancel_check: Callable[[], bool] | None = None,
71
- progress_callback: ProgressCallback | None = None,
72
- ) -> None:
73
- """Delegate to the generic text translator while preserving one chunk per unit."""
74
- _ = source_ids
75
- raise_if_cancelled(cancel_check)
76
- await manager.translate_chunks(
77
- concurrency=self._concurrency,
78
- batch_size=self._batch_size,
79
- max_tokens_per_batch=self._max_tokens_per_batch,
80
- document_ids=document_ids,
81
- force=force,
82
- cancel_check=cancel_check,
83
- progress_callback=progress_callback,
84
- )
85
-
86
- def get_translated_lines(
87
- self,
88
- document_id: int,
89
- manager: TranslationContextManager,
90
- ) -> list[str]:
91
- """Return one translated entry per galgame translation unit."""
92
- chunks = manager.term_repo.list_chunks(document_id=document_id)
93
- if not chunks:
94
- raise ValueError("No chunks found in the database")
95
-
96
- sorted_chunks = sorted(chunks, key=lambda chunk: chunk.chunk_id)
97
- untranslated = [chunk for chunk in sorted_chunks if not chunk.is_translated or chunk.translation is None]
98
- if untranslated:
99
- untranslated_ids = [chunk.chunk_id for chunk in untranslated]
100
- raise ValueError(f"Cannot export: chunks {untranslated_ids} are not translated yet")
101
- return [chunk.translation for chunk in sorted_chunks if chunk.translation is not None]
@@ -1,98 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from context_aware_translation.core.galgame_document_handler import GalgameDocumentHandler
4
- from context_aware_translation.documents.galgame import TranslationUnit, serialize_translation_units
5
- from context_aware_translation.storage.schema.book_db import ChunkRecord, TranslationChunkRecord
6
-
7
-
8
- class DummyTermRepo:
9
- def __init__(self, chunks: list[ChunkRecord] | None = None) -> None:
10
- self._chunks = chunks or []
11
-
12
- def get_next_chunk_id(self) -> int:
13
- return max((chunk.chunk_id for chunk in self._chunks), default=-1) + 1
14
-
15
- def chunk_exists_by_hash(self, chunk_hash: str) -> int | None:
16
- for chunk in self._chunks:
17
- if chunk.hash == chunk_hash:
18
- return chunk.chunk_id
19
- return None
20
-
21
- def list_chunks(self, document_id: int | None = None) -> list[ChunkRecord]:
22
- if document_id is None:
23
- return list(self._chunks)
24
- return [chunk for chunk in self._chunks if chunk.document_id == document_id]
25
-
26
-
27
- class DummyManager:
28
- def __init__(self, chunks: list[ChunkRecord] | None = None) -> None:
29
- self.term_repo = DummyTermRepo(chunks)
30
- self.translate_calls: list[dict[str, object]] = []
31
-
32
- def _state_update(self, extracted_keyed_context, chunk_records): # noqa: ANN001, ARG002
33
- self.term_repo._chunks.extend(chunk_records)
34
-
35
- async def translate_chunks(self, **kwargs): # noqa: ANN003
36
- self.translate_calls.append(kwargs)
37
-
38
-
39
- def test_galgame_handler_add_text_preserves_repeated_dialogue_units() -> None:
40
- manager = DummyManager()
41
- handler = GalgameDocumentHandler()
42
- text = serialize_translation_units(
43
- [
44
- TranslationUnit(relative_path="script.json", unit_id="0", text="はい"),
45
- TranslationUnit(relative_path="script.json", unit_id="1", text="はい"),
46
- ]
47
- )
48
-
49
- last_chunk_id = handler.add_text(text, 100, 7, manager)
50
-
51
- chunks = manager.term_repo.list_chunks(document_id=7)
52
- assert last_chunk_id == 1
53
- assert [chunk.text for chunk in chunks] == ["はい", "はい"]
54
- assert chunks[0].hash != chunks[1].hash
55
-
56
-
57
- def test_galgame_handler_get_translated_lines_preserves_multiline_units() -> None:
58
- chunks: list[ChunkRecord] = [
59
- TranslationChunkRecord(
60
- chunk_id=0,
61
- hash="h0",
62
- text="a",
63
- document_id=7,
64
- is_translated=True,
65
- translation="第一行\n第二行",
66
- ),
67
- TranslationChunkRecord(
68
- chunk_id=1,
69
- hash="h1",
70
- text="b",
71
- document_id=7,
72
- is_translated=True,
73
- translation="第三行",
74
- ),
75
- ]
76
- manager = DummyManager(chunks)
77
- handler = GalgameDocumentHandler()
78
-
79
- assert handler.get_translated_lines(7, manager) == ["第一行\n第二行", "第三行"]
80
-
81
-
82
- async def test_galgame_handler_delegates_translation_with_configured_batching() -> None:
83
- manager = DummyManager()
84
- handler = GalgameDocumentHandler(concurrency=3, batch_size=0, max_tokens_per_batch=1234)
85
-
86
- await handler.translate_chunks([7], manager, force=True)
87
-
88
- assert manager.translate_calls == [
89
- {
90
- "concurrency": 3,
91
- "batch_size": 0,
92
- "max_tokens_per_batch": 1234,
93
- "document_ids": [7],
94
- "force": True,
95
- "cancel_check": None,
96
- "progress_callback": None,
97
- }
98
- ]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes