lcode-cli 0.46.0__tar.gz → 0.48.0__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 (211) hide show
  1. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/CHANGELOG.md +32 -1
  2. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/PKG-INFO +1 -1
  3. lcode_cli-0.48.0/docs/assets/film-fox-and-kitten.jpg +0 -0
  4. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/configuration.md +2 -0
  5. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/modes.md +91 -2
  6. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/quickstart.md +1 -1
  7. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/usage.md +1 -0
  8. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/__init__.py +1 -1
  9. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/agent.py +2 -0
  10. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/api.py +2 -0
  11. lcode_cli-0.48.0/src/lcode/assistant.py +166 -0
  12. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/config.py +2 -0
  13. lcode_cli-0.48.0/src/lcode/film.py +316 -0
  14. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/media.py +103 -8
  15. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/repl.py +67 -0
  16. lcode_cli-0.48.0/tests/test_assistant.py +163 -0
  17. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_comfy.py +3 -1
  18. lcode_cli-0.48.0/tests/test_film.py +154 -0
  19. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/.editorconfig +0 -0
  20. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/.github/CODEOWNERS +0 -0
  21. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  22. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  23. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  24. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/.github/ISSUE_TEMPLATE/model_request.yml +0 -0
  25. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  26. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/.github/dependabot.yml +0 -0
  27. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/.github/workflows/ci.yml +0 -0
  28. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/.github/workflows/docs.yml +0 -0
  29. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/.github/workflows/release.yml +0 -0
  30. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/.gitignore +0 -0
  31. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/.pre-commit-config.yaml +0 -0
  32. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/AGENTS.md +0 -0
  33. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/CODE_OF_CONDUCT.md +0 -0
  34. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/CONTRIBUTING.md +0 -0
  35. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/LICENSE +0 -0
  36. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/README.md +0 -0
  37. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/SECURITY.md +0 -0
  38. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/action.yml +0 -0
  39. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/agents.md +0 -0
  40. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/assets/demo.svg +0 -0
  41. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/assets/extra.css +0 -0
  42. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/automation.md +0 -0
  43. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/bench.md +0 -0
  44. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/changelog.md +0 -0
  45. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/commands.md +0 -0
  46. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/contributing.md +0 -0
  47. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/editors.md +0 -0
  48. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/git.md +0 -0
  49. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/hooks.md +0 -0
  50. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/how-it-works.md +0 -0
  51. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/index.md +0 -0
  52. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/installation.md +0 -0
  53. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/lsp.md +0 -0
  54. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/mcp.md +0 -0
  55. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/memory.md +0 -0
  56. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/models.md +0 -0
  57. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/sandbox.md +0 -0
  58. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/search.md +0 -0
  59. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/servers.md +0 -0
  60. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/docs/troubleshooting.md +0 -0
  61. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/examples/README.md +0 -0
  62. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/examples/api/fix_tests.py +0 -0
  63. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/examples/commands/review.md +0 -0
  64. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/examples/skills/commit-message/SKILL.md +0 -0
  65. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/examples/skills/commit-message/scripts/staged.sh +0 -0
  66. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/install.sh +0 -0
  67. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/mkdocs.yml +0 -0
  68. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/overrides/main.html +0 -0
  69. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/pyproject.toml +0 -0
  70. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/scripts/make_logos.py +0 -0
  71. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/scripts/record_demo.py +0 -0
  72. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/scripts/social-preview.html +0 -0
  73. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/__main__.py +0 -0
  74. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/acp.py +0 -0
  75. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/action.py +0 -0
  76. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/backends.py +0 -0
  77. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/bench.py +0 -0
  78. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/bench_backend.py +0 -0
  79. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/bench_runtime.py +0 -0
  80. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/catalog.py +0 -0
  81. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/checkpoints.py +0 -0
  82. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/checks.py +0 -0
  83. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/cli.py +0 -0
  84. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/clipboard.py +0 -0
  85. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/cloud.py +0 -0
  86. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/codesearch.py +0 -0
  87. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/comfy.py +0 -0
  88. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/context.py +0 -0
  89. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/edits.py +0 -0
  90. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/escalate.py +0 -0
  91. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/extensions.py +0 -0
  92. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/frontmatter.py +0 -0
  93. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/gitflow.py +0 -0
  94. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/hardware.py +0 -0
  95. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/hooks.py +0 -0
  96. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/imageopts.py +0 -0
  97. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/jobs.py +0 -0
  98. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/limits.py +0 -0
  99. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/lsp.py +0 -0
  100. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/matching.py +0 -0
  101. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/mcp/__init__.py +0 -0
  102. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/mcp/auth.py +0 -0
  103. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/mcp/catalog.py +0 -0
  104. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/mcp/catalog.toml +0 -0
  105. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/mcp/client.py +0 -0
  106. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/mcp/commands.py +0 -0
  107. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/mcp/config.py +0 -0
  108. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/mcp/http.py +0 -0
  109. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/mcp/manager.py +0 -0
  110. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/mcp/protocol.py +0 -0
  111. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/mcp/server.py +0 -0
  112. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/mcp/stdio.py +0 -0
  113. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/media.toml +0 -0
  114. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/media_catalog.py +0 -0
  115. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/memory.py +0 -0
  116. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/models.toml +0 -0
  117. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/modes.py +0 -0
  118. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/notify.py +0 -0
  119. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/ollama.py +0 -0
  120. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/permissions.py +0 -0
  121. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/planning.py +0 -0
  122. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/preview.py +0 -0
  123. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/render.py +0 -0
  124. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/repeats.py +0 -0
  125. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/repomap.py +0 -0
  126. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/residency.py +0 -0
  127. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/review.py +0 -0
  128. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/sandbox.py +0 -0
  129. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/screenshots.py +0 -0
  130. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/secretscan.py +0 -0
  131. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/servers/__init__.py +0 -0
  132. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/servers/encord.py +0 -0
  133. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/servers/valohai.py +0 -0
  134. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/servers/xai.py +0 -0
  135. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/sessions.py +0 -0
  136. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/steer.py +0 -0
  137. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/subagents.py +0 -0
  138. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/tools.py +0 -0
  139. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/unreachable.py +0 -0
  140. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/update.py +0 -0
  141. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/vision.py +0 -0
  142. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/web.py +0 -0
  143. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/workflows/__init__.py +0 -0
  144. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/workflows/flux2-klein-4b-t2i.json +0 -0
  145. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/workflows/remove-background.json +0 -0
  146. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/workflows/smooth-film.json +0 -0
  147. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/workflows/sound-stable-audio.json +0 -0
  148. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/workflows/upscale-esrgan.json +0 -0
  149. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/workflows/upscale-video-esrgan.json +0 -0
  150. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/workflows/wan21-fun-camera.json +0 -0
  151. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/workflows/wan21-vace.json +0 -0
  152. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/workflows/wan22-fun-inp-5b.json +0 -0
  153. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/workflows/wan22-ti2v-5b.json +0 -0
  154. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/src/lcode/workflows/z-image-turbo-t2i.json +0 -0
  155. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/comfy_standin.py +0 -0
  156. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/conftest.py +0 -0
  157. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/fake_lsp_server.py +0 -0
  158. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/fake_mcp_server.py +0 -0
  159. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_acp.py +0 -0
  160. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_action.py +0 -0
  161. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_agent.py +0 -0
  162. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_api.py +0 -0
  163. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_backends.py +0 -0
  164. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_bench.py +0 -0
  165. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_catalog.py +0 -0
  166. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_checkpoints.py +0 -0
  167. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_checks.py +0 -0
  168. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_cli.py +0 -0
  169. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_clipboard.py +0 -0
  170. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_cloud.py +0 -0
  171. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_codesearch.py +0 -0
  172. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_config.py +0 -0
  173. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_context.py +0 -0
  174. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_context_picker.py +0 -0
  175. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_escalate.py +0 -0
  176. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_extensions.py +0 -0
  177. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_gitflow.py +0 -0
  178. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_hooks.py +0 -0
  179. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_image_edit.py +0 -0
  180. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_image_generate.py +0 -0
  181. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_jobs.py +0 -0
  182. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_look.py +0 -0
  183. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_lsp.py +0 -0
  184. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_matching.py +0 -0
  185. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_mcp.py +0 -0
  186. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_media_catalog.py +0 -0
  187. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_memory.py +0 -0
  188. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_model_picker.py +0 -0
  189. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_modes.py +0 -0
  190. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_permissions.py +0 -0
  191. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_plan_mode.py +0 -0
  192. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_repeats.py +0 -0
  193. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_repomap.py +0 -0
  194. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_residency.py +0 -0
  195. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_review.py +0 -0
  196. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_robustness.py +0 -0
  197. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_sandbox.py +0 -0
  198. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_screenshots.py +0 -0
  199. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_secretscan.py +0 -0
  200. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_servers.py +0 -0
  201. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_sessions.py +0 -0
  202. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_steer.py +0 -0
  203. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_stuck.py +0 -0
  204. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_subagents.py +0 -0
  205. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_tools.py +0 -0
  206. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_update.py +0 -0
  207. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_video.py +0 -0
  208. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_vision.py +0 -0
  209. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_web.py +0 -0
  210. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/tests/test_xai.py +0 -0
  211. {lcode_cli-0.46.0 → lcode_cli-0.48.0}/uv.lock +0 -0
