lcode-cli 0.55.0__tar.gz → 0.56.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 (228) hide show
  1. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/CHANGELOG.md +12 -1
  2. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/PKG-INFO +2 -1
  3. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/README.md +1 -0
  4. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/public-benchmarks.md +34 -0
  5. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/quickstart.md +1 -1
  6. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/usage.md +1 -0
  7. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/__init__.py +1 -1
  8. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/cli.py +6 -0
  9. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/harbor_bench.py +213 -12
  10. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/ollama.py +7 -0
  11. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_harbor_bench.py +103 -0
  12. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/.editorconfig +0 -0
  13. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/.github/CODEOWNERS +0 -0
  14. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  15. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  16. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  17. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/.github/ISSUE_TEMPLATE/model_request.yml +0 -0
  18. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  19. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/.github/dependabot.yml +0 -0
  20. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/.github/workflows/ci.yml +0 -0
  21. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/.github/workflows/docs.yml +0 -0
  22. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/.github/workflows/release.yml +0 -0
  23. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/.gitignore +0 -0
  24. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/.pre-commit-config.yaml +0 -0
  25. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/AGENTS.md +0 -0
  26. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/CODE_OF_CONDUCT.md +0 -0
  27. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/CONTRIBUTING.md +0 -0
  28. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/LICENSE +0 -0
  29. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/SECURITY.md +0 -0
  30. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/action.yml +0 -0
  31. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/agents.md +0 -0
  32. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/assets/demo.svg +0 -0
  33. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/assets/extra.css +0 -0
  34. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/assets/film-fox-and-kitten.jpg +0 -0
  35. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/assets/long-clip-tulip.jpg +0 -0
  36. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/automation.md +0 -0
  37. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/bench.md +0 -0
  38. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/changelog.md +0 -0
  39. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/commands.md +0 -0
  40. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/configuration.md +0 -0
  41. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/contributing.md +0 -0
  42. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/editors.md +0 -0
  43. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/git.md +0 -0
  44. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/hooks.md +0 -0
  45. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/how-it-works.md +0 -0
  46. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/index.md +0 -0
  47. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/installation.md +0 -0
  48. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/lsp.md +0 -0
  49. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/mcp.md +0 -0
  50. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/memory.md +0 -0
  51. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/models.md +0 -0
  52. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/modes.md +0 -0
  53. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/sandbox.md +0 -0
  54. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/search.md +0 -0
  55. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/servers.md +0 -0
  56. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/traces.md +0 -0
  57. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/docs/troubleshooting.md +0 -0
  58. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/examples/README.md +0 -0
  59. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/examples/api/fix_tests.py +0 -0
  60. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/examples/commands/review.md +0 -0
  61. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/examples/skills/commit-message/SKILL.md +0 -0
  62. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/examples/skills/commit-message/scripts/staged.sh +0 -0
  63. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/install.sh +0 -0
  64. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/mkdocs.yml +0 -0
  65. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/overrides/main.html +0 -0
  66. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/pyproject.toml +0 -0
  67. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/scripts/make_logos.py +0 -0
  68. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/scripts/record_demo.py +0 -0
  69. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/scripts/social-preview.html +0 -0
  70. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/__main__.py +0 -0
  71. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/acp.py +0 -0
  72. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/action.py +0 -0
  73. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/agent.py +0 -0
  74. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/api.py +0 -0
  75. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/assistant.py +0 -0
  76. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/backends.py +0 -0
  77. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/bench.py +0 -0
  78. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/bench_backend.py +0 -0
  79. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/bench_runtime.py +0 -0
  80. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/catalog.py +0 -0
  81. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/checkpoints.py +0 -0
  82. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/checks.py +0 -0
  83. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/clipboard.py +0 -0
  84. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/cloud.py +0 -0
  85. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/codesearch.py +0 -0
  86. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/comfy.py +0 -0
  87. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/config.py +0 -0
  88. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/context.py +0 -0
  89. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/edits.py +0 -0
  90. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/escalate.py +0 -0
  91. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/extensions.py +0 -0
  92. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/film.py +0 -0
  93. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/frontmatter.py +0 -0
  94. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/gitflow.py +0 -0
  95. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/harbor.py +0 -0
  96. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/hardware.py +0 -0
  97. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/hooks.py +0 -0
  98. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/imageopts.py +0 -0
  99. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/jobs.py +0 -0
  100. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/limits.py +0 -0
  101. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/lsp.py +0 -0
  102. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/manual.py +0 -0
  103. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/matching.py +0 -0
  104. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/mcp/__init__.py +0 -0
  105. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/mcp/auth.py +0 -0
  106. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/mcp/catalog.py +0 -0
  107. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/mcp/catalog.toml +0 -0
  108. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/mcp/client.py +0 -0
  109. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/mcp/commands.py +0 -0
  110. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/mcp/config.py +0 -0
  111. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/mcp/http.py +0 -0
  112. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/mcp/manager.py +0 -0
  113. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/mcp/protocol.py +0 -0
  114. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/mcp/server.py +0 -0
  115. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/mcp/stdio.py +0 -0
  116. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/media.py +0 -0
  117. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/media.toml +0 -0
  118. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/media_catalog.py +0 -0
  119. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/media_cloud.py +0 -0
  120. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/memory.py +0 -0
  121. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/models.toml +0 -0
  122. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/modes.py +0 -0
  123. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/notify.py +0 -0
  124. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/permissions.py +0 -0
  125. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/planning.py +0 -0
  126. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/preview.py +0 -0
  127. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/render.py +0 -0
  128. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/repeats.py +0 -0
  129. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/repl.py +0 -0
  130. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/replay.py +0 -0
  131. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/repoid.py +0 -0
  132. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/repomap.py +0 -0
  133. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/residency.py +0 -0
  134. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/review.py +0 -0
  135. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/sandbox.py +0 -0
  136. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/screenshots.py +0 -0
  137. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/secretscan.py +0 -0
  138. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/servers/__init__.py +0 -0
  139. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/servers/encord.py +0 -0
  140. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/servers/valohai.py +0 -0
  141. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/servers/xai.py +0 -0
  142. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/sessions.py +0 -0
  143. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/steer.py +0 -0
  144. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/subagents.py +0 -0
  145. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/tools.py +0 -0
  146. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/traces.py +0 -0
  147. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/unreachable.py +0 -0
  148. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/update.py +0 -0
  149. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/vision.py +0 -0
  150. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/web.py +0 -0
  151. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/workflows/__init__.py +0 -0
  152. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/workflows/flux2-klein-4b-t2i.json +0 -0
  153. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/workflows/remove-background.json +0 -0
  154. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/workflows/smooth-film.json +0 -0
  155. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/workflows/sound-stable-audio.json +0 -0
  156. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/workflows/upscale-esrgan.json +0 -0
  157. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/workflows/upscale-video-esrgan.json +0 -0
  158. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/workflows/wan21-fun-camera.json +0 -0
  159. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/workflows/wan21-vace.json +0 -0
  160. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/workflows/wan22-fun-inp-5b.json +0 -0
  161. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/workflows/wan22-ti2v-5b.json +0 -0
  162. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/src/lcode/workflows/z-image-turbo-t2i.json +0 -0
  163. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/comfy_standin.py +0 -0
  164. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/conftest.py +0 -0
  165. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/fake_lsp_server.py +0 -0
  166. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/fake_mcp_server.py +0 -0
  167. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_acp.py +0 -0
  168. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_action.py +0 -0
  169. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_agent.py +0 -0
  170. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_api.py +0 -0
  171. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_assistant.py +0 -0
  172. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_backends.py +0 -0
  173. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_bench.py +0 -0
  174. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_catalog.py +0 -0
  175. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_checkpoints.py +0 -0
  176. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_checks.py +0 -0
  177. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_cli.py +0 -0
  178. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_clipboard.py +0 -0
  179. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_cloud.py +0 -0
  180. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_codesearch.py +0 -0
  181. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_comfy.py +0 -0
  182. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_config.py +0 -0
  183. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_context.py +0 -0
  184. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_context_picker.py +0 -0
  185. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_conversations.py +0 -0
  186. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_escalate.py +0 -0
  187. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_extensions.py +0 -0
  188. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_film.py +0 -0
  189. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_gitflow.py +0 -0
  190. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_gpu_handover.py +0 -0
  191. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_hooks.py +0 -0
  192. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_image_edit.py +0 -0
  193. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_image_generate.py +0 -0
  194. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_jobs.py +0 -0
  195. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_long_clips.py +0 -0
  196. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_look.py +0 -0
  197. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_lsp.py +0 -0
  198. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_manual.py +0 -0
  199. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_matching.py +0 -0
  200. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_mcp.py +0 -0
  201. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_media_catalog.py +0 -0
  202. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_media_cloud.py +0 -0
  203. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_memory.py +0 -0
  204. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_model_picker.py +0 -0
  205. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_modes.py +0 -0
  206. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_permissions.py +0 -0
  207. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_plan_mode.py +0 -0
  208. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_repeats.py +0 -0
  209. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_repomap.py +0 -0
  210. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_residency.py +0 -0
  211. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_review.py +0 -0
  212. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_robustness.py +0 -0
  213. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_sandbox.py +0 -0
  214. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_screenshots.py +0 -0
  215. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_secretscan.py +0 -0
  216. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_servers.py +0 -0
  217. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_sessions.py +0 -0
  218. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_steer.py +0 -0
  219. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_stuck.py +0 -0
  220. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_subagents.py +0 -0
  221. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_tools.py +0 -0
  222. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_traces.py +0 -0
  223. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_update.py +0 -0
  224. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_video.py +0 -0
  225. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_vision.py +0 -0
  226. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_web.py +0 -0
  227. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/tests/test_xai.py +0 -0
  228. {lcode_cli-0.55.0 → lcode_cli-0.56.0}/uv.lock +0 -0
@@ -6,6 +6,16 @@ All notable changes to lcode are documented here. The format follows
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.56.0] - 2026-11-02
10
+
11
+ ### Added
12
+
13
+ - **Other agents on the same model** (#198): `lcode bench --harbor dev --agent claude-code`
14
+ (or `opencode`, `codex`) runs that agent on the same tasks, model and context as lcode, for a
15
+ comparison. Each is set up the way `ollama launch` sets it up, with approvals off. Their APIs can't
16
+ set the context window, so lcode makes a copy of the model with it set (`lcode-qwen3.6-35b-64k`),
17
+ which uses the model's files. `lcode-bench.json` records the agent and its version.
18
+
9
19
  ## [0.55.0] - 2026-11-02
10
20
 
11
21
  ### Added
@@ -1201,7 +1211,8 @@ First public release.
1201
1211
  - `AGENTS.md` project instructions and `/init` to generate them.
1202
1212
  - One-line installer for Linux and macOS.
1203
1213
 
1204
- [Unreleased]: https://github.com/nasser1941/lcode/compare/v0.55.0...HEAD
1214
+ [Unreleased]: https://github.com/nasser1941/lcode/compare/v0.56.0...HEAD
1215
+ [0.56.0]: https://github.com/nasser1941/lcode/compare/v0.55.0...v0.56.0
1205
1216
  [0.55.0]: https://github.com/nasser1941/lcode/compare/v0.54.0...v0.55.0
1206
1217
  [0.54.0]: https://github.com/nasser1941/lcode/compare/v0.53.0...v0.54.0
1207
1218
  [0.53.0]: https://github.com/nasser1941/lcode/compare/v0.52.0...v0.53.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: lcode-cli
3
- Version: 0.55.0
3
+ Version: 0.56.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/
@@ -182,6 +182,7 @@ lcode
182
182
  | `lcode models` / `lcode doctor` | what fits this machine / check the installation |
183
183
  | `lcode bench qwen3.6-35b qwen3.5-9b` | compare models on small coding tasks on this machine |
184
184
  | `lcode bench --harbor dev` | run lcode on a slice of Terminal-Bench 2.0 and SWE-bench Verified, with Harbor |
185
+ | `lcode bench --harbor dev --agent codex` | the same with Claude Code, OpenCode or Codex on your model, to compare |
185
186
  | `lcode trace` / `lcode trace show 1` | past requests, step by step with times and tokens; export or replay one |
186
187
  | `/undo`, `/rewind` | take back the last request's file changes, or go back further |
187
188
  | `lcode mcp catalog` / `lcode mcp add github` | ready-made MCP servers / add one |
@@ -146,6 +146,7 @@ lcode
146
146
  | `lcode models` / `lcode doctor` | what fits this machine / check the installation |
147
147
  | `lcode bench qwen3.6-35b qwen3.5-9b` | compare models on small coding tasks on this machine |
148
148
  | `lcode bench --harbor dev` | run lcode on a slice of Terminal-Bench 2.0 and SWE-bench Verified, with Harbor |
149
+ | `lcode bench --harbor dev --agent codex` | the same with Claude Code, OpenCode or Codex on your model, to compare |
149
150
  | `lcode trace` / `lcode trace show 1` | past requests, step by step with times and tokens; export or replay one |
150
151
  | `/undo`, `/rewind` | take back the last request's file changes, or go back further |
151
152
  | `lcode mcp catalog` / `lcode mcp add github` | ready-made MCP servers / add one |
@@ -97,6 +97,40 @@ Everything is saved in `~/.local/state/lcode/bench/<slice>-<time>/`:
97
97
  - Harbor's own results: each attempt's log, the task's test output, and lcode's trace and session.
98
98
  `uvx --from harbor harbor view <folder>` browses them.
99
99
 
100
+ ## Other agents on the same model
101
+
102
+ `--agent` runs Claude Code, OpenCode or Codex on the same tasks, with the same model, context
103
+ window and time limits, so you can compare them with lcode:
104
+
105
+ ```bash
106
+ lcode bench --harbor dev qwen3.6-35b --context 64k # lcode
107
+ lcode bench --harbor dev qwen3.6-35b --context 64k --agent claude-code
108
+ lcode bench --harbor dev qwen3.6-35b --context 64k --agent opencode
109
+ lcode bench --harbor dev qwen3.6-35b --context 64k --agent codex
110
+ ```
111
+
112
+ Harbor installs the agent in each task's container, with approvals off. lcode sets the agent up the
113
+ way `ollama launch` does, with the Ollama on your machine:
114
+
115
+ - **Claude Code** uses Ollama's Anthropic-compatible API, with the model for every tier (subagents
116
+ too) and `ollama launch claude`'s settings: no telemetry, error reports or feedback prompts. Like
117
+ `ollama launch claude`, it doesn't tell Claude Code the context window.
118
+ - **OpenCode** uses an Ollama provider on Ollama's OpenAI-compatible API. The model is marked as a
119
+ reasoning model, with the limits of its context window.
120
+ - **Codex** uses Ollama's Responses API and `ollama launch codex`'s model catalog. That catalog gives
121
+ local models no base instructions, so Codex runs without its own system prompt, as it does with
122
+ `ollama launch codex`.
123
+
124
+ These agents' APIs can't set the context window per request, and Ollama's default is small (4K on
125
+ GPUs under 24 GB), so lcode makes a copy of the model with the context set:
126
+ `lcode-qwen3.6-35b-64k` for 64K. It uses the model's files, so nothing is downloaded, and
127
+ `ollama rm lcode-qwen3.6-35b-64k` removes it. Ollama recommends at least 64K for these agents.
128
+
129
+ The time per task leaves out installing the agent, which Harbor does in every task's container: up to
130
+ three minutes for Claude Code, so its runs take longer overall. The results go to
131
+ `~/.local/state/lcode/bench/<slice>-<agent>-<time>/`, and `lcode-bench.json` adds the agent and its
132
+ version.
133
+
100
134
  ## With Harbor directly
101
135
 
102
136
  `lcode.harbor:Lcode` is an ordinary Harbor agent, so every Harbor dataset and option works:
@@ -12,7 +12,7 @@ lcode
12
12
 
13
13
  ```text
14
14
  ╭──────────────────────────────────────────────╮
15
- │ lcode v0.55.0 — local coding agent │
15
+ │ lcode v0.56.0 — local coding agent │
16
16
  │ │
17
17
  │ model lcode-qwen3.6-35b │
18
18
  │ context 256K tokens │
@@ -11,6 +11,7 @@ lcode media [install MODEL] # image and video models: what fits here, what's in
11
11
  lcode config [set|unset] # show or change settings
12
12
  lcode bench [models] # score models on small coding tasks on this machine
13
13
  lcode bench --harbor dev # public benchmarks: Terminal-Bench 2.0 and SWE-bench Verified
14
+ lcode bench --harbor dev --agent codex # the same with another agent on your model, to compare
14
15
  lcode trace [action] [N] # past requests: show one step by step, export or replay it (see Run traces)
15
16
  lcode mcp [catalog|add|list] # connect MCP servers: Jira, GitHub, AWS, databases… (see MCP servers)
16
17
  lcode acp # run inside an editor over the Agent Client Protocol (see Editors)
@@ -3,7 +3,7 @@
3
3
  From a program: `from lcode import Session` (see lcode.api).
4
4
  """
5
5
 
6
- __version__ = "0.55.0"
6
+ __version__ = "0.56.0"
7
7
 
8
8
  API = ("Session", "Result", "Options", "SetupError")
9
9
 
@@ -952,6 +952,12 @@ def build_subparsers() -> dict[str, argparse.ArgumentParser]:
952
952
  help="public benchmarks instead: a slice of Terminal-Bench 2.0 and SWE-bench Verified, run with Harbor",
953
953
  )
954
954
  p.add_argument("--attempts", type=int, default=3, help="with --harbor: attempts per task (default: 3, for pass^3)")
955
+ p.add_argument(
956
+ "--agent",
957
+ choices=["lcode", "claude-code", "opencode", "codex"],
958
+ default="lcode",
959
+ help="with --harbor: the agent to run, for a comparison on the same model (default: lcode)",
960
+ )
955
961
  p.add_argument(
956
962
  "--docker-bridge",
957
963
  action="store_true",
@@ -10,12 +10,16 @@ model can try overnight: Terminal-Bench 2.0 without model training and with at m
10
10
  task, and SWE-bench Verified's two common difficulties. The dev slice is for everyday checks; the
11
11
  held-out set is never used for tuning, only to confirm a change helps beyond the tasks it was
12
12
  tuned on.
13
+
14
+ Other agents run on the same slices and the same model for comparison (`--agent`): Claude Code,
15
+ OpenCode and Codex, each set up the way `ollama launch` sets it up.
13
16
  """
14
17
 
15
18
  from __future__ import annotations
16
19
 
17
20
  import datetime as dt
18
21
  import json
22
+ import os
19
23
  import shlex
20
24
  import statistics
21
25
  import subprocess
@@ -23,6 +27,8 @@ import time
23
27
  from dataclasses import asdict, dataclass, field
24
28
  from pathlib import Path
25
29
 
30
+ from lcode.ollama import OllamaError
31
+
26
32
  HARBOR = "harbor==0.25.0" # the Harbor these slices were made and checked with
27
33
  HARBOR_PYTHON = "3.13"
28
34
  AGENT = "lcode.harbor:Lcode"
@@ -67,6 +73,143 @@ LOG = "/logs/agent/lcode.txt"
67
73
  ON_PATH = 'export PATH="$HOME/.local/bin:$PATH";' # where uv puts lcode and itself
68
74
 
69
75
 
76
+ # ----------------------------------------------------------------------------- other agents on the same model
77
+
78
+ # The agents compared with lcode (#198), by Harbor's names. Each is set up the way `ollama launch` sets it up (in
79
+ # Ollama's cmd/launch), with your machine's Ollama as a task's container reaches it, approvals off (Harbor's).
80
+ OTHER_AGENTS = ("claude-code", "opencode", "codex")
81
+ OLLAMA_FROM_TASKS = f"http://host.docker.internal:{OLLAMA_PORT}" # with the host-gateway entry in the overlay
82
+ CODEX_CATALOG = "/opt/lcode-bench/codex-models.json" # in the task's container
83
+ CLAUDE_CODE_ENV = { # what `ollama launch claude` sets besides the address, the key and each tier's model (Harbor's)
84
+ "ENABLE_CLAUDEAI_MCP_SERVERS": "false",
85
+ "CLAUDE_CODE_ATTRIBUTION_HEADER": "0",
86
+ "CLAUDE_CODE_TOTAL_TOKENS_REMINDER": "off",
87
+ "DISABLE_ERROR_REPORTING": "1",
88
+ "DISABLE_FEEDBACK_COMMAND": "1",
89
+ "CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY": "1",
90
+ "CLAUDE_CODE_AUTO_MODE_SERVER": "0",
91
+ }
92
+ CODEX_LEVELS = { # Codex's reasoning efforts for Ollama's thinking values, with Ollama's descriptions
93
+ "none": "Turn thinking off",
94
+ "minimal": "Thinking effort",
95
+ "low": "Fast responses with lighter thinking",
96
+ "medium": "Balances speed and thinking depth for everyday tasks",
97
+ "high": "Greater thinking depth for complex tasks",
98
+ "xhigh": "Thinking effort",
99
+ "max": "Maximum thinking depth for the hardest tasks",
100
+ "ultra": "Thinking effort",
101
+ }
102
+
103
+
104
+ def variant_name(model: str, context: int) -> str:
105
+ """The Ollama model the other agents get: `model` with its context window set (lcode-qwen3.6-35b-64k), since
106
+ the APIs they use (OpenAI's, Anthropic's) can't set it per request and Ollama's default is small."""
107
+ from lcode.config import format_tokens
108
+
109
+ return f"{model.removesuffix(':latest')}-{format_tokens(context).lower()}"
110
+
111
+
112
+ def agent_overlay(bridge: bool, catalog: Path | None = None) -> str:
113
+ """The Docker Compose override for another agent's tasks: host.docker.internal is your machine (Docker Desktop
114
+ has it; on Linux it's added), and Codex's model catalog is in the container."""
115
+ lines = ["services:", " main:"]
116
+ if bridge:
117
+ lines.append(" network_mode: bridge")
118
+ lines += [" extra_hosts:", ' - "host.docker.internal:host-gateway"']
119
+ if catalog is not None:
120
+ lines += [" volumes:", f" - {json.dumps(f'{catalog}:{CODEX_CATALOG}:ro')}"]
121
+ return "\n".join(lines) + "\n"
122
+
123
+
124
+ def opencode_config(model: str, context: int, thinking: bool) -> dict:
125
+ """`ollama launch opencode`'s provider: Ollama's OpenAI-compatible API, and the model with the limits of the
126
+ context it runs at (a quarter of it for output, at most 8K)."""
127
+ entry: dict = {"name": model}
128
+ if thinking: # a model that can think without levels: on, or "none"
129
+ entry["reasoning"] = True
130
+ entry["variants"] = {
131
+ "none": {"reasoningEffort": "none"},
132
+ "low": {"disabled": True},
133
+ "medium": {"disabled": True},
134
+ "high": {"disabled": True},
135
+ }
136
+ entry["limit"] = {"context": context, "input": context, "output": min(8192, context // 4)}
137
+ provider = {"npm": "@ai-sdk/openai-compatible", "name": "Ollama", "options": {"baseURL": f"{OLLAMA_FROM_TASKS}/v1"}}
138
+ return {"provider": {"ollama": {**provider, "models": {model: entry}}}}
139
+
140
+
141
+ def codex_level(value: object) -> str | None:
142
+ if isinstance(value, bool):
143
+ return "high" if value else "none"
144
+ return value if isinstance(value, str) and value in CODEX_LEVELS and value != "none" else None
145
+
146
+
147
+ def codex_catalog(model: str, context: int, thinking: dict | None) -> dict:
148
+ """`ollama launch codex`'s model catalog entry, so Codex knows the model (otherwise it warns that it falls back
149
+ to defaults that "can degrade performance"). `thinking`: Ollama's, as `/api/show` gives it."""
150
+ values = list((thinking or {}).get("values") or [])
151
+ levels: list[str] = []
152
+ for value in values:
153
+ if value is True and "high" in values:
154
+ continue
155
+ level = codex_level(value)
156
+ if level is not None and level not in levels:
157
+ levels.append(level)
158
+ default = codex_level((thinking or {}).get("default"))
159
+ if default not in levels or (len(values) == 1 and False in values):
160
+ default = None
161
+ entry = {
162
+ "slug": model,
163
+ "display_name": model,
164
+ "context_window": context,
165
+ "shell_type": "default",
166
+ "visibility": "list",
167
+ "supported_in_api": True,
168
+ "priority": 0,
169
+ "truncation_policy": {"mode": "bytes", "limit": 10000},
170
+ "input_modalities": ["text"],
171
+ "base_instructions": "",
172
+ "support_verbosity": True,
173
+ "default_verbosity": "low",
174
+ "supports_parallel_tool_calls": False,
175
+ "supports_reasoning_summaries": False,
176
+ "supported_reasoning_levels": [{"effort": level, "description": CODEX_LEVELS[level]} for level in levels],
177
+ "default_reasoning_level": default,
178
+ "experimental_supported_tools": [],
179
+ }
180
+ return {"models": [entry]}
181
+
182
+
183
+ def codex_config() -> dict:
184
+ """`ollama launch codex`'s profile: Ollama's Responses API, and the model catalog."""
185
+ provider = {"name": "Ollama", "base_url": f"{OLLAMA_FROM_TASKS}/v1/", "wire_api": "responses"}
186
+ return {
187
+ "model_provider": "ollama-launch",
188
+ "model_providers": {"ollama-launch": provider},
189
+ "model_catalog_json": CODEX_CATALOG,
190
+ }
191
+
192
+
193
+ def agent_setup(agent: str, model: str, context: int, show: dict, folder: Path) -> tuple[list[str], Path | None]:
194
+ """Harbor's arguments for another agent on `model` (the Ollama model at `context`), and Codex's model catalog,
195
+ written in `folder`. `show`: Ollama's `/api/show` for the model."""
196
+ thinking = "thinking" in (show.get("capabilities") or [])
197
+ if agent == "claude-code":
198
+ return [arg for name, value in CLAUDE_CODE_ENV.items() for arg in ("--ae", f"{name}={value}")], None
199
+ if agent == "opencode":
200
+ return ["--ak", "opencode_config=" + json.dumps(opencode_config(model, context, thinking))], None
201
+ if agent == "codex":
202
+ catalog = folder / "codex-models.json"
203
+ catalog.write_text(json.dumps(codex_catalog(model, context, show.get("thinking") if thinking else None)))
204
+ return ["--ak", "config=" + json.dumps(codex_config())], catalog
205
+ raise ValueError(f"unknown agent {agent!r}")
206
+
207
+
208
+ def harbor_env() -> dict[str, str]:
209
+ """For Harbor itself: other agents reach Ollama through its `ollama/` provider, which needs a key (any)."""
210
+ return {"OLLAMA_BASE_URL": OLLAMA_FROM_TASKS, "OLLAMA_API_KEY": "ollama"}
211
+
212
+
70
213
  def find_ollama(routes: str = "/proc/net/route") -> str:
71
214
  """Shell that sets OLLAMA_HOST, unless it's set, to Ollama on your machine as a task's container sees it:
72
215
  host.docker.internal where Docker provides it (Docker Desktop), else the container's default gateway, which is
@@ -181,17 +324,22 @@ def harbor_argv(
181
324
  lcode_with: list[str] | None = None,
182
325
  wheel: Path | None = None,
183
326
  overlay: Path | None = None,
327
+ agent: str = "lcode",
328
+ agent_args: list[str] | None = None,
184
329
  ) -> list[str]:
185
- """`harbor run` for some tasks of a dataset, with uvx, and lcode next to Harbor so it can import the agent."""
330
+ """`harbor run` for some tasks of a dataset, with uvx, and lcode next to Harbor so it can import the agent.
331
+ Another `agent` (Harbor's name) gets `model` as Harbor's `ollama/` model and `agent_args` (agent_setup)."""
186
332
  argv = ["uvx", "--python", HARBOR_PYTHON, "--from", HARBOR, *(lcode_with or []), "harbor", "run"]
187
- argv += ["-d", DATASETS[dataset], "-a", AGENT, "-m", model, "-k", str(attempts), "-n", "1"]
333
+ harbor_agent, harbor_model = (AGENT, model) if agent == "lcode" else (agent, f"ollama/{model}")
334
+ argv += ["-d", DATASETS[dataset], "-a", harbor_agent, "-m", harbor_model, "-k", str(attempts), "-n", "1"]
188
335
  argv += ["-o", str(jobs), "--job-name", job_name, "-y"]
189
336
  for task in tasks:
190
337
  argv += ["-i", task, "-i", f"*/{task}"] # the name alone, or with its organization in front
191
- if context:
338
+ if context and agent == "lcode": # the others get a model with the context set (variant_name)
192
339
  argv += ["--ak", f"context={context}"]
193
340
  if wheel:
194
341
  argv += ["--ak", f"wheel={wheel}"]
342
+ argv += agent_args or []
195
343
  if overlay:
196
344
  argv += ["--extra-docker-compose", str(overlay)]
197
345
  return argv
@@ -209,6 +357,7 @@ class Trial:
209
357
  tokens_in: int | None = None # None: not known (no trace)
210
358
  tokens_out: int | None = None
211
359
  error: str = ""
360
+ version: str = "" # the agent's, in the task's container
212
361
 
213
362
 
214
363
  def seconds_between(timing: dict | None) -> float | None:
@@ -250,6 +399,7 @@ def read_trials(job: Path, dataset: str) -> list[Trial]:
250
399
  tokens_in=None if tokens_in is None else int(number(tokens_in)),
251
400
  tokens_out=None if tokens_out is None else int(number(tokens_out)),
252
401
  error=error,
402
+ version=str((result.get("agent_info") or {}).get("version") or ""),
253
403
  )
254
404
  )
255
405
  return trials
@@ -344,6 +494,32 @@ def took(seconds: float) -> str:
344
494
  return f"{hours} h {minutes} min" if hours else f"{minutes} min"
345
495
 
346
496
 
497
+ def context_variant(settings: dict, model: str, context: int, console) -> tuple[str, dict]:
498
+ """The Ollama model for another agent (variant_name), made when it's missing, and Ollama's `/api/show` for it.
499
+ Making it copies nothing: it's the same files with one more parameter."""
500
+ from rich.markup import escape
501
+
502
+ from lcode.cli import NotInstalled, resolve_model
503
+ from lcode.config import format_tokens
504
+ from lcode.ollama import Ollama
505
+
506
+ if settings.get("backend", "ollama") != "ollama":
507
+ raise OllamaError("--agent runs the other agents on Ollama's models: lcode's backend here isn't Ollama.")
508
+ ollama = Ollama(settings["ollama_host"])
509
+ try:
510
+ tag, _ = resolve_model(ollama, model)
511
+ except NotInstalled as e:
512
+ raise OllamaError(str(e)) from e
513
+ name = variant_name(tag, context)
514
+ if name not in ollama.installed_names():
515
+ ollama.create_variant(name, tag, {"num_ctx": context})
516
+ console.print(
517
+ f"Made [bold]{escape(name)}[/]: {escape(tag)} with a {format_tokens(context)} context window, for the "
518
+ f"other agents, which can't set it per request. `ollama rm {escape(name)}` removes it."
519
+ )
520
+ return name, ollama.show(name)
521
+
522
+
347
523
  def print_slice(console, name: str) -> None:
348
524
  for dataset, tasks in SLICES[name].items():
349
525
  console.print(f"[bold]{DATASETS[dataset]}[/] ({len(tasks)}): {', '.join(tasks)}")
@@ -372,6 +548,7 @@ def command(args, console) -> int:
372
548
  model = args.models[0] if args.models else settings["model"]
373
549
  # Always given: in a task's container lcode sees no GPU and would pick a context for the CPU.
374
550
  context = config.parse_context(args.context or settings.get("context") or 32768)
551
+ agent = getattr(args, "agent", None) or "lcode"
375
552
  attempts = max(1, args.attempts)
376
553
  wanted = {name.strip() for name in args.tasks.split(",")} if args.tasks else None
377
554
  picked = {
@@ -383,11 +560,25 @@ def command(args, console) -> int:
383
560
  f"[red]Not in the {args.harbor} slice: {', '.join(unknown)}[/] (lcode bench --harbor {args.harbor} --list)"
384
561
  )
385
562
  return 2
386
- jobs = config.STATE_DIR / "bench" / f"{args.harbor}-{dt.datetime.now():%Y%m%d-%H%M%S}"
563
+ ollama_model, show, agent_args, env = "", {}, None, None
564
+ if agent != "lcode": # on Ollama's model at the context, set up like `ollama launch` does
565
+ try:
566
+ ollama_model, show = context_variant(settings, model, context, console)
567
+ except OllamaError as e:
568
+ console.print(f"[red]{escape(str(e))}[/]")
569
+ return 1
570
+ named = args.harbor if agent == "lcode" else f"{args.harbor}-{agent}"
571
+ jobs = config.STATE_DIR / "bench" / f"{named}-{dt.datetime.now():%Y%m%d-%H%M%S}"
387
572
  jobs.mkdir(parents=True, exist_ok=True)
388
573
  install = update.lcode_install()
389
574
  wheel = None
390
- if install.kind == "checkout" and install.path: # this checkout, in Harbor and in the containers
575
+ if agent != "lcode":
576
+ agent_args, catalog = agent_setup(agent, ollama_model, context, show, jobs)
577
+ overlay = jobs / "overlay.yaml"
578
+ overlay.write_text(agent_overlay(bool(args.docker_bridge), catalog))
579
+ lcode_with = None
580
+ env = {**os.environ, **harbor_env()}
581
+ elif install.kind == "checkout" and install.path: # this checkout, in Harbor and in the containers
391
582
  lcode_with = ["--with-editable", str(install.path)]
392
583
  build = ["uv", "build", "--wheel", "-q", "-o", str(jobs / "wheel"), str(install.path)]
393
584
  if subprocess.run(build, capture_output=True, text=True).returncode != 0:
@@ -396,25 +587,32 @@ def command(args, console) -> int:
396
587
  wheel = next((jobs / "wheel").glob("*.whl"), None)
397
588
  else:
398
589
  lcode_with = ["--with", f"lcode-cli=={__version__}"]
399
- overlay = None
400
- if args.docker_bridge:
401
- overlay = jobs / "bridge.yaml"
402
- overlay.write_text(BRIDGE_OVERLAY)
590
+ if agent == "lcode":
591
+ overlay = None
592
+ if args.docker_bridge:
593
+ overlay = jobs / "bridge.yaml"
594
+ overlay.write_text(BRIDGE_OVERLAY)
403
595
  trials: list[Trial] = []
404
596
  started, began = dt.datetime.now().astimezone(), time.monotonic()
405
597
  for dataset, tasks in picked.items():
406
598
  if not tasks:
407
599
  continue
408
600
  argv = harbor_argv(
409
- dataset, tasks, model, jobs, dataset, attempts=attempts, context=context, lcode_with=lcode_with,
410
- wheel=wheel, overlay=overlay,
601
+ dataset, tasks, ollama_model or model, jobs, dataset, attempts=attempts, context=context,
602
+ lcode_with=lcode_with, wheel=wheel, overlay=overlay, agent=agent, agent_args=agent_args,
411
603
  ) # fmt: skip
412
604
  console.print(f"[bold]{DATASETS[dataset]}[/]: {len(tasks)} task(s), {attempts} attempt(s) each")
413
605
  console.print(f"[dim]{escape(shlex.join(argv))}[/]")
414
- subprocess.call(argv)
606
+ if env is None:
607
+ subprocess.call(argv)
608
+ else:
609
+ subprocess.call(argv, env=env)
415
610
  trials += read_trials(jobs / dataset, dataset)
416
611
  summary = summarize(trials, attempts)
417
612
  seconds = time.monotonic() - began
613
+ version = next((trial.version for trial in trials if trial.version), "")
614
+ if agent != "lcode":
615
+ console.print(f"[bold]{agent}[/] {escape(version)} on {escape(ollama_model)}")
418
616
  print_summary(console, summary)
419
617
  console.print(f"Took {took(seconds)}.")
420
618
  if any("fully subnetted" in trial.error for trial in trials):
@@ -427,7 +625,10 @@ def command(args, console) -> int:
427
625
  "lcode": __version__,
428
626
  "harbor": HARBOR,
429
627
  "slice": args.harbor,
628
+ "agent": agent,
629
+ "agent_version": version, # in the tasks' containers
430
630
  "model": model,
631
+ "ollama_model": ollama_model or None, # the other agents': the model with the context set
431
632
  "context": context,
432
633
  "attempts": attempts,
433
634
  "docker_bridge": bool(args.docker_bridge),
@@ -125,6 +125,13 @@ class Ollama:
125
125
  except requests.RequestException as e:
126
126
  raise OllamaError(f"pull failed: {e}") from e
127
127
 
128
+ def create_variant(self, name: str, base: str, parameters: dict) -> None:
129
+ """Create `name`: `base` with other parameters (a context window, say). It uses `base`'s files: nothing is
130
+ downloaded or copied."""
131
+ payload = {"model": name, "from": base, "parameters": parameters, "stream": False}
132
+ if self._post("/api/create", payload, timeout=600).get("status") != "success":
133
+ raise OllamaError(f"creating {name} failed")
134
+
128
135
  def create_text_only(self, name: str, base: str) -> bool:
129
136
  """Create `name` from `base` without its vision projector. Returns False if `base` has none.
130
137
 
@@ -225,6 +225,109 @@ def test_lcode_bench_harbor_runs_harbor_then_reports_and_saves(capsys, monkeypat
225
225
  assert report["results"][0]["tokens_in"] == 2000 and report["summary"]["pass_at_1"] == 1.0
226
226
 
227
227
 
228
+ def test_other_agents_are_set_up_like_ollama_launch_sets_them_up(tmp_path):
229
+ model = harbor_bench.variant_name("lcode-qwen3.6-35b", 65536)
230
+ assert model == "lcode-qwen3.6-35b-64k" and harbor_bench.variant_name("qwen3.6:35b-a3b:latest", 32768).endswith(
231
+ "-32k"
232
+ )
233
+ show = {"capabilities": ["completion", "tools", "thinking"], "thinking": {"values": [False, True], "default": True}}
234
+ claude, no_catalog = harbor_bench.agent_setup("claude-code", model, 65536, show, tmp_path)
235
+ assert no_catalog is None and claude[:2] == ["--ae", "ENABLE_CLAUDEAI_MCP_SERVERS=false"]
236
+ assert "DISABLE_ERROR_REPORTING=1" in claude and claude.count("--ae") == len(harbor_bench.CLAUDE_CODE_ENV)
237
+ opencode, _ = harbor_bench.agent_setup("opencode", model, 65536, show, tmp_path)
238
+ provider = json.loads(opencode[1].removeprefix("opencode_config="))["provider"]["ollama"]
239
+ assert provider["options"]["baseURL"] == "http://host.docker.internal:11434/v1"
240
+ entry = provider["models"][model]
241
+ assert entry["reasoning"] and entry["limit"] == {"context": 65536, "input": 65536, "output": 8192}
242
+ codex, catalog = harbor_bench.agent_setup("codex", model, 65536, show, tmp_path)
243
+ config = json.loads(codex[1].removeprefix("config="))
244
+ assert config["model_providers"]["ollama-launch"]["wire_api"] == "responses"
245
+ assert config["model_catalog_json"] == harbor_bench.CODEX_CATALOG
246
+ [known] = json.loads(catalog.read_text())["models"]
247
+ assert (known["slug"], known["context_window"], known["default_reasoning_level"]) == (model, 65536, "high")
248
+ assert [level["effort"] for level in known["supported_reasoning_levels"]] == ["none", "high"]
249
+ overlay = harbor_bench.agent_overlay(True, catalog)
250
+ assert "network_mode: bridge" in overlay and "host.docker.internal:host-gateway" in overlay
251
+ assert f"{catalog}:{harbor_bench.CODEX_CATALOG}:ro" in overlay
252
+ assert "volumes" not in harbor_bench.agent_overlay(False) and "network_mode" not in harbor_bench.agent_overlay(
253
+ False
254
+ )
255
+ argv = harbor_bench.harbor_argv(
256
+ "terminal-bench", ["fix-git"], model, tmp_path, "terminal-bench", context=65536, agent="codex",
257
+ agent_args=codex, overlay=tmp_path / "overlay.yaml",
258
+ ) # fmt: skip
259
+ line = " ".join(argv)
260
+ assert "-a codex -m ollama/lcode-qwen3.6-35b-64k" in line and "context=65536" not in line
261
+ assert argv[argv.index("--extra-docker-compose") - 2 :][:2] == codex # the agent's options, then the overlay
262
+ assert "lcode" not in argv[: argv.index("run")] # Harbor alone: lcode's agent isn't needed
263
+
264
+
265
+ def test_lcode_bench_harbor_runs_another_agent_on_the_model_at_the_context(capsys, monkeypatch):
266
+ from lcode import cli, config, hardware, ollama, update
267
+
268
+ monkeypatch.setattr(shutil, "which", lambda name, *a, **k: f"/usr/bin/{name}")
269
+ monkeypatch.setattr(update, "docker_available", lambda: True)
270
+ monkeypatch.setattr(update, "lcode_install", lambda *a, **k: update.Install("uvx"))
271
+ monkeypatch.setattr(hardware, "detect", lambda: hardware.Hardware("linux", "test CPU", 32.0))
272
+ installed = [{"name": "lcode-qwen3.6-35b:latest"}]
273
+ created = []
274
+
275
+ def create_variant(self, name, base, parameters):
276
+ created.append((name, base, parameters))
277
+ installed.append({"name": f"{name}:latest"})
278
+
279
+ monkeypatch.setattr(ollama.Ollama, "list_models", lambda self: installed)
280
+ monkeypatch.setattr(ollama.Ollama, "create_variant", create_variant)
281
+ show = {"capabilities": ["completion", "tools", "thinking"], "thinking": {"values": [False, True], "default": True}}
282
+ monkeypatch.setattr(ollama.Ollama, "show", lambda self, model: show)
283
+ runs = []
284
+
285
+ def harbor(argv, env=None):
286
+ runs.append((argv, env))
287
+ job = Path(argv[argv.index("-o") + 1]) / argv[argv.index("--job-name") + 1]
288
+ write_trial(job, "prove-plus-comm__a", "terminal-bench/prove-plus-comm", 1.0, 0, (9000, 300))
289
+ result = job / "prove-plus-comm__a" / "result.json"
290
+ result.write_text(json.dumps({**json.loads(result.read_text()), "agent_info": {"version": "0.166.0"}}))
291
+ return 0
292
+
293
+ monkeypatch.setattr(subprocess, "call", harbor)
294
+ bench = ["bench", "--harbor", "dev", "qwen3.6-35b", "--tasks", "prove-plus-comm", "--attempts", "1", "--ctx", "64k"]
295
+ with pytest.raises(SystemExit) as done:
296
+ cli.main([*bench, "--agent", "codex"])
297
+ assert done.value.code == 0
298
+ out = " ".join(capsys.readouterr().out.split())
299
+ assert created == [("lcode-qwen3.6-35b-64k", "lcode-qwen3.6-35b", {"num_ctx": 65536})]
300
+ assert "Made lcode-qwen3.6-35b-64k" in out and "codex 0.166.0 on lcode-qwen3.6-35b-64k" in out
301
+ again = harbor_bench.context_variant(config.load(), "qwen3.6-35b", 65536, Console(file=io.StringIO()))
302
+ assert again == ("lcode-qwen3.6-35b-64k", show) and len(created) == 1 # made once
303
+ argv, env = runs[0]
304
+ assert "-a codex -m ollama/lcode-qwen3.6-35b-64k" in " ".join(argv)
305
+ assert env["OLLAMA_BASE_URL"] == "http://host.docker.internal:11434" and env["OLLAMA_API_KEY"]
306
+ overlay = Path(argv[argv.index("--extra-docker-compose") + 1])
307
+ assert "codex-models.json" in overlay.read_text() and (overlay.parent / "codex-models.json").is_file()
308
+ saved = sorted((config.STATE_DIR / "bench").glob("dev-codex-*/lcode-bench.json"))
309
+ report = json.loads(saved[-1].read_text())
310
+ assert (report["agent"], report["agent_version"], report["ollama_model"]) == (
311
+ "codex",
312
+ "0.166.0",
313
+ "lcode-qwen3.6-35b-64k",
314
+ )
315
+ assert report["results"][0]["tokens_in"] == 9000
316
+
317
+
318
+ def test_another_agent_needs_the_model_installed(capsys, monkeypatch):
319
+ from lcode import cli, config, ollama, update
320
+
321
+ monkeypatch.setattr(shutil, "which", lambda name, *a, **k: f"/usr/bin/{name}")
322
+ monkeypatch.setattr(update, "docker_available", lambda: True)
323
+ monkeypatch.setattr(ollama.Ollama, "list_models", lambda self: [])
324
+ with pytest.raises(SystemExit) as done:
325
+ cli.main(["bench", "--harbor", "dev", "qwen3.6-35b", "--agent", "opencode"])
326
+ out = " ".join(capsys.readouterr().out.split())
327
+ assert done.value.code == 1 and "is not installed yet. Run: lcode setup qwen3.6-35b" in out
328
+ assert not list((config.STATE_DIR / "bench").glob("dev-opencode-*")) # no empty results folder
329
+
330
+
228
331
  def test_lcode_bench_harbor_lists_its_slice_and_refuses_other_tasks(capsys, monkeypatch):
229
332
  from lcode import cli, update
230
333
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes