lcode-cli 0.63.0__tar.gz → 0.64.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 (260) hide show
  1. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/CHANGELOG.md +23 -1
  2. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/PKG-INFO +1 -1
  3. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/mcp.md +36 -0
  4. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/modes.md +2 -1
  5. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/public-benchmarks.md +37 -0
  6. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/quickstart.md +1 -1
  7. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/__init__.py +1 -1
  8. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/mcp/catalog.toml +39 -1
  9. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/repl.py +11 -12
  10. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/repl_media.py +5 -2
  11. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_image_generate.py +32 -0
  12. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_jobs.py +1 -1
  13. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_mcp.py +18 -0
  14. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_modes.py +10 -1
  15. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/.editorconfig +0 -0
  16. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/.github/CODEOWNERS +0 -0
  17. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  18. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  19. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  20. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/.github/ISSUE_TEMPLATE/model_request.yml +0 -0
  21. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  22. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/.github/dependabot.yml +0 -0
  23. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/.github/workflows/ci.yml +0 -0
  24. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/.github/workflows/docs.yml +0 -0
  25. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/.github/workflows/release.yml +0 -0
  26. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/.gitignore +0 -0
  27. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/.pre-commit-config.yaml +0 -0
  28. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/AGENTS.md +0 -0
  29. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/CODE_OF_CONDUCT.md +0 -0
  30. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/CONTRIBUTING.md +0 -0
  31. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/LICENSE +0 -0
  32. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/README.md +0 -0
  33. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/SECURITY.md +0 -0
  34. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/action.yml +0 -0
  35. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/agents.md +0 -0
  36. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/assets/demo.svg +0 -0
  37. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/assets/extra.css +0 -0
  38. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/assets/film-fox-and-kitten.jpg +0 -0
  39. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/assets/long-clip-tulip.jpg +0 -0
  40. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/automation.md +0 -0
  41. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/bench.md +0 -0
  42. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/changelog.md +0 -0
  43. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/commands.md +0 -0
  44. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/configuration.md +0 -0
  45. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/contributing.md +0 -0
  46. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/editors.md +0 -0
  47. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/git.md +0 -0
  48. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/hooks.md +0 -0
  49. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/how-it-works.md +0 -0
  50. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/index.md +0 -0
  51. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/installation.md +0 -0
  52. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/lsp.md +0 -0
  53. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/memory.md +0 -0
  54. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/models.md +0 -0
  55. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/sandbox.md +0 -0
  56. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/search.md +0 -0
  57. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/servers.md +0 -0
  58. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/traces.md +0 -0
  59. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/troubleshooting.md +0 -0
  60. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/docs/usage.md +0 -0
  61. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/examples/README.md +0 -0
  62. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/examples/api/fix_tests.py +0 -0
  63. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/examples/commands/review.md +0 -0
  64. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/examples/skills/commit-message/SKILL.md +0 -0
  65. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/examples/skills/commit-message/scripts/staged.sh +0 -0
  66. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/install.sh +0 -0
  67. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/mkdocs.yml +0 -0
  68. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/overrides/main.html +0 -0
  69. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/pyproject.toml +0 -0
  70. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/scripts/make_logos.py +0 -0
  71. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/scripts/record_demo.py +0 -0
  72. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/scripts/social-preview.html +0 -0
  73. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/__main__.py +0 -0
  74. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/acp.py +0 -0
  75. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/action.py +0 -0
  76. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/agent.py +0 -0
  77. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/agent_base.py +0 -0
  78. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/agent_checks.py +0 -0
  79. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/agent_context.py +0 -0
  80. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/agent_model.py +0 -0
  81. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/agent_prompt.py +0 -0
  82. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/agent_sessions.py +0 -0
  83. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/api.py +0 -0
  84. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/assistant.py +0 -0
  85. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/backends.py +0 -0
  86. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/bench.py +0 -0
  87. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/bench_backend.py +0 -0
  88. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/bench_budgets.py +0 -0
  89. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/bench_checks.py +0 -0
  90. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/bench_dedupe.py +0 -0
  91. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/bench_flaky.py +0 -0
  92. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/bench_logsum.py +0 -0
  93. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/bench_quick.py +0 -0
  94. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/bench_quotes.py +0 -0
  95. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/bench_runtime.py +0 -0
  96. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/catalog.py +0 -0
  97. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/checkpoints.py +0 -0
  98. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/checks.py +0 -0
  99. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/cli.py +0 -0
  100. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/cli_args.py +0 -0
  101. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/clipboard.py +0 -0
  102. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/clips.py +0 -0
  103. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/cloud.py +0 -0
  104. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/codesearch.py +0 -0
  105. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/comfy.py +0 -0
  106. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/config.py +0 -0
  107. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/context.py +0 -0
  108. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/doctor.py +0 -0
  109. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/edits.py +0 -0
  110. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/escalate.py +0 -0
  111. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/extensions.py +0 -0
  112. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/film.py +0 -0
  113. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/frontmatter.py +0 -0
  114. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/gitflow.py +0 -0
  115. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/harbor.py +0 -0
  116. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/harbor_bench.py +0 -0
  117. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/hardware.py +0 -0
  118. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/hooks.py +0 -0
  119. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/imageopts.py +0 -0
  120. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/jobs.py +0 -0
  121. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/limits.py +0 -0
  122. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/lsp.py +0 -0
  123. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/manual.py +0 -0
  124. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/matching.py +0 -0
  125. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/mcp/__init__.py +0 -0
  126. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/mcp/auth.py +0 -0
  127. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/mcp/catalog.py +0 -0
  128. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/mcp/client.py +0 -0
  129. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/mcp/commands.py +0 -0
  130. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/mcp/config.py +0 -0
  131. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/mcp/http.py +0 -0
  132. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/mcp/manager.py +0 -0
  133. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/mcp/protocol.py +0 -0
  134. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/mcp/server.py +0 -0
  135. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/mcp/stdio.py +0 -0
  136. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/media.py +0 -0
  137. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/media.toml +0 -0
  138. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/media_catalog.py +0 -0
  139. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/media_cloud.py +0 -0
  140. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/media_video.py +0 -0
  141. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/memory.py +0 -0
  142. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/models.toml +0 -0
  143. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/modes.py +0 -0
  144. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/notify.py +0 -0
  145. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/ollama.py +0 -0
  146. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/permissions.py +0 -0
  147. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/planning.py +0 -0
  148. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/preview.py +0 -0
  149. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/qt_hook.py +0 -0
  150. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/render.py +0 -0
  151. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/repeats.py +0 -0
  152. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/repl_history.py +0 -0
  153. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/repl_models.py +0 -0
  154. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/repl_sessions.py +0 -0
  155. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/replay.py +0 -0
  156. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/repoid.py +0 -0
  157. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/repomap.py +0 -0
  158. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/residency.py +0 -0
  159. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/review.py +0 -0
  160. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/sandbox.py +0 -0
  161. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/screenshots.py +0 -0
  162. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/screenshots_web.py +0 -0
  163. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/secretscan.py +0 -0
  164. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/servers/__init__.py +0 -0
  165. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/servers/encord.py +0 -0
  166. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/servers/valohai.py +0 -0
  167. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/servers/xai.py +0 -0
  168. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/sessions.py +0 -0
  169. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/steer.py +0 -0
  170. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/subagents.py +0 -0
  171. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/tool_helpers.py +0 -0
  172. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/tool_schemas.py +0 -0
  173. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/tools.py +0 -0
  174. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/tools_base.py +0 -0
  175. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/tools_edit.py +0 -0
  176. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/tools_shell.py +0 -0
  177. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/trace_export.py +0 -0
  178. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/trace_view.py +0 -0
  179. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/traces.py +0 -0
  180. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/unreachable.py +0 -0
  181. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/update.py +0 -0
  182. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/vision.py +0 -0
  183. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/web.py +0 -0
  184. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/workflows/__init__.py +0 -0
  185. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/workflows/flux2-klein-4b-t2i.json +0 -0
  186. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/workflows/remove-background.json +0 -0
  187. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/workflows/smooth-film.json +0 -0
  188. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/workflows/sound-stable-audio.json +0 -0
  189. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/workflows/upscale-esrgan.json +0 -0
  190. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/workflows/upscale-video-esrgan.json +0 -0
  191. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/workflows/wan21-fun-camera.json +0 -0
  192. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/workflows/wan21-vace.json +0 -0
  193. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/workflows/wan22-fun-inp-5b.json +0 -0
  194. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/workflows/wan22-ti2v-5b.json +0 -0
  195. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/src/lcode/workflows/z-image-turbo-t2i.json +0 -0
  196. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/comfy_standin.py +0 -0
  197. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/conftest.py +0 -0
  198. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/fake_lsp_server.py +0 -0
  199. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/fake_mcp_server.py +0 -0
  200. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_acp.py +0 -0
  201. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_action.py +0 -0
  202. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_agent.py +0 -0
  203. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_api.py +0 -0
  204. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_assistant.py +0 -0
  205. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_backends.py +0 -0
  206. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_bench.py +0 -0
  207. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_bench_work.py +0 -0
  208. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_broken_stream.py +0 -0
  209. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_catalog.py +0 -0
  210. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_checkpoints.py +0 -0
  211. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_checks.py +0 -0
  212. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_cli.py +0 -0
  213. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_clipboard.py +0 -0
  214. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_cloud.py +0 -0
  215. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_codesearch.py +0 -0
  216. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_comfy.py +0 -0
  217. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_config.py +0 -0
  218. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_context.py +0 -0
  219. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_context_picker.py +0 -0
  220. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_conversations.py +0 -0
  221. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_escalate.py +0 -0
  222. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_extensions.py +0 -0
  223. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_film.py +0 -0
  224. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_gitflow.py +0 -0
  225. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_gpu_handover.py +0 -0
  226. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_harbor_bench.py +0 -0
  227. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_hooks.py +0 -0
  228. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_image_edit.py +0 -0
  229. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_long_clips.py +0 -0
  230. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_look.py +0 -0
  231. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_lsp.py +0 -0
  232. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_manual.py +0 -0
  233. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_matching.py +0 -0
  234. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_media_catalog.py +0 -0
  235. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_media_cloud.py +0 -0
  236. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_memory.py +0 -0
  237. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_model_picker.py +0 -0
  238. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_permissions.py +0 -0
  239. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_plan_mode.py +0 -0
  240. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_repeats.py +0 -0
  241. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_repomap.py +0 -0
  242. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_residency.py +0 -0
  243. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_review.py +0 -0
  244. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_robustness.py +0 -0
  245. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_sandbox.py +0 -0
  246. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_screenshots.py +0 -0
  247. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_secretscan.py +0 -0
  248. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_servers.py +0 -0
  249. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_sessions.py +0 -0
  250. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_steer.py +0 -0
  251. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_stuck.py +0 -0
  252. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_subagents.py +0 -0
  253. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_tools.py +0 -0
  254. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_traces.py +0 -0
  255. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_update.py +0 -0
  256. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_video.py +0 -0
  257. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_vision.py +0 -0
  258. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_web.py +0 -0
  259. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/tests/test_xai.py +0 -0
  260. {lcode_cli-0.63.0 → lcode_cli-0.64.0}/uv.lock +0 -0