@@ -6,6 +6,35 @@ All notable changes to lcode are documented here. The format follows
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.48.0] - 2026-10-24
10
+
11
+ ### Added
12
+
13
+ - **Films** (#155): `/film a fox finds a lost kitten --shots 3` makes a short film with the same
14
+ characters in every shot. The prompt assistant writes the storyboard (saved, editable); each
15
+ character gets a reference picture; each shot starts from a keyframe made with the cast as
16
+ references and is animated; the shots are joined with cuts or fades, with an optional sound
17
+ track. `/film shot 2` remakes one shot, `/film stitch` joins again. A real 3-shot film took 4
18
+ minutes on a 12 GB laptop GPU. See [Films](https://nasser1941.github.io/lcode/modes/#films).
19
+
20
+ ## [0.47.0] - 2026-10-24
21
+
22
+ ### Added
23
+
24
+ - **The prompt assistant** (#156): a small local model (`qwen3.5:4b` when installed) writes fuller
25
+ prompts in English for image and video mode, reads a start picture, takes follow-ups ("darker")
26
+ as changes, and checks pictures against the request (`check_results`). See
27
+ [The prompt assistant](https://nasser1941.github.io/lcode/modes/#the-prompt-assistant).
28
+ - **Measured:** video prompts get much better (a near-black "city at night rain" became a neon
29
+ street scene), picture prompts don't (FLUX.2 klein already reads short and non-English prompts
30
+ well), so by default it writes video prompts only (`prompt_assistant = video`); `all` adds
31
+ pictures and follow-ups. `--raw` sends one request as typed.
32
+ - It's loaded for each job and unloaded right after, and your own words stay in the gallery.
33
+
34
+ ### Fixed
35
+
36
+ - The modes page has its "ComfyUI" heading back (it had slipped under video mode).
37
+
9
38
  ## [0.46.0] - 2026-10-24
10
39
 
11
40
  ### Added
@@ -997,7 +1026,9 @@ First public release.
997
1026
  - `AGENTS.md` project instructions and `/init` to generate them.
998
1027
  - One-line installer for Linux and macOS.
999
1028
 
1000
- [Unreleased]: https://github.com/nasser1941/lcode/compare/v0.46.0...HEAD
1029
+ [Unreleased]: https://github.com/nasser1941/lcode/compare/v0.48.0...HEAD
1030
+ [0.48.0]: https://github.com/nasser1941/lcode/compare/v0.47.0...v0.48.0
1031
+ [0.47.0]: https://github.com/nasser1941/lcode/compare/v0.46.0...v0.47.0
1001
1032
  [0.46.0]: https://github.com/nasser1941/lcode/compare/v0.45.0...v0.46.0
1002
1033
  [0.45.0]: https://github.com/nasser1941/lcode/compare/v0.44.0...v0.45.0
1003
1034
  [0.44.0]: https://github.com/nasser1941/lcode/compare/v0.43.0...v0.44.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: lcode-cli
3
- Version: 0.46.0
3
+ Version: 0.48.0
4
4
  Summary: A local-first terminal coding agent powered by open-weight models on your own GPU or Mac, via Ollama.
5
5
  Project-URL: Homepage, https://nasser1941.github.io/lcode/
6
6
  Project-URL: Documentation, https://nasser1941.github.io/lcode/
@@ -28,6 +28,8 @@ lcode config path # print the file location
28
28
  | `comfyui_path` | (found) | Your ComfyUI folder, if lcode doesn't find it; lcode starts it when needed ([ComfyUI](modes.md#comfyui)) |
29
29
  | `media_dir` | `.lcode/media` | Where images and videos go: a folder in the project, or an absolute path |
30
30
  | `preview` | `auto` | Images in the terminal: `auto`, `kitty`, `iterm`, `blocks` (colour text) or `off` ([results](modes.md#results)) |
31
+ | `prompt_assistant` | `video` | A small model writes fuller prompts: `video`, `all` (pictures and follow-ups too), `off`, or an Ollama model ([prompt assistant](modes.md#the-prompt-assistant)) |
32
+ | `check_results` | `false` | The prompt assistant checks each picture against the request |
31
33
  | `video_model` | `wan22-ti2v-5b` | The model video mode uses: a key from `lcode media` ([video mode](modes.md#video-mode)) |
32
34
  | `image_model` | `flux2-klein-4b` | The model image mode uses: a key from `lcode media` ([image models](modes.md#image-models)) |
33
35
  | `think` | `true` | Let the model reason before answering |
@@ -196,6 +196,97 @@ video ❯ /play
196
196
  - **Long renders:** progress shows the step and the time left. With `notify` on, lcode sends a
197
197
  desktop notification when a clip that took longer than `notify_after` seconds is done.
198
198
 
199
+ ## Films
200
+
201
+ From one idea, lcode makes a short film with the same characters in every shot:
202
+
203
+ ```text
204
+ video ❯ /film a red fox finds a lost white kitten in a snowy forest and they walk home together --shots 3 --seconds 3 --transition fade --sound "soft wind and footsteps in snow"
205
+ The Fox and the Kitten (.lcode/media/films/the-fox-and-the-kitten)
206
+ look: cinematic realism, soft winter light, cool blues and warm oranges, shallow depth of field
207
+ cast: Fox — a red fox with a white chest and bushy tail
208
+ cast: Kitten — a small white kitten with large ears
209
+ 1. The Fox spots the shivering Kitten trapped under a snowbank in a dense pine forest. [Fox, Kitten] — static low angle shot, 3 s
210
+ 2. The Fox gently nudges the Kitten free and they stand side by side facing the camera. [Fox, Kitten] — slow push in, 3 s
211
+ 3. The pair trots away from the forest into a warm, lit doorway together. [Fox, Kitten] — tracking shot, 3 s
212
+ …
213
+ ◆ The Fox and the Kitten: .lcode/media/films/the-fox-and-the-kitten/film-sound.mp4
214
+ ```
215
+
216
+ ![The cast's reference pictures (right) and a frame from each of the three shots](assets/film-fox-and-kitten.jpg)
217
+
218
+ 1. **The storyboard:** the [prompt assistant](#the-prompt-assistant) writes it from your idea: the
219
+ look of the whole film, the cast (each character described once) and the shots (what happens,
220
+ the camera, who's in it, how long). It's saved as `storyboard.json` (and a readable
221
+ `storyboard.md`) in the film's folder.
222
+ 2. **The cast:** each character gets a reference picture, made once, in `cast/`.
223
+ 3. **The shots:** each starts as a keyframe made with the cast's pictures as references, so the
224
+ characters look the same in every shot, and is then animated by video mode's model (`shots/`).
225
+ 4. **The film:** the shots are joined into `film.mp4` with cuts or fades (ffmpeg), and
226
+ `--sound "…"` adds a sound track for the whole film (`film-sound.mp4`).
227
+
228
+ | Command | What it does |
229
+ |---|---|
230
+ | `/film <idea>` | The storyboard, then the film. Options: `--shots 3` (1 to 8), `--seconds 4` per shot, `--quality fast`, `--transition cut` or `fade`, `--sound "…"` |
231
+ | `/film plan <idea>` | Only the storyboard, to read or edit before making it |
232
+ | `/film make [name]` | The film from its storyboard (the latest film without a name) |
233
+ | `/film shot 2 [name]` | Shot 2 made again, and the film joined again |
234
+ | `/film stitch [name]` | The shots joined again (after editing the transition or the sound) |
235
+ | `/film show [name]`, `/film list` | One film's storyboard, or all the films here |
236
+
237
+ - **Needs:** the prompt assistant's model (`ollama pull qwen3.5:4b`), FLUX.2 klein 4B, video
238
+ mode's model, and ffmpeg.
239
+ - **Measured** on the RTX 4080 Laptop GPU (12 GB): the 3-shot film above (3 s shots at `fast`, two
240
+ cast members, fades and sound) took 4 minutes, after a 5-second storyboard. The fox and the
241
+ kitten look the same in all three shots.
242
+
243
+ ## The prompt assistant
244
+
245
+ Image and video models do better with some prompts than others. A small local language model,
246
+ the prompt assistant, can write the fuller prompt for you, read a short follow-up as a change to
247
+ the last picture, and check a result against what you asked. It runs in Ollama, loaded for each
248
+ job and unloaded right after, so the image or video model keeps the GPU.
249
+
250
+ ```text
251
+ video ❯ city at night rain
252
+ ✎ A lone figure walks through a neon-drenched city street under a relentless summer rain. The shot slowly zooms in on their silhouette as water droplets ripple across the pavement…
253
+ ◆ #1 .lcode/media/…-city-at-night-rain.mp4 864×480 · Wan 2.2 TI2V 5B · seed 2001 · 62 s
254
+ ```
255
+
256
+ - **Where it helps:** the `prompt_assistant` setting. `video` (the default) writes video prompts,
257
+ `all` writes picture prompts too and reads follow-ups, `off` sends prompts as typed, and an
258
+ Ollama model's name (`qwen3.5:9b`) uses that model everywhere. Otherwise lcode picks a small
259
+ installed one (`qwen3.5:4b` first); with none installed, prompts go as typed. `--raw` sends one
260
+ request as typed.
261
+ - **Your words stay yours:** the gallery and file names keep what you typed; the fuller prompt is
262
+ shown (✎) and saved in the JSON next to the result (`full_prompt`).
263
+ - **Any language:** it writes in English from what you type. FLUX.2 klein reads other languages
264
+ well on its own; Wan does better in English.
265
+ - **A start picture** is shown to it (it can see), so a video prompt describes what the picture
266
+ shows and then the motion.
267
+ - **Follow-ups** (with `all`): a short request after a picture ("darker", "add a hat") is read as a
268
+ change to it and made as an edit; a new description makes a new picture.
269
+ - **Checking results:** `lcode config set check_results true` has it look at each picture and say
270
+ whether it shows what you asked, with a better prompt when it doesn't (⚠ … Try: …).
271
+
272
+ ### Measured with the assistant
273
+
274
+ On the RTX 4080 Laptop GPU (12 GB) with `qwen3.5:4b`, the same seeds with and without the
275
+ assistant:
276
+
277
+ - **Pictures (FLUX.2 klein 4B, six short prompts, two not in English):** no clear gain. "fox snow",
278
+ "a cat astronaut", the panda (asked in Chinese) and the OPEN sign came out about as well either
279
+ way; "cozy cabin" became a twilight exterior instead of an interior, and for a rainy Paris café
280
+ (asked in German) it added a "Bienvenue" sign nobody asked for. It costs about 6 s per picture,
281
+ 12 s with the check, against 3.6 s for the picture itself. So pictures go as typed by default.
282
+ - **Video (Wan 2.2 TI2V 5B, `fast`):** clearly better. "city at night rain" as typed came out
283
+ almost black; the fuller prompt made a neon street in the rain with a person walking through it.
284
+ "dog running beach" became a more detailed golden retriever on the sand. The few seconds it
285
+ takes are small next to a minute of video. So video prompts are written by default.
286
+ - **The check** said every one of the six pictures matched, which they did; it hasn't been
287
+ measured on pictures that miss.
288
+
289
+ ## ComfyUI
199
290
 
200
291
  ComfyUI runs the image and video models; lcode drives it through its API.
201
292
 
@@ -292,8 +383,6 @@ themselves:
292
383
 
293
384
  ## Coming next
294
385
 
295
- - **#155 Movies:** storyboards with a consistent cast, shots stitched into one film.
296
- - **#156 Prompt assistant:** a small local model for prompts and follow-ups.
297
386
  - **#157 Cloud generation**, with costs shown (Grok Imagine first).
298
387
 
299
388
  The permission mode (`ask`, `plan`, `auto-edit`, `yolo`) is a different setting: `/permissions`
@@ -12,7 +12,7 @@ lcode
12
12
 
13
13
  ```text
14
14
  ╭──────────────────────────────────────────────╮
15
- │ lcode v0.46.0 — local coding agent │
15
+ │ lcode v0.48.0 — local coding agent │
16
16
  │ │
17
17
  │ model lcode-qwen3.6-35b │
18
18
  │ context 256K tokens │
@@ -84,6 +84,7 @@ reasoning is on.
84
84
  | `/options`, `/again`, `/vary N`, `/gallery`, `/open N` | Image mode: [options for the session, follow-ups on results](modes.md#results) |
85
85
  | `/edit N`, `/use N`, `/extend N`, `/upscale N`, `/nobg N` | Image mode: [edit, follow, outpaint, upscale, cut out](modes.md#editing) |
86
86
  | `/animate N`, `/play N` | [Video mode](modes.md#video-mode): animate image N; play a clip |
87
+ | `/film <idea>` (`plan`, `make`, `shot N`, `stitch`, `list`) | [A short film](modes.md#films) with the same characters in every shot |
87
88
  | `/restyle N`, `/smooth N`, `/sound N`, `/upscale N` | [Video mode](modes.md#video-mode): a new look, more frames, sound, more pixels |
88
89
  | `/permissions [ask\|plan\|auto-edit\|yolo]` | Set the permission mode |
89
90
  | `/cd DIR` | Change the working directory |
@@ -3,7 +3,7 @@
3
3
  From a program: `from lcode import Session` (see lcode.api).
4
4
  """
5
5
 
6
- __version__ = "0.46.0"
6
+ __version__ = "0.48.0"
7
7
 
8
8
  API = ("Session", "Result", "Options", "SetupError")
9
9
 
@@ -310,6 +310,8 @@ class Settings:
310
310
  media_dir: str = ".lcode/media" # where image and video mode save their files (lcode.media)
311
311
  image_model: str = "flux2-klein-4b" # the media catalog's model image mode uses (lcode.media_catalog)
312
312
  video_model: str = "wan22-ti2v-5b" # and video mode's
313
+ prompt_assistant: str = "video" # video, all, off or an Ollama model: writes fuller prompts (lcode.assistant)
314
+ check_results: bool = False # the prompt assistant checks each image against the request
313
315
  preview: str = "auto" # images in the terminal: auto, kitty, iterm, blocks or off (lcode.preview)
314
316
  num_batch: int | None = None
315
317
  keep_alive: str = "30m"
@@ -202,6 +202,8 @@ def open_agent(cwd: Path, options: Options, console: Console, hw: Hardware | Non
202
202
  media_dir=cfg["media_dir"],
203
203
  image_model=cfg["image_model"],
204
204
  video_model=cfg["video_model"],
205
+ prompt_assistant=cfg["prompt_assistant"],
206
+ check_results=cfg["check_results"],
205
207
  preview=cfg["preview"],
206
208
  web=switch(options.web, cfg["web"], "on"),
207
209
  search_backend=cfg["search_backend"],
@@ -0,0 +1,166 @@
1
+ """The prompt assistant: a small local language model that helps image and video mode with words.
2
+
3
+ Image and video models do better with detailed prompts in English, written the way each expects (a picture's subject,
4
+ light and composition; a clip's motion and camera). The assistant:
5
+
6
+ - **expands** a short request into such a prompt, from any language;
7
+ - **looks at a start picture** (it can see) and writes the video prompt around it;
8
+ - **reads follow-ups** ("darker", "add a hat") as changes to the last image;
9
+ - **checks a result** against the request and suggests a better prompt when it misses;
10
+ - **writes storyboards** for films (lcode.film).
11
+
12
+ It runs in Ollama, loaded for each job and unloaded right after (keep_alive 0), so the image or video model has the GPU
13
+ to itself while it works. The `prompt_assistant` setting says where it helps: `video` (the default: measured, video
14
+ models make much better clips from fuller prompts, while FLUX.2 klein didn't make better pictures), `all` (pictures
15
+ too, and follow-ups), `off`, or an Ollama model's name (everywhere, with that model).
16
+ """
17
+
18
+ from __future__ import annotations
19
+
20
+ import base64
21
+ import json
22
+ import re
23
+ from dataclasses import dataclass
24
+ from pathlib import Path
25
+
26
+ PREFERRED = ("qwen3.5:4b", "qwen3.5:9b", "qwen3:4b", "gemma3:4b", "llama3.2:3b")
27
+ MAX_PROMPT = 900 # characters: image and video models read only so much
28
+
29
+ STYLE_GUIDE = {
30
+ "image": (
31
+ "You write prompts for an image generation model. Rewrite the user's request as one detailed prompt in "
32
+ "English: the subject, what it looks like, the setting, the light, the composition and the medium (photo, "
33
+ "painting…). Keep everything the user asked for, add no new subjects or text, and keep any words in quotes "
34
+ "exactly as written (they are text to show in the picture). 40 to 80 words, one paragraph, no lists."
35
+ ),
36
+ "edit": (
37
+ "You write instructions for an image editing model. Rewrite the user's request as one short, clear "
38
+ "instruction in English that says exactly what to change in the picture and what to keep. 10 to 30 words."
39
+ ),
40
+ "video": (
41
+ "You write prompts for a video generation model. Rewrite the user's request as one prompt in English: the "
42
+ "subject and the setting, the motion over time, the camera (a shot: slow zoom in, pan left, tracking shot, "
43
+ "static), and the light and mood. Describe movement, not a single picture. Never mention a camera as an "
44
+ "object in the scene. 50 to 90 words, one paragraph."
45
+ ),
46
+ }
47
+ START_IMAGE = (
48
+ "The video starts from the attached picture. Begin the prompt by describing what the picture shows (subject, "
49
+ "setting, light, style) in one sentence, then the motion the user asked for."
50
+ )
51
+ FOLLOW_UP = (
52
+ "The user made a picture from this request: {last!r}. Now they wrote: {text!r}.\n"
53
+ "Is the new text a change to that picture (like 'darker', 'add a hat', 'make it night', 'without the car'), or "
54
+ "a description of a new, different picture?\n"
55
+ 'Answer with JSON only: {{"change": true or false, "instruction": "the change as one clear editing '
56
+ 'instruction in English, or empty"}}'
57
+ )
58
+ CHECK = (
59
+ "The user asked for: {request!r}.\nLook at the picture. Does it show what was asked? Answer with JSON only: "
60
+ '{{"matches": true or false, "missing": "what is missing or wrong, or empty", '
61
+ '"better_prompt": "a clearer prompt for the request when it does not match, or empty"}}'
62
+ )
63
+
64
+
65
+ class AssistantError(Exception):
66
+ pass
67
+
68
+
69
+ @dataclass
70
+ class Check:
71
+ matches: bool
72
+ missing: str = ""
73
+ better_prompt: str = ""
74
+
75
+
76
+ SCOPES = ("off", "video", "all", "auto")
77
+
78
+
79
+ def pick(ollama, setting: str) -> str | None:
80
+ """The assistant's model for a setting: off, or a small installed model (video, all, auto), or a model's name."""
81
+ if setting in ("off", "", None):
82
+ return None
83
+ try:
84
+ installed = set(ollama.installed_names())
85
+ except Exception:
86
+ return None
87
+ if setting not in SCOPES:
88
+ return setting if setting in installed or f"{setting}:latest" in installed else None
89
+ return next((m for m in PREFERRED if m in installed), None)
90
+
91
+
92
+ class Assistant:
93
+ def __init__(self, ollama, model: str):
94
+ self.ollama, self.model = ollama, model
95
+
96
+ def _ask(self, system: str, user: str, images: list[Path] = (), json_answer: bool = False) -> str:
97
+ message: dict = {"role": "user", "content": user}
98
+ if images:
99
+ message["images"] = [base64.b64encode(p.read_bytes()).decode() for p in images]
100
+ payload = {
101
+ "model": self.model,
102
+ "messages": [{"role": "system", "content": system}, message],
103
+ "think": False,
104
+ "keep_alive": 0, # unloaded right after: the image or video model needs the GPU
105
+ "options": {"temperature": 0.4, "num_ctx": 4096},
106
+ }
107
+ if json_answer:
108
+ payload["format"] = "json"
109
+ try:
110
+ reply = self.ollama.chat(payload, timeout=180)
111
+ except Exception as e:
112
+ raise AssistantError(f"the prompt assistant ({self.model}) didn't answer: {e}") from e
113
+ return ((reply.get("message") or {}).get("content") or "").strip()
114
+
115
+ def expand(self, request: str, kind: str = "image", start: Path | None = None) -> str:
116
+ """A detailed prompt for the model, in English, from the user's request (and a start picture)."""
117
+ system = STYLE_GUIDE.get(kind, STYLE_GUIDE["image"])
118
+ if start is not None and kind == "video":
119
+ system += " " + START_IMAGE
120
+ text = clean(self._ask(system, request, [start] if start is not None else []))
121
+ return text[:MAX_PROMPT] if text else request
122
+
123
+ def follow_up(self, text: str, last: str) -> str | None:
124
+ """When `text` is a change to the last picture, the change as an editing instruction; else None."""
125
+ answer = parse_json(
126
+ self._ask("You answer with JSON only.", FOLLOW_UP.format(last=last, text=text), json_answer=True)
127
+ )
128
+ if answer.get("change") is True and str(answer.get("instruction") or "").strip():
129
+ return str(answer["instruction"]).strip()
130
+ return None
131
+
132
+ def check(self, picture: Path, request: str) -> Check:
133
+ """Whether the picture shows what was asked, and a better prompt when it doesn't."""
134
+ answer = parse_json(
135
+ self._ask(
136
+ "You check pictures. You answer with JSON only.",
137
+ CHECK.format(request=request),
138
+ [picture],
139
+ json_answer=True,
140
+ )
141
+ )
142
+ matches = answer.get("matches")
143
+ if not isinstance(matches, bool):
144
+ raise AssistantError("the prompt assistant's check had no answer")
145
+ return Check(matches, str(answer.get("missing") or "").strip(), str(answer.get("better_prompt") or "").strip())
146
+
147
+ def write(self, system: str, request: str, json_answer: bool = False) -> str:
148
+ """Any other writing job (storyboards)."""
149
+ return self._ask(system, request, json_answer=json_answer)
150
+
151
+
152
+ def clean(text: str) -> str:
153
+ """The prompt alone: without quotes around it, a 'Prompt:' label, or reasoning tags."""
154
+ text = re.sub(r"<think>.*?</think>", "", text, flags=re.S).strip()
155
+ text = re.sub(r"^(here is|here's)[^:\n]*:\s*", "", text, flags=re.I)
156
+ text = re.sub(r"^\**\s*(prompt|rewritten prompt|instruction)\s*\**\s*:\s*\**\s*", "", text, flags=re.I)
157
+ return " ".join(text.strip().strip('"').strip("“”").split())
158
+
159
+
160
+ def parse_json(text: str) -> dict:
161
+ m = re.search(r"\{.*\}", text, flags=re.S)
162
+ try:
163
+ value = json.loads(m.group(0) if m else text)
164
+ except ValueError:
165
+ return {}
166
+ return value if isinstance(value, dict) else {}
@@ -47,6 +47,8 @@ SETTINGS: dict[str, tuple[object, type, str]] = {
47
47
  "media_dir": (".lcode/media", str, "where images and videos go: a folder in the project, or an absolute path"),
48
48
  "image_model": ("flux2-klein-4b", str, "the model image mode uses: a key from `lcode media`"),
49
49
  "video_model": ("wan22-ti2v-5b", str, "the model video mode uses: a key from `lcode media`"),
50
+ "prompt_assistant": ("video", str, "a small model writes fuller prompts: video | all | off | an Ollama model"),
51
+ "check_results": (False, bool, "the prompt assistant checks each image against the request"),
50
52
  "preview": ("auto", str, "images in the terminal: auto | kitty | iterm | blocks (colour text) | off"),
51
53
  "think": (True, bool, "let the model reason before answering (slower, better)"),
52
54
  "web": ("on", str, "web search and page fetching for the model: on | ask | off"),