lcode-cli 0.58.0__tar.gz → 0.60.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.
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/.github/PULL_REQUEST_TEMPLATE.md +2 -1
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/.github/workflows/ci.yml +2 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/AGENTS.md +1 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/CHANGELOG.md +42 -1
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/CONTRIBUTING.md +24 -1
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/PKG-INFO +1 -1
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/bench.md +47 -6
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/how-it-works.md +8 -5
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/public-benchmarks.md +39 -5
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/quickstart.md +1 -1
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/pyproject.toml +13 -1
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/__init__.py +1 -1
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/acp.py +22 -2
- lcode_cli-0.60.0/src/lcode/agent.py +683 -0
- lcode_cli-0.60.0/src/lcode/agent_base.py +211 -0
- lcode_cli-0.60.0/src/lcode/agent_checks.py +136 -0
- lcode_cli-0.60.0/src/lcode/agent_context.py +165 -0
- lcode_cli-0.60.0/src/lcode/agent_model.py +318 -0
- lcode_cli-0.60.0/src/lcode/agent_prompt.py +304 -0
- lcode_cli-0.60.0/src/lcode/agent_sessions.py +157 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/api.py +3 -3
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/assistant.py +2 -1
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/bench.py +3 -671
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/bench_backend.py +1 -1
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/bench_budgets.py +15 -3
- lcode_cli-0.60.0/src/lcode/bench_checks.py +61 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/bench_dedupe.py +1 -1
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/bench_flaky.py +2 -2
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/bench_logsum.py +1 -1
- lcode_cli-0.60.0/src/lcode/bench_quick.py +650 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/bench_quotes.py +1 -1
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/bench_runtime.py +1 -1
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/catalog.py +1 -1
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/checks.py +1 -1
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/cli.py +23 -485
- lcode_cli-0.60.0/src/lcode/cli_args.py +230 -0
- lcode_cli-0.60.0/src/lcode/clips.py +68 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/comfy.py +5 -4
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/config.py +1 -1
- lcode_cli-0.60.0/src/lcode/doctor.py +275 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/edits.py +3 -2
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/escalate.py +2 -2
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/extensions.py +2 -2
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/film.py +4 -4
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/harbor.py +6 -5
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/harbor_bench.py +184 -8
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/hooks.py +1 -1
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/imageopts.py +5 -4
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/lsp.py +6 -5
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/manual.py +5 -4
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/matching.py +2 -2
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/mcp/auth.py +2 -1
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/mcp/catalog.py +4 -3
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/mcp/config.py +9 -7
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/mcp/manager.py +2 -1
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/mcp/server.py +4 -4
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/media.py +6 -394
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/media_catalog.py +1 -1
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/media_cloud.py +2 -2
- lcode_cli-0.60.0/src/lcode/media_video.py +377 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/permissions.py +1 -1
- lcode_cli-0.60.0/src/lcode/qt_hook.py +317 -0
- lcode_cli-0.60.0/src/lcode/repl.py +860 -0
- lcode_cli-0.60.0/src/lcode/repl_history.py +297 -0
- lcode_cli-0.60.0/src/lcode/repl_media.py +334 -0
- lcode_cli-0.60.0/src/lcode/repl_models.py +311 -0
- lcode_cli-0.60.0/src/lcode/repl_sessions.py +137 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/replay.py +6 -5
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/review.py +2 -1
- lcode_cli-0.60.0/src/lcode/screenshots.py +677 -0
- lcode_cli-0.60.0/src/lcode/screenshots_web.py +400 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/servers/encord.py +3 -2
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/servers/valohai.py +1 -1
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/sessions.py +3 -2
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/steer.py +16 -9
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/subagents.py +3 -3
- lcode_cli-0.60.0/src/lcode/tool_helpers.py +128 -0
- lcode_cli-0.60.0/src/lcode/tool_schemas.py +319 -0
- lcode_cli-0.60.0/src/lcode/tools.py +579 -0
- lcode_cli-0.60.0/src/lcode/tools_base.py +78 -0
- lcode_cli-0.60.0/src/lcode/tools_edit.py +222 -0
- lcode_cli-0.60.0/src/lcode/tools_shell.py +248 -0
- lcode_cli-0.60.0/src/lcode/trace_export.py +184 -0
- lcode_cli-0.60.0/src/lcode/trace_view.py +313 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/traces.py +9 -452
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_acp.py +39 -11
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_agent.py +1 -1
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_bench.py +6 -6
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_bench_work.py +29 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_comfy.py +7 -7
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_context_picker.py +2 -1
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_conversations.py +2 -2
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_gitflow.py +1 -1
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_harbor_bench.py +133 -2
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_long_clips.py +7 -7
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_media_cloud.py +3 -3
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_screenshots.py +21 -18
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_tools.py +1 -1
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_traces.py +29 -26
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_video.py +2 -2
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/uv.lock +32 -2
- lcode_cli-0.58.0/src/lcode/agent.py +0 -1775
- lcode_cli-0.58.0/src/lcode/repl.py +0 -1848
- lcode_cli-0.58.0/src/lcode/screenshots.py +0 -1362
- lcode_cli-0.58.0/src/lcode/tools.py +0 -1454
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/.editorconfig +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/.github/CODEOWNERS +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/.github/ISSUE_TEMPLATE/model_request.yml +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/.github/dependabot.yml +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/.github/workflows/docs.yml +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/.github/workflows/release.yml +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/.gitignore +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/.pre-commit-config.yaml +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/CODE_OF_CONDUCT.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/LICENSE +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/README.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/SECURITY.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/action.yml +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/agents.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/assets/demo.svg +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/assets/extra.css +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/assets/film-fox-and-kitten.jpg +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/assets/long-clip-tulip.jpg +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/automation.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/changelog.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/commands.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/configuration.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/contributing.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/editors.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/git.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/hooks.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/index.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/installation.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/lsp.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/mcp.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/memory.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/models.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/modes.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/sandbox.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/search.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/servers.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/traces.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/troubleshooting.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/docs/usage.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/examples/README.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/examples/api/fix_tests.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/examples/commands/review.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/examples/skills/commit-message/SKILL.md +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/examples/skills/commit-message/scripts/staged.sh +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/install.sh +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/mkdocs.yml +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/overrides/main.html +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/scripts/make_logos.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/scripts/record_demo.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/scripts/social-preview.html +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/__main__.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/action.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/backends.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/checkpoints.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/clipboard.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/cloud.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/codesearch.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/context.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/frontmatter.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/gitflow.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/hardware.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/jobs.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/limits.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/mcp/__init__.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/mcp/catalog.toml +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/mcp/client.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/mcp/commands.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/mcp/http.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/mcp/protocol.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/mcp/stdio.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/media.toml +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/memory.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/models.toml +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/modes.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/notify.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/ollama.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/planning.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/preview.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/render.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/repeats.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/repoid.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/repomap.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/residency.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/sandbox.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/secretscan.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/servers/__init__.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/servers/xai.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/unreachable.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/update.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/vision.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/web.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/workflows/__init__.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/workflows/flux2-klein-4b-t2i.json +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/workflows/remove-background.json +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/workflows/smooth-film.json +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/workflows/sound-stable-audio.json +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/workflows/upscale-esrgan.json +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/workflows/upscale-video-esrgan.json +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/workflows/wan21-fun-camera.json +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/workflows/wan21-vace.json +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/workflows/wan22-fun-inp-5b.json +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/workflows/wan22-ti2v-5b.json +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/src/lcode/workflows/z-image-turbo-t2i.json +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/comfy_standin.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/conftest.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/fake_lsp_server.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/fake_mcp_server.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_action.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_api.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_assistant.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_backends.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_catalog.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_checkpoints.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_checks.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_cli.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_clipboard.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_cloud.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_codesearch.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_config.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_context.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_escalate.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_extensions.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_film.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_gpu_handover.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_hooks.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_image_edit.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_image_generate.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_jobs.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_look.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_lsp.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_manual.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_matching.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_mcp.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_media_catalog.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_memory.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_model_picker.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_modes.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_permissions.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_plan_mode.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_repeats.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_repomap.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_residency.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_review.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_robustness.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_sandbox.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_secretscan.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_servers.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_sessions.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_steer.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_stuck.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_subagents.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_update.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_vision.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_web.py +0 -0
- {lcode_cli-0.58.0 → lcode_cli-0.60.0}/tests/test_xai.py +0 -0
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
## Checklist
|
|
10
10
|
|
|
11
|
-
- [ ] `uv run pytest
|
|
11
|
+
- [ ] `uv run pytest`, `uv run ruff check .` and `uv run basedpyright` pass
|
|
12
12
|
- [ ] Tests cover the change
|
|
13
13
|
- [ ] Docs and `CHANGELOG.md` (*Unreleased*) are updated for user-facing changes
|
|
14
|
+
- [ ] Changes to prompts, tools or context handling: the dev slice before and after is under "How was it tested?" (`lcode bench --compare`)
|
|
14
15
|
- [ ] No secrets, tokens, personal paths or private data are included
|
|
@@ -21,6 +21,8 @@ jobs:
|
|
|
21
21
|
- uses: astral-sh/setup-uv@v10.3.2
|
|
22
22
|
- run: uv run --group dev ruff check .
|
|
23
23
|
- run: uv run --group dev ruff format --check .
|
|
24
|
+
- name: Type check
|
|
25
|
+
run: uv run --group dev basedpyright
|
|
24
26
|
- name: Shellcheck install.sh
|
|
25
27
|
run: shellcheck install.sh
|
|
26
28
|
|
|
@@ -14,6 +14,7 @@ packaged with hatchling, managed with uv. Runtime dependencies: requests, rich,
|
|
|
14
14
|
uv sync --group dev # set up .venv
|
|
15
15
|
uv run pytest # tests (no Ollama needed)
|
|
16
16
|
uv run ruff check . && uv run ruff format --check .
|
|
17
|
+
uv run basedpyright # type check src/lcode
|
|
17
18
|
uv run --group docs mkdocs build --strict # docs
|
|
18
19
|
uv run lcode doctor # check a local install against a running Ollama
|
|
19
20
|
```
|
|
@@ -6,6 +6,45 @@ All notable changes to lcode are documented here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.60.0] - 2026-11-04
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- **For contributors:** CI type-checks `src/lcode` with basedpyright, and the eight modules that were
|
|
14
|
+
over 1,000 lines are split into smaller ones, with no change in behavior. The code map in
|
|
15
|
+
`docs/how-it-works.md` lists them (#200).
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- The Valohai MCP server failed to describe an execution with an output that has no name; it now
|
|
20
|
+
shows it as `?`. Found by the type checks that CI now runs on `src/lcode` (#200).
|
|
21
|
+
- **Cancelling in an editor right after sending a request** (lcode acp) could be lost: the request then
|
|
22
|
+
ran to the end. The editor's messages are handled in threads of their own, and the request's own thread
|
|
23
|
+
reset the cancel when it started late, on a busy machine. The cancel now holds. This was also why
|
|
24
|
+
`tests/test_acp.py` failed now and then under load (#200).
|
|
25
|
+
- **`lcode bench --compare`** left out attempts whose tests ran but didn't finish, as if they hadn't
|
|
26
|
+
run, so a change that makes the tests hang could hide a drop. They count as failed now, as in
|
|
27
|
+
Harbor's own mean, and `--compare` reads both runs again from Harbor's results so that they count
|
|
28
|
+
alike. It also gives each run's model speed, and warns when one ran more than 10% slower, which
|
|
29
|
+
makes the tasks' time limits bite more often. On 0.59.0's gate, both showed (#199).
|
|
30
|
+
|
|
31
|
+
## [0.59.0] - 2026-11-03
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
|
|
35
|
+
- **`lcode bench --compare BEFORE AFTER`** (#199) compares two `--harbor` results: the tasks whose
|
|
36
|
+
results changed, and whether pass@1 moved by more than the noise, which it estimates from how
|
|
37
|
+
much each task's attempts disagree (about 9 points on the dev slice). It exits with 1 after a
|
|
38
|
+
drop beyond the noise. Releases that change prompts, tools or context handling now go through it
|
|
39
|
+
on the dev slice: see *Releases* in the contributing guide.
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
|
|
43
|
+
- **`lcode bench`'s `wide-feature` check** failed an attempt whose `budget list` printed a message
|
|
44
|
+
such as `No budgets set.` without budgets, or whose report listed the budgeted categories first.
|
|
45
|
+
The task asks for neither behavior, so both pass now. With qwen3.6-35b, this had failed two
|
|
46
|
+
attempts in three that were otherwise right.
|
|
47
|
+
|
|
9
48
|
## [0.58.0] - 2026-11-02
|
|
10
49
|
|
|
11
50
|
### Added
|
|
@@ -1242,7 +1281,9 @@ First public release.
|
|
|
1242
1281
|
- `AGENTS.md` project instructions and `/init` to generate them.
|
|
1243
1282
|
- One-line installer for Linux and macOS.
|
|
1244
1283
|
|
|
1245
|
-
[Unreleased]: https://github.com/nasser1941/lcode/compare/v0.
|
|
1284
|
+
[Unreleased]: https://github.com/nasser1941/lcode/compare/v0.60.0...HEAD
|
|
1285
|
+
[0.60.0]: https://github.com/nasser1941/lcode/compare/v0.59.0...v0.60.0
|
|
1286
|
+
[0.59.0]: https://github.com/nasser1941/lcode/compare/v0.58.0...v0.59.0
|
|
1246
1287
|
[0.58.0]: https://github.com/nasser1941/lcode/compare/v0.57.0...v0.58.0
|
|
1247
1288
|
[0.57.0]: https://github.com/nasser1941/lcode/compare/v0.56.0...v0.57.0
|
|
1248
1289
|
[0.56.0]: https://github.com/nasser1941/lcode/compare/v0.55.0...v0.56.0
|
|
@@ -38,6 +38,7 @@ uv run lcode --version # run your working copy
|
|
|
38
38
|
uv run pytest # tests
|
|
39
39
|
uv run ruff check . # lint
|
|
40
40
|
uv run ruff format . # format
|
|
41
|
+
uv run basedpyright # type check
|
|
41
42
|
```
|
|
42
43
|
|
|
43
44
|
Optional: `uvx pre-commit install` runs the linters and a secret scanner before each commit.
|
|
@@ -86,7 +87,7 @@ otherwise the first model in catalog order that fits with a useful context windo
|
|
|
86
87
|
|
|
87
88
|
## Pull request checklist
|
|
88
89
|
|
|
89
|
-
- [ ] `uv run pytest
|
|
90
|
+
- [ ] `uv run pytest`, `uv run ruff check .` and `uv run basedpyright` pass
|
|
90
91
|
- [ ] New behavior has tests (the agent loop can be tested with the scripted `FakeOllama` in `tests/conftest.py`)
|
|
91
92
|
- [ ] User-facing changes are documented in `docs/` and noted under *Unreleased* in `CHANGELOG.md`
|
|
92
93
|
- [ ] No secrets, tokens, personal paths or private data in code, tests, docs or screenshots
|
|
@@ -95,6 +96,28 @@ Commit messages: short imperative summary (`Add laguna-xs-2.1 to the catalog`),
|
|
|
95
96
|
if needed. [Conventional Commits](https://www.conventionalcommits.org/) prefixes are welcome but not
|
|
96
97
|
required.
|
|
97
98
|
|
|
99
|
+
## Releases
|
|
100
|
+
|
|
101
|
+
Maintainers release from `main`:
|
|
102
|
+
|
|
103
|
+
1. **If anything since the last release changes prompts, tools or context handling**, run the dev
|
|
104
|
+
slice of the [public benchmarks](https://nasser1941.github.io/lcode/public-benchmarks/) with it
|
|
105
|
+
and compare with the last baseline, with the same model and context:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
lcode bench --harbor dev qwen3.6-35b --context 32k
|
|
109
|
+
lcode bench --compare BASELINE NEW
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Release only if pass@1 didn't drop beyond the noise (`--compare` exits with 0), and put its
|
|
113
|
+
output on the release pull request. Otherwise the pull request says there's no such change.
|
|
114
|
+
2. A release pull request bumps `__version__` in `src/lcode/__init__.py` and the banner in
|
|
115
|
+
`docs/quickstart.md`, and dates the *Unreleased* section of `CHANGELOG.md`.
|
|
116
|
+
3. Once it's merged, publish a GitHub release for the merge commit: `gh release create vX.Y.Z
|
|
117
|
+
--target <commit>`. That uploads the package to PyPI.
|
|
118
|
+
4. The [Homebrew tap](https://github.com/nasser1941/homebrew-tap) picks up the release within a
|
|
119
|
+
day.
|
|
120
|
+
|
|
98
121
|
## Code of conduct
|
|
99
122
|
|
|
100
123
|
This project follows the [Contributor Covenant](https://github.com/nasser1941/lcode/blob/main/CODE_OF_CONDUCT.md). By participating you agree to
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: lcode-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.60.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/
|
|
@@ -160,13 +160,13 @@ closer to real work, tell good models from great ones:
|
|
|
160
160
|
| `cli-tool` | Write `logsum.py`, which summarizes web server logs, from a spec: options, text and JSON output, standard input, malformed lines, unreadable files and exit codes | 14 runs on logs it never saw give the same output and exit status as a reference implementation |
|
|
161
161
|
| `flaky-test` | Find why a test fails in about half the runs, with the same code, and fix it without changing the tests | The original tests pass under 24 hash seeds, and so does a hidden test of the order the code promises |
|
|
162
162
|
| `repo-bug` | Fix a bug reported only by its symptom (a second quote gets the first one's shipping cost) in a 47-file repository, keeping its lookups cached | Hidden tests of the report, of the same cause elsewhere and of the cache pass, and so do the repository's own tests |
|
|
163
|
-
| `wide-feature` | Add monthly budgets to an expense tracker: a new command, the report in text and JSON, and the data file, with older data files still working | Its tests pass, and a scripted session from an older data file gives
|
|
163
|
+
| `wide-feature` | Add monthly budgets to an expense tracker: a new command, the report in text and JSON, and the data file, with older data files still working | Its tests pass, and a scripted session from an older data file gives the expected output |
|
|
164
164
|
| `fast-dedupe` | Make a job that merges duplicate customer records fast, from hours to seconds for 200,000 records, without changing its output | On 60,000 records it never saw, it finishes within a minute and its output is the old job's, byte for byte |
|
|
165
165
|
| `runtime-bug` | Fix a camera wall whose window grows taller with every video frame and can't be made smaller again. Reading the code suggests band-aids; running it shows the cause | A hidden test: the window keeps its size, can be made smaller, and the video fits its cell |
|
|
166
166
|
|
|
167
|
-
qwen3.6-35b
|
|
168
|
-
`fast-dedupe`
|
|
169
|
-
|
|
167
|
+
They're where qwen3.6-35b misses: see the [results](#results-on-a-12-gb-laptop). In an earlier run
|
|
168
|
+
of the six it lost one `fast-dedupe` attempt to lcode itself: after lcode made room in the context,
|
|
169
|
+
the model lost track and repeated itself until the loop breaker stopped it.
|
|
170
170
|
|
|
171
171
|
Each rewards what a careful developer does: reading the whole spec, running a flaky test more than
|
|
172
172
|
once, fixing the cause rather than the symptom, trying old data, and comparing the new output with
|
|
@@ -191,8 +191,49 @@ to measure a model without reasoning.
|
|
|
191
191
|
|
|
192
192
|
## Results on a 12 GB laptop
|
|
193
193
|
|
|
194
|
-
RTX 4080 Laptop GPU (12 GB) with 31 GB of RAM, Ollama 0.
|
|
195
|
-
|
|
194
|
+
RTX 4080 Laptop GPU (12 GB) with 31 GB of RAM, Ollama 0.40.13, 32K context, reasoning on, lcode
|
|
195
|
+
0.58.0, three attempts at each task:
|
|
196
|
+
|
|
197
|
+
| | `qwen3.6-35b` |
|
|
198
|
+
|---|---|
|
|
199
|
+
| fix-bug | ✓✓✓ 25s |
|
|
200
|
+
| find-code | ✓✓✓ 14s |
|
|
201
|
+
| write-script | ✓✓✓ 15s |
|
|
202
|
+
| rename | ✓✓✓ 25s |
|
|
203
|
+
| precise-edit | ✓✓✓ 13s |
|
|
204
|
+
| recover | ✓✓✓ 23s |
|
|
205
|
+
| spec-fix | ✗✓✓ 1m 16s |
|
|
206
|
+
| feature | ✓✓✓ 1m 40s |
|
|
207
|
+
| cli-tool | ✓✓✗ 1m 23s |
|
|
208
|
+
| flaky-test | ✓✓✓ 39s |
|
|
209
|
+
| repo-bug | ✓✓✗ 2m 53s |
|
|
210
|
+
| wide-feature | ✓✓✓ 4m 17s |
|
|
211
|
+
| fast-dedupe | ✓✓✓ 1m 25s |
|
|
212
|
+
| runtime-bug | ✗✗✗ 5m 30s |
|
|
213
|
+
| **Passed** | **36/42** |
|
|
214
|
+
| pass@1 · pass^3 | 86% · 71% |
|
|
215
|
+
| Each attempt | 12/14, 13/14, 11/14 |
|
|
216
|
+
| Time | 62m 47s |
|
|
217
|
+
| Generation | 64.0 tok/s |
|
|
218
|
+
| Prompt reading | 851 tok/s |
|
|
219
|
+
| Tool-call errors | 4 |
|
|
220
|
+
| Memory | 10.5 GB, 98% on GPU |
|
|
221
|
+
|
|
222
|
+
What it missed:
|
|
223
|
+
- one `spec-fix` attempt fixed the reported case but not all the docstring's rules;
|
|
224
|
+
- one `cli-tool` exited with 1 after skipping malformed lines, where the spec says 0;
|
|
225
|
+
- one `repo-bug` attempt went round in circles until lcode stopped it;
|
|
226
|
+
- every `runtime-bug` attempt settled for a band-aid: the window still grew, or still couldn't be
|
|
227
|
+
made smaller.
|
|
228
|
+
|
|
229
|
+
Two `wide-feature` attempts were first counted as failed. Their `budget list` printed `No budgets
|
|
230
|
+
set.` without budgets, and one listed the budgeted categories first. The task asks for neither
|
|
231
|
+
behavior, so the check now accepts both (0.59.0), and the table counts them as passed.
|
|
232
|
+
|
|
233
|
+
### Earlier: the quick tasks, one attempt each
|
|
234
|
+
|
|
235
|
+
The quick tasks with three models, Ollama 0.32.15, 32K context, reasoning on, one attempt each (lcode
|
|
236
|
+
0.3):
|
|
196
237
|
|
|
197
238
|
| | `qwen3.6-35b` | `qwen3.5-9b` | `qwen3.5-4b` |
|
|
198
239
|
|---|---|---|---|
|
|
@@ -181,14 +181,14 @@ the Ollama server you configure, it only contacts the web when the model searche
|
|
|
181
181
|
|
|
182
182
|
| Module | Responsibility |
|
|
183
183
|
|---|---|
|
|
184
|
-
| `cli.py` | Entry point, subcommands, model and context resolution |
|
|
185
|
-
| `repl.py` | Prompt, key bindings, slash commands,
|
|
186
|
-
| `agent.py` |
|
|
187
|
-
| `tools.py` |
|
|
184
|
+
| `cli.py`, `cli_args.py`, `doctor.py` | Entry point, subcommands, model and context resolution; the options; `lcode doctor` |
|
|
185
|
+
| `repl.py` | Prompt, key bindings, status bar, and slash commands, with the model, media, memory and checkpoint, and session commands in `repl_models.py`, `repl_media.py`, `repl_history.py` and `repl_sessions.py` |
|
|
186
|
+
| `agent.py` | The tool loop. `Agent`'s state is in `agent_base.py`, and its system prompt and tools, model calls, context window, sessions and checks in `agent_prompt.py`, `agent_model.py`, `agent_context.py`, `agent_sessions.py` and `agent_checks.py` |
|
|
187
|
+
| `tools.py` | The tools and running them, with the schemas in `tool_schemas.py`, what they share in `tool_helpers.py` and `tools_base.py`, and the file and shell tools in `tools_edit.py` and `tools_shell.py` |
|
|
188
188
|
| `permissions.py` | Approval prompts and the read-only allowlist |
|
|
189
189
|
| `servers/` | The MCP servers lcode ships for services without one: Encord, Valohai |
|
|
190
190
|
| `mcp/` | MCP client: stdio and HTTP transports, OAuth sign-in, server settings, the catalog, `lcode mcp` |
|
|
191
|
-
| `bench.py` | `lcode bench`: the
|
|
191
|
+
| `bench.py` | `lcode bench`: running the tasks and the reports; the tasks are in `bench_quick.py` and the other `bench_*.py`, and what their checks share in `bench_checks.py` |
|
|
192
192
|
| `vision.py` | Looking at images with a model that can see |
|
|
193
193
|
| `subagents.py` | Subagents: agent types, running them (also in parallel), worktrees for workers |
|
|
194
194
|
| `hooks.py` | Hooks on lcode's events, and allow and deny rules for permissions |
|
|
@@ -205,3 +205,6 @@ the Ollama server you configure, it only contacts the web when the model searche
|
|
|
205
205
|
| `hardware.py` | NVIDIA / Apple Silicon detection |
|
|
206
206
|
| `ollama.py` | Ollama HTTP client |
|
|
207
207
|
| `config.py` | Settings file and environment variables |
|
|
208
|
+
| `traces.py`, `trace_view.py`, `trace_export.py` | Recording requests; listing and showing traces; exporting them with secrets masked |
|
|
209
|
+
| `media.py`, `media_video.py`, `clips.py` | Image and video mode's jobs in ComfyUI; video jobs and long clips; video files |
|
|
210
|
+
| `screenshots.py`, `screenshots_web.py`, `qt_hook.py` | The screenshot tool: programs, web pages, and the hook it puts into Qt programs |
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Public benchmarks
|
|
2
2
|
|
|
3
|
-
`lcode bench` has
|
|
4
|
-
|
|
5
|
-
rerun:
|
|
3
|
+
`lcode bench` has [tasks of its own](bench.md) that say which model works best on your machine. To
|
|
4
|
+
measure lcode against published results and other agents, it also runs on two public benchmarks
|
|
5
|
+
that anyone can rerun:
|
|
6
6
|
|
|
7
7
|
- [Terminal-Bench 2.0](https://www.tbench.ai/): tasks in a terminal, from fixing a git repository
|
|
8
8
|
to building software, recovering data or setting up servers.
|
|
@@ -80,14 +80,20 @@ With three attempts, the last line also gives each run's pass rate and the sprea
|
|
|
80
80
|
- **pass^3**: the share of tasks whose three attempts all passed. That shows how dependable lcode is,
|
|
81
81
|
not just how often it gets lucky.
|
|
82
82
|
- **runs and spread**: the pass rate of each task's first attempt, its second and its third. Single
|
|
83
|
-
runs of the same setup differ by several points
|
|
83
|
+
runs of the same setup differ by several points; `--compare` ([below](#comparing-two-runs)) says
|
|
84
|
+
whether a change between two results is more than that.
|
|
84
85
|
- **Time and tokens** per attempt, from lcode's own record of the request (its
|
|
85
86
|
[trace](traces.md)). An attempt stopped at the task's time limit counts the tokens recorded
|
|
86
87
|
until then, and a reply lcode stopped counts with an estimate. `–` means no attempt of the task
|
|
87
88
|
has a record.
|
|
89
|
+
- **The model's speed**: how many tokens per second it generated, in the median attempt, from the
|
|
90
|
+
same traces. A slower machine (short of memory, or busy with other programs) runs into the
|
|
91
|
+
tasks' time limits more often.
|
|
88
92
|
|
|
89
93
|
Attempts whose container didn't start (a failed image download, say) count neither as passed nor
|
|
90
|
-
as failed.
|
|
94
|
+
as failed. Attempts whose tests ran but didn't finish (a time limit, say) or gave no result count
|
|
95
|
+
as failed, as in Harbor's own mean, so a change that makes the tests hang can't hide a drop. The
|
|
96
|
+
report shows how many of each there were.
|
|
91
97
|
|
|
92
98
|
Everything is saved in `~/.local/state/lcode/bench/<slice>-<time>/`:
|
|
93
99
|
|
|
@@ -97,6 +103,34 @@ Everything is saved in `~/.local/state/lcode/bench/<slice>-<time>/`:
|
|
|
97
103
|
- Harbor's own results: each attempt's log, the task's test output, and lcode's trace and session.
|
|
98
104
|
`uvx --from harbor harbor view <folder>` browses them.
|
|
99
105
|
|
|
106
|
+
## Comparing two runs
|
|
107
|
+
|
|
108
|
+
`lcode bench --compare` compares two saved results, for example the dev slice before and after a
|
|
109
|
+
change, given as their folders or their `lcode-bench.json`:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
lcode bench --compare ~/.local/state/lcode/bench/dev-20261101-161623 ~/.local/state/lcode/bench/dev-20261105-201500
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
It says which lcode, model and context each one ran, warns when they don't match, lists the tasks
|
|
116
|
+
whose results changed (`3/3 → 1/3`), and compares pass@1 over the tasks both ran: within the noise,
|
|
117
|
+
better, or a drop beyond the noise.
|
|
118
|
+
|
|
119
|
+
While Harbor's results are still on the machine, `--compare` reads both runs from them again, so a
|
|
120
|
+
run saved by an older lcode counts its attempts the same way as a new one. It also gives each run's
|
|
121
|
+
model speed, and warns when one ran more than 10% slower: more of its attempts run into their time
|
|
122
|
+
limits, so part of a difference can come from the machine rather than from lcode.
|
|
123
|
+
|
|
124
|
+
The noise is how far pass@1 moves between runs of the same setup, estimated from how much each
|
|
125
|
+
task's attempts disagree: a task that always passes or always fails adds nothing, one that passes
|
|
126
|
+
half the time the most. A change counts when it's more than twice the standard error of the
|
|
127
|
+
difference. On the dev slice, with three attempts per task, that's about 9 points. `--compare` exits
|
|
128
|
+
with 1 when the second result dropped beyond the noise, so a script can stop on it.
|
|
129
|
+
|
|
130
|
+
**The release rule:** a release that changes lcode's prompts, tools or context handling ships only
|
|
131
|
+
if the dev slice doesn't drop beyond the noise against the last baseline, and the comparison goes on
|
|
132
|
+
its pull request. See the [release steps](contributing.md#releases).
|
|
133
|
+
|
|
100
134
|
## Other agents on the same model
|
|
101
135
|
|
|
102
136
|
`--agent` runs Claude Code, OpenCode or Codex on the same tasks, with the same model, context
|
|
@@ -52,7 +52,11 @@ lcode-mcp-encord = "lcode.servers.encord:main"
|
|
|
52
52
|
lcode-mcp-xai = "lcode.servers.xai:main"
|
|
53
53
|
|
|
54
54
|
[dependency-groups]
|
|
55
|
-
dev = [
|
|
55
|
+
dev = [
|
|
56
|
+
"basedpyright>=1.40.2",
|
|
57
|
+
"pytest>=8",
|
|
58
|
+
"ruff>=0.6",
|
|
59
|
+
]
|
|
56
60
|
docs = ["mkdocs-material>=9.5", "mkdocs>=1.6,<2"] # MkDocs 2 drops plugins and themes
|
|
57
61
|
|
|
58
62
|
[tool.hatch.version]
|
|
@@ -83,6 +87,8 @@ ignore = [
|
|
|
83
87
|
|
|
84
88
|
[tool.ruff.lint.per-file-ignores]
|
|
85
89
|
"src/lcode/agent.py" = ["E501"] # the prompts are prose; wrapping them would change what the model sees
|
|
90
|
+
"src/lcode/agent_prompt.py" = ["E501"] # the same prompts, moved here
|
|
91
|
+
"src/lcode/agent_context.py" = ["E501"] # the summary prompt is prose
|
|
86
92
|
"src/lcode/manual.py" = ["E501"] # the same for the help prompt
|
|
87
93
|
"src/lcode/memory.py" = ["E501"]
|
|
88
94
|
"src/lcode/subagents.py" = ["E501"]
|
|
@@ -107,3 +113,9 @@ ignore = [
|
|
|
107
113
|
[tool.pytest.ini_options]
|
|
108
114
|
testpaths = ["tests"]
|
|
109
115
|
addopts = "-q"
|
|
116
|
+
|
|
117
|
+
[tool.basedpyright]
|
|
118
|
+
# CI type-checks src/lcode (`uv run basedpyright`). Python 3.10, the oldest lcode supports, so newer APIs show up.
|
|
119
|
+
include = ["src/lcode"]
|
|
120
|
+
pythonVersion = "3.10"
|
|
121
|
+
typeCheckingMode = "standard"
|
|
@@ -19,11 +19,13 @@ the file in LCODE_ACP_LOG), and stdin is the protocol channel only.
|
|
|
19
19
|
from __future__ import annotations
|
|
20
20
|
|
|
21
21
|
import base64
|
|
22
|
+
import contextlib
|
|
22
23
|
import hashlib
|
|
23
24
|
import json
|
|
24
25
|
import os
|
|
25
26
|
import sys
|
|
26
27
|
import threading
|
|
28
|
+
from collections.abc import Callable
|
|
27
29
|
from pathlib import Path
|
|
28
30
|
from typing import IO, TYPE_CHECKING, Any
|
|
29
31
|
from urllib.parse import unquote, urlparse
|
|
@@ -76,6 +78,9 @@ class Connection:
|
|
|
76
78
|
self.pending: dict[int, tuple[threading.Event, dict]] = {}
|
|
77
79
|
self.next_id = 0
|
|
78
80
|
self.closed = False
|
|
81
|
+
# Called with each message from the editor in the order they came, before it's handled in a thread of
|
|
82
|
+
# its own: for what has to happen in that order (Server.received).
|
|
83
|
+
self.on_message: Callable[[dict], None] | None = None
|
|
79
84
|
|
|
80
85
|
def send(self, message: dict) -> None:
|
|
81
86
|
data = (json.dumps({"jsonrpc": "2.0", **message}, ensure_ascii=False) + "\n").encode()
|
|
@@ -112,6 +117,9 @@ class Connection:
|
|
|
112
117
|
self.send({"id": None, "error": {"code": -32700, "message": "parse error"}})
|
|
113
118
|
continue
|
|
114
119
|
if "method" in message:
|
|
120
|
+
if self.on_message is not None:
|
|
121
|
+
with contextlib.suppress(Exception): # never stop reading
|
|
122
|
+
self.on_message(message)
|
|
115
123
|
threading.Thread(target=self._dispatch, args=(handle, message), daemon=True).start()
|
|
116
124
|
elif message.get("id") in self.pending:
|
|
117
125
|
done, slot = self.pending.pop(message["id"])
|
|
@@ -373,8 +381,7 @@ class Session:
|
|
|
373
381
|
return {"stopReason": "end_turn"}
|
|
374
382
|
if command is not None:
|
|
375
383
|
text = command
|
|
376
|
-
self.agent
|
|
377
|
-
result = api.run_request(self.agent, text)
|
|
384
|
+
result = api.run_request(self.agent, text) # its cancel was reset when the prompt arrived (Server.received)
|
|
378
385
|
self.update({"sessionUpdate": "usage_update", "used": self.agent.ctx_used, "size": self.agent.settings.context})
|
|
379
386
|
self.update({"sessionUpdate": "session_info_update", "title": self.agent.session_title or None})
|
|
380
387
|
if result.status == "error":
|
|
@@ -472,6 +479,19 @@ class Server:
|
|
|
472
479
|
self.conn, self.console = conn, console
|
|
473
480
|
self.client_caps: dict = {}
|
|
474
481
|
self.sessions: dict[str, Session] = {}
|
|
482
|
+
conn.on_message = self.received
|
|
483
|
+
|
|
484
|
+
def received(self, message: dict) -> None:
|
|
485
|
+
"""A new prompt resets its session's cancel as soon as it arrives, in the order the editor sent things.
|
|
486
|
+
|
|
487
|
+
Each message is then handled in a thread of its own, so a cancel sent right after a prompt can run before
|
|
488
|
+
the prompt's thread starts; the cancel then holds, instead of being reset by a prompt that starts late.
|
|
489
|
+
"""
|
|
490
|
+
if message.get("method") == "session/prompt":
|
|
491
|
+
params = message.get("params") or {}
|
|
492
|
+
session = self.sessions.get(str(params.get("sessionId", "")))
|
|
493
|
+
if session is not None and session.agent.cancel is not None:
|
|
494
|
+
session.agent.cancel.clear()
|
|
475
495
|
|
|
476
496
|
def handle(self, method: str, params: dict) -> dict | None:
|
|
477
497
|
handlers = {
|