@@ -6,6 +6,26 @@ All notable changes to lcode are documented here. The format follows
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.64.0] - 2026-11-25
10
+
11
+ ### Added
12
+
13
+ - **Reverse engineering with REA.** `lcode mcp add rea` sets up [REA](https://github.com/morluto/rea), which unpacks
14
+ Electron apps and archives, and decompiles native programs if you have Ghidra 12.2 and a JDK 25. lcode offers 10 of its
15
+ 263 tools, so they fit in a 32K window and none of them runs the program being examined.
16
+ - **Baselines for the public benchmarks.** The *Public benchmarks* page now gives lcode 0.63.0's results
17
+ on the dev slice on a 12 GB GPU: qwen3.6-35b at 32K (55%) and 64K (61%), why 256K and qwen3.8-27b
18
+ don't fit such a machine, and the commands to reproduce them.
19
+
20
+ ## [0.63.1] - 2026-11-11
21
+
22
+ ### Fixed
23
+
24
+ - **`lcode -c -p` in an image or video session exits with `1` when nothing came.** When `lcode -c -p "…"`
25
+ (or `--resume … -p`) carried on an image or video session and the picture or video didn't come (no
26
+ ComfyUI, a job that failed in ComfyUI, Ctrl+C), lcode said so and exited with `0`. It now exits with `1`,
27
+ as `lcode --mode image -p` does.
28
+
9
29
  ## [0.63.0] - 2026-11-11
10
30
 
11
31
  ### Changed
@@ -1419,7 +1439,9 @@ First public release.
1419
1439
  - `AGENTS.md` project instructions and `/init` to generate them.
1420
1440
  - One-line installer for Linux and macOS.
1421
1441
 
1422
- [Unreleased]: https://github.com/nasser1941/lcode/compare/v0.63.0...HEAD
1442
+ [Unreleased]: https://github.com/nasser1941/lcode/compare/v0.64.0...HEAD
1443
+ [0.64.0]: https://github.com/nasser1941/lcode/compare/v0.63.1...v0.64.0
1444
+ [0.63.1]: https://github.com/nasser1941/lcode/compare/v0.63.0...v0.63.1
1423
1445
  [0.63.0]: https://github.com/nasser1941/lcode/compare/v0.62.0...v0.63.0
1424
1446
  [0.62.0]: https://github.com/nasser1941/lcode/compare/v0.61.0...v0.62.0
1425
1447
  [0.61.0]: https://github.com/nasser1941/lcode/compare/v0.60.0...v0.61.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: lcode-cli
3
- Version: 0.63.0
3
+ Version: 0.64.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/
@@ -37,6 +37,7 @@ and find the code for the top one."*
37
37
  | `metabase` | Explore your data and ask questions through Metabase's semantic layer | Metabase 60 or later with MCP on ([below](#metabase)) |
38
38
  | `encord` | Projects, datasets, ontologies, labeling progress, tasks and labels, read-only | `uvx`, an SSH key registered in Encord ([below](#encord)) |
39
39
  | `valohai` | ML executions with their logs, metrics and outputs, and pipelines, read-only | `uvx`, a Valohai API token ([below](#valohai)) |
40
+ | `rea` | Reverse engineering: unpack Electron apps and archives, decompile native programs | `npx` (a recent Node.js); Ghidra and a JDK for native programs ([below](#rea)) |
40
41
 
41
42
  `npx` comes with [Node.js](https://nodejs.org) (18 or newer) and `uvx` with
42
43
  [uv](https://docs.astral.sh/uv/getting-started/installation/). `lcode mcp catalog` shows what's missing
@@ -140,6 +141,41 @@ Both servers are ordinary MCP servers: other MCP clients can use them too, for e
140
141
  `uvx --isolated --from lcode-cli lcode-mcp-valohai` with `VALOHAI_TOKEN` set. Keep `--isolated`: without it,
141
142
  `uvx` reuses an lcode you installed with `uv tool install`, which may be older or lack the Encord SDK.
142
143
 
144
+ ### REA
145
+
146
+ [REA](https://github.com/morluto/rea) (Reverse Engineer Anything) lets the model examine an app without its
147
+ source code. Use it only for software you own or are authorized to examine.
148
+
149
+ ```bash
150
+ lcode mcp add rea
151
+ ```
152
+
153
+ Then ask, for example: *"Use REA to extract /path/to/app.asar, then explain how search works in this app.
154
+ Name the file and function for each point."*
155
+
156
+ | Target | You need |
157
+ |---|---|
158
+ | Electron apps (`.asar`) and other archives | Node.js 22.23.4 or later in its 22 line, or a current 24 or 26 |
159
+ | Native programs | Node.js as above, [Ghidra](https://github.com/NationalSecurityAgency/ghidra/releases) 12.2 and a full JDK 25 (the Java runtime alone isn't enough). Give both folders when `lcode mcp add rea` asks |
160
+
161
+ The first start downloads REA from npm (42 MB, 186 MB unpacked), without install scripts and without its
162
+ optional packages. lcode sets up the version it was tested with; to try a newer one, change the version in
163
+ `mcp.json`.
164
+
165
+ - **Context.** All of REA's 263 tools would take about 82,000 tokens. lcode offers 10, about 4,700 tokens, so
166
+ they're sent with every request at 32K. Add others under `tools` in `mcp.json`, at the cost of context.
167
+ - **Electron apps.** The model opens the app and extracts it; `extract_artifact` writes the files to a folder,
168
+ and the model then reads them with lcode's own tools.
169
+ - **Permission.** Every call asks first, as with any MCP server. As REA documents them, the 10 tools read and unpack the target but
170
+ don't run it. Some of REA's other tools do run programs or attach to them, so think before you add them.
171
+ - **What to expect from a local model.** This was measured with qwen3.6-35b at 32K. On a tiny Electron app, four
172
+ runs (three with an earlier set of 8 tools) took 1 to 2 minutes each: three answers were right and one had a small
173
+ mistake. Native programs are much harder. On a small stripped program (a license-key check), three runs were tried: two finished in
174
+ 4 to 5 minutes, and one ran out of its 15. Of the two, one worked out a key the program accepts, with a mistake in
175
+ its explanation; the other misread a number format and its key was rejected. Check the answers, and
176
+ expect larger apps to be harder.
177
+ - **REA's workflow skill** is about 34 KB, too long for a 32K window, so lcode doesn't install it.
178
+
143
179
  ## Adding your own servers
144
180
 
145
181
  Any MCP server works. For a remote server, give its URL; for a local one, the command that starts it:
@@ -99,7 +99,8 @@ alone shows them.
99
99
  closes before an image arrives, the next request in image mode saves it.
100
100
  - **From scripts:** `lcode --mode image -p "a red fox in the snow --n 2"` makes the images and
101
101
  exits; with `--output json` it prints a result with the file paths, the model, the seeds, the size
102
- and the time.
102
+ and the time. It exits with `1` when no image came (no ComfyUI, a job that failed, Ctrl+C), and so
103
+ does `lcode -c -p "…"` when it carries on an image or video session.
103
104
  - **No Ollama needed:** `lcode --mode image` starts even when Ollama isn't running or the coding
104
105
  model isn't installed; `/mode code` then says what's missing.
105
106
 
@@ -137,6 +137,43 @@ result dropped beyond the noise, so a script can stop on it.
137
137
  if the dev slice doesn't drop beyond the noise against the last baseline, and the comparison goes on
138
138
  its pull request. See the [release steps](contributing.md#releases).
139
139
 
140
+ ## Baselines
141
+
142
+ lcode 0.63.0 on the dev slice, on a laptop with a 12 GB GPU (RTX 4080 Laptop) and 31 GB of RAM, with
143
+ nothing else running:
144
+
145
+ | Model | Context | Attempts | pass@1 | Terminal-Bench | SWE-bench | pass^3 | Speed | Time |
146
+ |---|---|---|---|---|---|---|---|---|
147
+ | qwen3.6-35b | 32K | 3 | 55% | 51% | 60% | 36% | 73 tokens/s | 11.4 h |
148
+ | qwen3.6-35b | 64K | 3 | 61% | 51% | 77% | 40% | 67 tokens/s | 11.8 h |
149
+ | qwen3.6-35b | 256K | – | stopped after 2 h | | | | 26–46 tokens/s | |
150
+ | qwen3.8-27b | 32K | 1 | 36% of 22 tasks | 20% | 71% of 7 | – | 9 tokens/s | stopped after 9 h |
151
+
152
+ To reproduce them:
153
+
154
+ ```bash
155
+ lcode bench --harbor dev qwen3.6-35b --context 32k
156
+ lcode bench --harbor dev qwen3.6-35b --context 64k
157
+ lcode bench --harbor dev qwen3.6-35b --context 256k
158
+ lcode bench --harbor dev qwen3.8-27b --context 32k --attempts 1
159
+ ```
160
+
161
+ - **32K or 64K:** 64K passed 7 points more, within the noise (±11), so this slice doesn't show that 64K
162
+ helps. It did waste less: 5 replies that went nowhere instead of 20. The 32K run is the baseline the
163
+ [release rule](#comparing-two-runs) compares against.
164
+ - **256K doesn't fit this machine.** Ollama kept 4 of the model's 9 GB on the GPU and took 23 GB of
165
+ RAM, so the system started swapping. Generation fell from 40–46 to 26 tokens/s, and the run was
166
+ stopped after 2 hours. By then 2 of 8 Terminal-Bench attempts had passed and 6 had run out of time,
167
+ `crack-7z-hash` among them, which passed 3 times out of 3 at 32K. With 12 GB of GPU memory, use 64K
168
+ at most.
169
+ - **qwen3.8-27b is too slow on a 12 GB GPU.** The dense 27B model is larger than the GPU (8 of its
170
+ 20 GB fit), so it generates 9 tokens/s, and 12 of the 15 Terminal-Bench tasks ran out of time. The
171
+ run was stopped after 9 hours, when generation fell to 4 tokens/s, and 3 SWE-bench tasks didn't
172
+ run. On the 22 tasks it ran, qwen3.6-35b at 32K passed 56%.
173
+
174
+ Runs on other machines differ, mostly through the model's speed: a faster GPU runs into the tasks' time
175
+ limits less often.
176
+
140
177
  ## Other agents on the same model
141
178
 
142
179
  `--agent` runs Claude Code, OpenCode or Codex on the same tasks, with the same model, context
@@ -12,7 +12,7 @@ lcode
12
12
 
13
13
  ```text
14
14
  ╭──────────────────────────────────────────────╮
15
- │ lcode v0.63.0 — local coding agent │
15
+ │ lcode v0.64.0 — local coding agent │
16
16
  │ │
17
17
  │ model lcode-qwen3.6-35b │
18
18
  │ context 256K tokens │
@@ -3,7 +3,7 @@
3
3
  From a program: `from lcode import Session` (see lcode.api).
4
4
  """
5
5
 
6
- __version__ = "0.63.0"
6
+ __version__ = "0.64.0"
7
7
 
8
8
  API = ("Session", "Result", "Options", "SetupError")
9
9
 
@@ -7,7 +7,7 @@
7
7
  # requires commands that must be installed.
8
8
  # login sign in through the browser (OAuth) after adding.
9
9
  #
10
- # Commands and URLs were checked against each project's documentation in September and October 2026.
10
+ # Commands and URLs were checked against each project's documentation in September to November 2026.
11
11
 
12
12
  [atlassian]
13
13
  name = "Atlassian"
@@ -254,3 +254,41 @@ var = "VALOHAI_HOST"
254
254
  prompt = "Valohai address (Enter for app.valohai.com; for a self-hosted installation, its URL)"
255
255
  optional = true
256
256
 
257
+ [rea]
258
+ name = "REA"
259
+ description = "Reverse engineering: unpack Electron apps and archives, decompile native programs with Ghidra"
260
+ homepage = "https://github.com/morluto/rea"
261
+ requires = ["npx"]
262
+ setup = """Only for software you own or are authorized to examine. Electron apps and archives need only a recent Node.js (22.23.4
263
+ or later in its 22 line, or a current 24 or 26). Native programs also need Ghidra 12.2 and a full JDK 25, not just the Java
264
+ runtime: give their folders, or press Enter to skip them."""
265
+
266
+ [rea.server]
267
+ command = "npx"
268
+ # The version lcode was tested with. No install scripts and no optional packages: frida, for hooking into running
269
+ # programs, is one, and lcode doesn't offer the tools that use it.
270
+ args = ["-y", "rea-agents@6.10.1", "mcp"]
271
+ env = { npm_config_ignore_scripts = "true", npm_config_omit = "optional", NO_UPDATE_NOTIFIER = "1", GHIDRA_INSTALL_DIR = "${GHIDRA_INSTALL_DIR}", JAVA_HOME = "${JAVA_HOME}" }
272
+ # All 263 definitions take about 82,000 tokens. These fit in a 32K window and don't launch the target.
273
+ tools = [
274
+ "open_binary",
275
+ "extract_artifact",
276
+ "binary_overview",
277
+ "list_procedures",
278
+ "search_strings",
279
+ "trace_feature",
280
+ "xrefs",
281
+ "procedure_callers",
282
+ "procedure_pseudo_code",
283
+ "close_binary",
284
+ ]
285
+
286
+ [[rea.inputs]]
287
+ var = "GHIDRA_INSTALL_DIR"
288
+ prompt = "Ghidra folder, full path (Enter to skip native programs)"
289
+ optional = true
290
+
291
+ [[rea.inputs]]
292
+ var = "JAVA_HOME"
293
+ prompt = "JDK 25 folder, full path (Enter to use the java on your PATH)"
294
+ optional = true
@@ -715,9 +715,9 @@ def handle_command(agent: Agent, line: str, hardware: Hardware) -> bool:
715
715
 
716
716
 
717
717
  def repl(agent: Agent, prompt: str | None, hardware: Hardware, cont: bool = False, resume: str | None = None) -> int:
718
- """The interactive session, or with a prompt (`lcode -p`) that one request. Returns lcode's exit code: for a coding
719
- request, the one `--output json` gives (api.EXIT_CODES), so a script can tell a failed request from a done one;
720
- otherwise 0."""
718
+ """The interactive session, or with a prompt (`lcode -p`) that one request. Returns lcode's exit code, so a script
719
+ can tell a failed request from a done one: for a coding request, the one `--output json` gives (api.EXIT_CODES);
720
+ for an image or video request, 1 when it failed or was cancelled, as `lcode --mode image -p` exits; otherwise 0."""
721
721
  if cont:
722
722
  note = agent.load_latest()
723
723
  if note is None:
@@ -732,9 +732,8 @@ def repl(agent: Agent, prompt: str | None, hardware: Hardware, cont: bool = Fals
732
732
  if info:
733
733
  resume_session(agent, info)
734
734
  session_start(agent)
735
- if prompt and agent.settings.mode in ("image", "video"):
736
- respond(agent, prompt)
737
- return 0
735
+ if prompt and agent.settings.mode in ("image", "video"): # -c or --resume into an image or video session
736
+ return 0 if respond(agent, prompt) else 1
738
737
  if prompt:
739
738
  return api.EXIT_CODES.get(run_safely(agent, prompt), 1)
740
739
  banner(agent)
@@ -776,17 +775,17 @@ def repl(agent: Agent, prompt: str | None, hardware: Hardware, cont: bool = Fals
776
775
  return 0
777
776
 
778
777
 
779
- def respond(agent: Agent, line: str) -> None:
778
+ def respond(agent: Agent, line: str) -> bool:
780
779
  """What a typed request does: the coding agent works on it, or image and video mode take it (a question about
781
- lcode is answered from its manual instead)."""
780
+ lcode is answered from its manual instead). Returns whether it went through: False when it failed or was
781
+ cancelled."""
782
782
  if agent.settings.mode in ("image", "video"): # no coding model involved
783
783
  if manual.is_question(line) and not media.RAW_FLAG.search(line):
784
784
  ask_manual(agent, line, typed=True)
785
- return
786
- make_image(agent, line)
787
- return
785
+ return True
786
+ return make_image(agent, line)
788
787
  agent.console.print(Rule(style="dim"))
789
- run_safely(agent, line)
788
+ return run_safely(agent, line) == "success"
790
789
 
791
790
 
792
791
  def manual_writer(agent: Agent):
@@ -297,9 +297,9 @@ def gallery(agent: Agent, everything: bool = False) -> None:
297
297
  )
298
298
 
299
299
 
300
- def make_image(agent: Agent, prompt: str = "", options=None, run=None) -> None:
300
+ def make_image(agent: Agent, prompt: str = "", options=None, run=None) -> bool:
301
301
  """Image mode: ComfyUI makes the images (a request, or `run(cancelled, ask)`); Esc or Ctrl+C cancels them
302
- there too."""
302
+ there too. Returns whether they came: False when the request failed or was cancelled."""
303
303
  steering = Steering()
304
304
  reader = KeyReader(steering)
305
305
  reading = agent.interactive and reader.start() # Esc sets steering.pause: here it cancels
@@ -309,6 +309,7 @@ def make_image(agent: Agent, prompt: str = "", options=None, run=None) -> None:
309
309
  return answer.strip().lower() in ("y", "yes")
310
310
 
311
311
  started = time.monotonic()
312
+ made = False
312
313
  try:
313
314
  asking = ask if agent.interactive else None
314
315
  if run is not None:
@@ -317,6 +318,7 @@ def make_image(agent: Agent, prompt: str = "", options=None, run=None) -> None:
317
318
  media.request(agent, prompt, cancelled=lambda: steering.pause, ask=asking)
318
319
  else:
319
320
  media.make(agent, prompt, options, cancelled=lambda: steering.pause, ask=asking)
321
+ made = True
320
322
  except media.MediaError as e:
321
323
  agent.console.print(f"[yellow]{escape(str(e))}[/]")
322
324
  except KeyboardInterrupt: # while ComfyUI was starting: nothing queued yet
@@ -332,3 +334,4 @@ def make_image(agent: Agent, prompt: str = "", options=None, run=None) -> None:
332
334
  agent.console.print(Text("✎ What you typed is in the prompt below.", style="cyan"))
333
335
  agent.save() # the gallery and options carry over when the session is resumed
334
336
  agent.finished(prompt or "image or video", time.monotonic() - started) # a long render: notify
337
+ return made
@@ -244,6 +244,38 @@ def test_several_images_from_the_command_line(tmp_path, monkeypatch, capsys, sta
244
244
  assert len(result["files"]) == 2 and result["seeds"] == [100, 101]
245
245
 
246
246
 
247
+ def test_lcode_c_p_into_an_image_session_exits_with_1_when_no_image_comes(
248
+ tmp_path, monkeypatch, capsys, standin, image_agent, repo
249
+ ):
250
+ """`lcode -c -p` carries on a saved image session in image mode, and exits as `lcode --mode image -p` does."""
251
+ from conftest import FakeOllama
252
+ from lcode import catalog
253
+
254
+ respond(image_agent, "a red fox") # an image session, saved in the demo folder
255
+ monkeypatch.setattr(config, "CONFIG_PATH", tmp_path / "config.toml")
256
+ cli.main(["config", "set", "comfyui_url", standin.url])
257
+ monkeypatch.setattr(cli, "Ollama", lambda host: FakeOllama())
258
+ monkeypatch.setattr(cli, "detect", lambda: LAPTOP)
259
+ monkeypatch.setattr("lcode.api.check_server", lambda *args: "0.35.1")
260
+ monkeypatch.setattr(cli, "resolve_model", lambda ollama, name: (name, catalog.find(name)))
261
+ monkeypatch.setattr(cli, "choose_context", lambda *args: (32768, ""))
262
+ argv = ["-c", "-p", "a fox in the snow", "-r", str(repo), "--no-mcp"]
263
+ cli.main(argv) # the image came: exit code 0, so main returns
264
+ assert "Continuing" in capsys.readouterr().out and len(list((repo / ".lcode" / "media").glob("*.png"))) == 2
265
+ standin.fail = "CUDA error: out of memory"
266
+ with pytest.raises(SystemExit) as done:
267
+ cli.main(argv)
268
+ assert done.value.code == 1 and "out of memory" in capsys.readouterr().out
269
+
270
+ def interrupted(*args, **kwargs):
271
+ raise KeyboardInterrupt
272
+
273
+ monkeypatch.setattr(media, "request", interrupted) # Ctrl+C while ComfyUI starts: 1, as with --mode image
274
+ with pytest.raises(SystemExit) as done:
275
+ cli.main(argv)
276
+ assert done.value.code == 1 and "Cancelled." in capsys.readouterr().out
277
+
278
+
247
279
  def test_the_preview_setting(tmp_path, monkeypatch):
248
280
  monkeypatch.setattr(config, "CONFIG_PATH", tmp_path / "config.toml")
249
281
  assert config.load()["preview"] == "auto"
@@ -23,7 +23,7 @@ def gone(pid: int) -> bool:
23
23
  status = Path(f"/proc/{pid}/status") # Linux; elsewhere there's nothing to check
24
24
  try:
25
25
  return not status.exists() or "zombie" in status.read_text().lower()
26
- except FileNotFoundError: # it ended between the two looks
26
+ except OSError: # it ended between the two looks (ENOENT or ESRCH, by timing)
27
27
  return True
28
28
 
29
29
 
@@ -2,6 +2,7 @@ import base64
2
2
  import hashlib
3
3
  import json
4
4
  import os
5
+ import re
5
6
  import stat
6
7
  import sys
7
8
  import threading
@@ -397,6 +398,23 @@ def test_skipped_optional_inputs_are_dropped(monkeypatch):
397
398
  assert catalog.build(preset, {"CONTEXT7_API_KEY": None})["headers"] == {"CONTEXT7_API_KEY": "${CONTEXT7_API_KEY}"}
398
399
 
399
400
 
401
+ def test_rea_is_pinned_static_and_works_without_ghidra(monkeypatch):
402
+ """REA's 263 tools take more than a 32K window, and some launch or attach to programs: lcode offers a few static
403
+ ones, from the version it was tested with, without npm install scripts."""
404
+ for name in ("GHIDRA_INSTALL_DIR", "JAVA_HOME"):
405
+ monkeypatch.delenv(name, raising=False)
406
+ preset = catalog.load()["rea"]
407
+ server = catalog.build(preset, {"GHIDRA_INSTALL_DIR": None, "JAVA_HOME": None})
408
+ assert any(re.fullmatch(r"rea-agents@\d+\.\d+\.\d+", arg) for arg in server["args"])
409
+ assert server["env"]["npm_config_ignore_scripts"] == "true" and server["env"]["npm_config_omit"] == "optional"
410
+ assert not {"GHIDRA_INSTALL_DIR", "JAVA_HOME"} & set(server["env"])
411
+ assert len(server["tools"]) <= 12 and {"open_binary", "extract_artifact"} <= set(server["tools"])
412
+ assert not [t for t in server["tools"] if re.search(r"frida|gdb|debug|launch|start|capture|adb|observe|command", t)]
413
+ assert "allow" not in server # every call asks
414
+ native = catalog.build(preset, {"GHIDRA_INSTALL_DIR": "/opt/ghidra", "JAVA_HOME": "/opt/jdk-25"})
415
+ assert native["env"]["GHIDRA_INSTALL_DIR"] == "/opt/ghidra" and native["env"]["JAVA_HOME"] == "/opt/jdk-25"
416
+
417
+
400
418
  # ----------------------------------------------------------------------------- manager
401
419
 
402
420
 
@@ -146,7 +146,9 @@ def test_the_mode_setting(tmp_path, monkeypatch):
146
146
  assert config.load()["mode"] == "video"
147
147
 
148
148
 
149
- def test_a_request_from_the_command_line_without_comfyui_says_how_to_get_it(tmp_path, monkeypatch, capsys):
149
+ def test_a_request_from_the_command_line_without_comfyui_says_how_to_get_it(
150
+ tmp_path, monkeypatch, capsys, make_agent, repo
151
+ ):
150
152
  monkeypatch.setattr(config, "CONFIG_PATH", tmp_path / "config.toml")
151
153
  cli.main(["config", "set", "comfyui_url", "http://127.0.0.1:9"])
152
154
  monkeypatch.setattr(cli, "Ollama", lambda host: FakeOllama())
@@ -163,3 +165,10 @@ def test_a_request_from_the_command_line_without_comfyui_says_how_to_get_it(tmp_
163
165
  with pytest.raises(SystemExit) as done: # the same exit code without --output
164
166
  cli.main(["--mode", mode, "-p", "a red fox running", "--no-mcp"])
165
167
  assert done.value.code == 1 and "no install found" in capsys.readouterr().out
168
+ saved = make_agent() # and with -c, into a saved session in this mode
169
+ saved.settings.mode, saved.session_name = mode, f"{mode} session"
170
+ saved.save()
171
+ with pytest.raises(SystemExit) as done:
172
+ cli.main(["-c", "-p", "a red fox running", "-r", str(repo), "--no-mcp"])
173
+ shown = capsys.readouterr().out
174
+ assert done.value.code == 1 and f"Continuing {mode} session" in shown and "no install found" in shown
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes