lcode-cli 0.52.0__tar.gz → 0.53.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.52.0 → lcode_cli-0.53.0}/.github/workflows/ci.yml +3 -3
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/.github/workflows/docs.yml +1 -1
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/.github/workflows/release.yml +1 -1
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/CHANGELOG.md +34 -1
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/PKG-INFO +2 -1
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/README.md +1 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/configuration.md +3 -1
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/quickstart.md +1 -1
- lcode_cli-0.53.0/docs/traces.md +183 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/troubleshooting.md +11 -1
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/usage.md +8 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/mkdocs.yml +1 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/__init__.py +1 -1
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/agent.py +60 -8
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/api.py +44 -3
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/cli.py +31 -7
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/config.py +1 -0
- lcode_cli-0.53.0/src/lcode/replay.py +653 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/screenshots.py +51 -14
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/subagents.py +2 -1
- lcode_cli-0.53.0/src/lcode/traces.py +1078 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/update.py +29 -10
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_screenshots.py +82 -0
- lcode_cli-0.53.0/tests/test_traces.py +461 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_update.py +125 -1
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/uv.lock +27 -27
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/.editorconfig +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/.github/CODEOWNERS +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/.github/ISSUE_TEMPLATE/model_request.yml +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/.github/dependabot.yml +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/.gitignore +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/.pre-commit-config.yaml +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/AGENTS.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/CODE_OF_CONDUCT.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/CONTRIBUTING.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/LICENSE +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/SECURITY.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/action.yml +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/agents.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/assets/demo.svg +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/assets/extra.css +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/assets/film-fox-and-kitten.jpg +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/assets/long-clip-tulip.jpg +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/automation.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/bench.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/changelog.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/commands.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/contributing.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/editors.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/git.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/hooks.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/how-it-works.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/index.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/installation.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/lsp.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/mcp.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/memory.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/models.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/modes.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/sandbox.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/search.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/docs/servers.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/examples/README.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/examples/api/fix_tests.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/examples/commands/review.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/examples/skills/commit-message/SKILL.md +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/examples/skills/commit-message/scripts/staged.sh +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/install.sh +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/overrides/main.html +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/pyproject.toml +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/scripts/make_logos.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/scripts/record_demo.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/scripts/social-preview.html +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/__main__.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/acp.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/action.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/assistant.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/backends.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/bench.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/bench_backend.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/bench_runtime.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/catalog.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/checkpoints.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/checks.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/clipboard.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/cloud.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/codesearch.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/comfy.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/context.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/edits.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/escalate.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/extensions.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/film.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/frontmatter.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/gitflow.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/hardware.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/hooks.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/imageopts.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/jobs.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/limits.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/lsp.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/manual.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/matching.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/mcp/__init__.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/mcp/auth.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/mcp/catalog.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/mcp/catalog.toml +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/mcp/client.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/mcp/commands.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/mcp/config.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/mcp/http.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/mcp/manager.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/mcp/protocol.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/mcp/server.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/mcp/stdio.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/media.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/media.toml +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/media_catalog.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/media_cloud.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/memory.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/models.toml +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/modes.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/notify.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/ollama.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/permissions.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/planning.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/preview.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/render.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/repeats.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/repl.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/repoid.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/repomap.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/residency.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/review.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/sandbox.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/secretscan.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/servers/__init__.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/servers/encord.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/servers/valohai.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/servers/xai.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/sessions.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/steer.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/tools.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/unreachable.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/vision.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/web.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/workflows/__init__.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/workflows/flux2-klein-4b-t2i.json +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/workflows/remove-background.json +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/workflows/smooth-film.json +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/workflows/sound-stable-audio.json +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/workflows/upscale-esrgan.json +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/workflows/upscale-video-esrgan.json +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/workflows/wan21-fun-camera.json +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/workflows/wan21-vace.json +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/workflows/wan22-fun-inp-5b.json +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/workflows/wan22-ti2v-5b.json +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/src/lcode/workflows/z-image-turbo-t2i.json +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/comfy_standin.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/conftest.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/fake_lsp_server.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/fake_mcp_server.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_acp.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_action.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_agent.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_api.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_assistant.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_backends.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_bench.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_catalog.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_checkpoints.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_checks.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_cli.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_clipboard.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_cloud.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_codesearch.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_comfy.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_config.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_context.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_context_picker.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_conversations.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_escalate.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_extensions.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_film.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_gitflow.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_gpu_handover.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_hooks.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_image_edit.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_image_generate.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_jobs.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_long_clips.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_look.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_lsp.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_manual.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_matching.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_mcp.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_media_catalog.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_media_cloud.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_memory.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_model_picker.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_modes.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_permissions.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_plan_mode.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_repeats.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_repomap.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_residency.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_review.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_robustness.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_sandbox.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_secretscan.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_servers.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_sessions.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_steer.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_stuck.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_subagents.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_tools.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_video.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_vision.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_web.py +0 -0
- {lcode_cli-0.52.0 → lcode_cli-0.53.0}/tests/test_xai.py +0 -0
|
@@ -18,7 +18,7 @@ jobs:
|
|
|
18
18
|
runs-on: ubuntu-latest
|
|
19
19
|
steps:
|
|
20
20
|
- uses: actions/checkout@v7
|
|
21
|
-
- uses: astral-sh/setup-uv@v10.2
|
|
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
24
|
- name: Shellcheck install.sh
|
|
@@ -34,7 +34,7 @@ jobs:
|
|
|
34
34
|
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
35
35
|
steps:
|
|
36
36
|
- uses: actions/checkout@v7
|
|
37
|
-
- uses: astral-sh/setup-uv@v10.2
|
|
37
|
+
- uses: astral-sh/setup-uv@v10.3.2
|
|
38
38
|
with:
|
|
39
39
|
python-version: ${{ matrix.python }}
|
|
40
40
|
- run: uv run --group dev pytest
|
|
@@ -44,7 +44,7 @@ jobs:
|
|
|
44
44
|
runs-on: ubuntu-latest
|
|
45
45
|
steps:
|
|
46
46
|
- uses: actions/checkout@v7
|
|
47
|
-
- uses: astral-sh/setup-uv@v10.2
|
|
47
|
+
- uses: astral-sh/setup-uv@v10.3.2
|
|
48
48
|
- run: uv build
|
|
49
49
|
- name: Check the wheel ships the model catalog
|
|
50
50
|
run: unzip -l dist/*.whl | grep -q "lcode/models.toml"
|
|
@@ -19,7 +19,7 @@ jobs:
|
|
|
19
19
|
runs-on: ubuntu-latest
|
|
20
20
|
steps:
|
|
21
21
|
- uses: actions/checkout@v7
|
|
22
|
-
- uses: astral-sh/setup-uv@v10.2
|
|
22
|
+
- uses: astral-sh/setup-uv@v10.3.2
|
|
23
23
|
- run: uv run --group docs mkdocs build --strict
|
|
24
24
|
- name: Publish the installer next to the site
|
|
25
25
|
run: cp install.sh site/install.sh
|
|
@@ -22,7 +22,7 @@ jobs:
|
|
|
22
22
|
id-token: write # to prove to PyPI that the upload comes from this workflow
|
|
23
23
|
steps:
|
|
24
24
|
- uses: actions/checkout@v7
|
|
25
|
-
- uses: astral-sh/setup-uv@v10.2
|
|
25
|
+
- uses: astral-sh/setup-uv@v10.3.2
|
|
26
26
|
- name: Check the release tag matches the package version
|
|
27
27
|
run: |
|
|
28
28
|
version=$(sed -n 's/^__version__ = "\(.*\)"/\1/p' src/lcode/__init__.py)
|
|
@@ -6,6 +6,38 @@ All notable changes to lcode are documented here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.53.0] - 2026-10-31
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **Run traces** (#196): each request in code mode is recorded on this machine as it runs: the
|
|
14
|
+
model's answers with the time to the first token, the total time and the tokens in and out;
|
|
15
|
+
each tool call with its result and time; the model's settings, the lcode version and the git
|
|
16
|
+
commit. Subagents get a lane of their own. Traces stay on this machine, are deleted after 30
|
|
17
|
+
days and take 200 MB at most; `lcode config set trace false` turns them off.
|
|
18
|
+
- **`lcode trace`** lists the traces, `lcode trace show 1` shows one as a timeline, and
|
|
19
|
+
`lcode trace export 1` writes a copy for a bug report with secrets, home-folder paths, user
|
|
20
|
+
names, and email and IP addresses masked.
|
|
21
|
+
- **`lcode trace replay 1`** runs a recorded request again with the recorded answers instead of a
|
|
22
|
+
model, in a copy of the folder at the recorded commit, and shows where the tool results now
|
|
23
|
+
differ. Shell commands keep their recorded results unless `--commands` runs them again. It
|
|
24
|
+
needs no GPU, and `lcode.replay.run` does the same in a test.
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- **Screenshots of web pages when the browser starts slowly.** The first start after a restart
|
|
29
|
+
reads the browser from disk, which took up to 12 seconds on GitHub's machines and sometimes
|
|
30
|
+
over the 30 seconds lcode gave it, so the shot failed with "the browser didn't answer". The
|
|
31
|
+
browser now gets 90 seconds to start. An error says whether it didn't start in time, quit, or
|
|
32
|
+
didn't answer a command, and quotes the browser's last lines.
|
|
33
|
+
- **What to do when Ollama in Docker doesn't answer.** lcode and `lcode doctor` suggested
|
|
34
|
+
installing Ollama even when it runs in a Docker container. They now name the container and give
|
|
35
|
+
the command to start it: `docker compose up` when Docker Compose made it, `docker start`
|
|
36
|
+
otherwise. A running container that doesn't answer gets `docker logs`. When there's no container
|
|
37
|
+
or Docker itself isn't running, the message says so.
|
|
38
|
+
- **The Ollama commands on macOS.** When Ollama wasn't running, or had a new version out, lcode
|
|
39
|
+
showed the Linux install command on a Mac. It now shows the Homebrew one.
|
|
40
|
+
|
|
9
41
|
## [0.52.0] - 2026-10-27
|
|
10
42
|
|
|
11
43
|
### Added
|
|
@@ -1135,7 +1167,8 @@ First public release.
|
|
|
1135
1167
|
- `AGENTS.md` project instructions and `/init` to generate them.
|
|
1136
1168
|
- One-line installer for Linux and macOS.
|
|
1137
1169
|
|
|
1138
|
-
[Unreleased]: https://github.com/nasser1941/lcode/compare/v0.
|
|
1170
|
+
[Unreleased]: https://github.com/nasser1941/lcode/compare/v0.53.0...HEAD
|
|
1171
|
+
[0.53.0]: https://github.com/nasser1941/lcode/compare/v0.52.0...v0.53.0
|
|
1139
1172
|
[0.52.0]: https://github.com/nasser1941/lcode/compare/v0.51.0...v0.52.0
|
|
1140
1173
|
[0.51.0]: https://github.com/nasser1941/lcode/compare/v0.50.0...v0.51.0
|
|
1141
1174
|
[0.50.0]: https://github.com/nasser1941/lcode/compare/v0.49.1...v0.50.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: lcode-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.53.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/
|
|
@@ -181,6 +181,7 @@ lcode
|
|
|
181
181
|
| `lcode --model qwen3.5-9b --context 128k` | pick a model and context window for this session |
|
|
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
|
+
| `lcode trace` / `lcode trace show 1` | past requests, step by step with times and tokens; export or replay one |
|
|
184
185
|
| `/undo`, `/rewind` | take back the last request's file changes, or go back further |
|
|
185
186
|
| `lcode mcp catalog` / `lcode mcp add github` | ready-made MCP servers / add one |
|
|
186
187
|
| `/rename`, `/resume` | name the current session, resume a saved one |
|
|
@@ -145,6 +145,7 @@ lcode
|
|
|
145
145
|
| `lcode --model qwen3.5-9b --context 128k` | pick a model and context window for this session |
|
|
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
|
+
| `lcode trace` / `lcode trace show 1` | past requests, step by step with times and tokens; export or replay one |
|
|
148
149
|
| `/undo`, `/rewind` | take back the last request's file changes, or go back further |
|
|
149
150
|
| `lcode mcp catalog` / `lcode mcp add github` | ready-made MCP servers / add one |
|
|
150
151
|
| `/rename`, `/resume` | name the current session, resume a saved one |
|
|
@@ -61,6 +61,7 @@ lcode config path # print the file location
|
|
|
61
61
|
| `repeat_limit` | `3` | Identical tool calls with identical results before lcode [steps in](how-it-works.md#when-the-model-repeats-itself); `0` turns it off, along with the checks for [unreachable sites](how-it-works.md#when-a-site-cant-be-reached) and [thinking in circles](how-it-works.md#when-a-reply-goes-nowhere) |
|
|
62
62
|
| `secret_check` | `true` | Before `git commit` and `git push`, look for passwords, keys and tokens they'd add ([details](usage.md#secrets-in-commits)) |
|
|
63
63
|
| `checkpoints` | `true` | Save a checkpoint before the model changes files, so [`/undo`](usage.md#undo-and-checkpoints) can restore them |
|
|
64
|
+
| `trace` | `true` | Record each request's model calls, tool calls, times and tokens on this machine, for [`lcode trace`](traces.md) (kept 30 days) |
|
|
64
65
|
|
|
65
66
|
Besides these settings, `config.toml` can hold [hooks](hooks.md) (`[[hooks]]`) and
|
|
66
67
|
[permission rules](hooks.md#permission-rules) (`[permissions]`); a repository can have its own in
|
|
@@ -115,9 +116,10 @@ Environment variables override the file, which is useful for one-off runs and CI
|
|
|
115
116
|
| `~/.local/state/lcode/lsp-logs/` | Language servers' own output |
|
|
116
117
|
| `~/.local/state/lcode/index/` | [Code search](search.md#semantic-code-search) indexes, one per repository (`lcode index`) |
|
|
117
118
|
| `~/.local/state/lcode/outputs/` | The full text of long command output that was cut short for the model (kept a week) |
|
|
119
|
+
| `~/.local/state/lcode/traces/` | [Run traces](traces.md): each request's steps, times and tokens, one file per request (kept 30 days, 200 MB at most) |
|
|
118
120
|
| `~/.local/state/lcode/limits.json` | Context sizes that ran out of GPU memory on this machine (safe to delete) |
|
|
119
121
|
|
|
120
|
-
Sessions contain everything the model read, including file contents. Delete the
|
|
122
|
+
Sessions and traces contain everything the model read, including file contents. Delete the folders to clear them.
|
|
121
123
|
|
|
122
124
|
## Tuning for speed and memory
|
|
123
125
|
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Run traces
|
|
2
|
+
|
|
3
|
+
lcode records each request in code mode as it runs: every model call and every tool call, with
|
|
4
|
+
its times and tokens. A trace shows where a slow or failed request spent its time and went wrong,
|
|
5
|
+
it can go with a bug report, and it can be **replayed** without a model to check a change to lcode
|
|
6
|
+
against real runs.
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
lcode trace # the newest 20 requests
|
|
10
|
+
lcode trace show 1 # the newest one, step by step (or just: lcode trace 1)
|
|
11
|
+
lcode trace show 1 -v # also the model's answers and the start of each result
|
|
12
|
+
lcode trace export 1 # a copy for a bug report, with secrets and personal details masked
|
|
13
|
+
lcode trace replay 1 # run it again with the recorded answers instead of a model
|
|
14
|
+
lcode trace path # the folder the traces are in
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## What's recorded
|
|
18
|
+
|
|
19
|
+
- **The request** as you typed it, and what lcode added to the conversation while it ran: a
|
|
20
|
+
failed check, a note about a malformed tool call, a note you typed while it worked.
|
|
21
|
+
- **Each model call:** the answer (text, reasoning and tool calls), the time to the first token,
|
|
22
|
+
the total time, and the tokens in and out. With Ollama, also how long loading the model and
|
|
23
|
+
reading the prompt took.
|
|
24
|
+
- **Each tool call:** its arguments, the result the model got, and how long it took. A result
|
|
25
|
+
longer than 200,000 characters keeps its start and end. When lcode cut a long output for the
|
|
26
|
+
model, the result says where the full output was saved.
|
|
27
|
+
- **The setup:** the model, its context window and the model's own sampling settings
|
|
28
|
+
(temperature, top_p and so on: lcode doesn't change them), the settings that change how lcode
|
|
29
|
+
works (checks, review, `compact_at`…), the permission mode, the lcode version, the git commit
|
|
30
|
+
the folder was at, and a fingerprint of the system prompt and of the tool definitions.
|
|
31
|
+
- **Subagents:** their model and tool calls, each subagent in a lane of its own.
|
|
32
|
+
|
|
33
|
+
## Where, and for how long
|
|
34
|
+
|
|
35
|
+
Traces stay on your machine: nothing is sent anywhere. Each request is one file in
|
|
36
|
+
`~/.local/state/lcode/traces/` (under `$LCODE_HOME` when that's set), named after its session and
|
|
37
|
+
its number in it: `20261031-142233-a1b2c3-2.jsonl` is the second request of that session. A
|
|
38
|
+
file holds one JSON object per line, written as the request runs, so a request that crashed
|
|
39
|
+
still has everything up to the crash.
|
|
40
|
+
|
|
41
|
+
- Traces older than **30 days** are deleted.
|
|
42
|
+
- When all of them take more than **200 MB**, the oldest go first.
|
|
43
|
+
- One trace stops growing at **20 MB**; it still records how the request ended.
|
|
44
|
+
|
|
45
|
+
A trace holds what the session saw, like a saved session does: the contents of files the model
|
|
46
|
+
read, command output, and any secrets in them. Share one with `lcode trace export`, which masks
|
|
47
|
+
them.
|
|
48
|
+
|
|
49
|
+
**Turn traces off** with `lcode config set trace false`. `lcode bench` doesn't record its runs.
|
|
50
|
+
|
|
51
|
+
Recording takes a few milliseconds per request (2 ms for the 88-second request below): each trace
|
|
52
|
+
says how long in its last line (`trace_seconds`), and `lcode trace show` as *recording*.
|
|
53
|
+
|
|
54
|
+
## Reading a trace
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
$ lcode trace
|
|
58
|
+
# When Request Model Steps Time Status
|
|
59
|
+
1 1 min ago Use two explore agents at the same time: on… lcode-qwen3.6-35b 2 1 min 13 s success
|
|
60
|
+
2 5 min ago The tests fail. Find out why and fix the co… lcode-qwen3.6-35b 6 1 min 28 s success
|
|
61
|
+
2 trace(s), 25 KB, in ~/.local/state/lcode/traces (kept 30 days). lcode trace show 1 · export 1 · replay 1
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
$ lcode trace show 2
|
|
66
|
+
Trace 20261031-184203-3e0674-1 · 2026-10-31 18:42 · success in 1 min 28 s
|
|
67
|
+
Request: The tests fail. Find out why and fix the code (not the tests).
|
|
68
|
+
lcode-qwen3.6-35b · 256K context · thinking on · yolo mode · lcode 0.53.0 · ~/code/textstats at 958102f
|
|
69
|
+
Sampling (the model's own): top_k 20, top_p 0.95, min_p 0, temperature 0.6
|
|
70
|
+
|
|
71
|
+
1.3 s model 1 10.2K in · 206 out · first token 1 min 3 s (loading 21 s, reading 41 s) · 1 min 6 s → read_file, read_file
|
|
72
|
+
67.4 s read_file src/textstats/stats.py 13 lines 0.0 s
|
|
73
|
+
67.4 s read_file tests/test_stats.py 13 lines 0.0 s
|
|
74
|
+
67.4 s model 2 10.8K in · 50 out · first token 1.7 s · 2.4 s → bash
|
|
75
|
+
69.9 s bash python3 -m pytest -q 2>&1 36 lines 0.3 s
|
|
76
|
+
70.2 s model 3 11.2K in · 364 out · first token 1.6 s · 7.6 s → edit_file
|
|
77
|
+
77.8 s edit_file src/textstats/stats.py 8 lines 0.8 s
|
|
78
|
+
78.6 s model 4 11.7K in · 195 out · first token 1.2 s · 4.1 s → edit_file
|
|
79
|
+
82.8 s edit_file src/textstats/stats.py 8 lines 0.3 s
|
|
80
|
+
83.1 s model 5 12.0K in · 51 out · first token 1.4 s · 2.1 s → bash
|
|
81
|
+
85.2 s bash python3 -m pytest -q 2>&1 4 lines 0.2 s
|
|
82
|
+
85.4 s model 6 12.1K in · 144 out · first token 0.8 s · 3.1 s → answer
|
|
83
|
+
|
|
84
|
+
success · 6 model call(s) · 68.0K tokens in, 1.0K out · model 1 min 25 s · tools 1.6 s (6 calls) · recording 2 ms
|
|
85
|
+
Changed: src/textstats/stats.py
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Each line shows when its step started. Here the first model call waited a minute for
|
|
89
|
+
its first token: 21 seconds loading the model into memory and 41 seconds reading the prompt into
|
|
90
|
+
a fresh 256K context. After that, each step answered within two seconds. A subagent's steps
|
|
91
|
+
show its lane (`agent 1`, `agent 2`) and the task it was given.
|
|
92
|
+
|
|
93
|
+
The file itself is plain JSON lines, one per event, for scripts: `start`, `env` (the git commit
|
|
94
|
+
and sampling settings), `message`, `model`, `tool`, `check`, `escalate`, `compacted`, and `end`
|
|
95
|
+
with the totals.
|
|
96
|
+
|
|
97
|
+
## Exporting for a bug report
|
|
98
|
+
|
|
99
|
+
`lcode trace export 1` writes `lcode-trace-<id>.jsonl` in the current folder (`-o FILE` names
|
|
100
|
+
another; `-o -` prints it) with these masked:
|
|
101
|
+
|
|
102
|
+
- **secrets:** keys and tokens lcode's [secret check](usage.md#secrets-in-commits) recognizes,
|
|
103
|
+
passwords in web addresses and in `password = …` style settings, private keys, and the values
|
|
104
|
+
of your environment variables whose names say KEY, TOKEN, SECRET, PASSWORD and the like,
|
|
105
|
+
wherever they turn up;
|
|
106
|
+
- **your home folder** (shown as `~`) and other users' home folders;
|
|
107
|
+
- **names:** your user name, your full name, the name and email address in your git settings,
|
|
108
|
+
and the computer's name;
|
|
109
|
+
- **email addresses and IP addresses** (except 127.0.0.1).
|
|
110
|
+
|
|
111
|
+
It says how many of each it masked. Masking errs on the side of too much, but it can still miss
|
|
112
|
+
something, so read the file before you share it.
|
|
113
|
+
|
|
114
|
+
## Replaying a trace
|
|
115
|
+
|
|
116
|
+
`lcode trace replay` runs a recorded request again, with the recorded answers standing in for the
|
|
117
|
+
model: no GPU and no model server needed. The tools run again in a temporary copy of the folder,
|
|
118
|
+
and lcode compares each result with the recorded one. It answers "does this change to lcode still
|
|
119
|
+
behave the same on real runs?" and, when it doesn't, shows exactly where.
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
$ lcode trace replay 2
|
|
123
|
+
Replaying 20261031-184203-3e0674-1 (6 model answer(s)) in ~/code/textstats at the recorded commit 958102f.
|
|
124
|
+
Shell commands get their recorded results; --commands runs them again in the copy.
|
|
125
|
+
Tool calls run again: 4, with the same result: 4. Given their recorded result: 2. Model calls: 6 recorded, 6 in the replay.
|
|
126
|
+
Status: recorded success, now success
|
|
127
|
+
No differences.
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
When something differs, the replay shows where, with the recorded and the new result:
|
|
131
|
+
|
|
132
|
+
```text
|
|
133
|
+
Tool calls run again: 4, with the same result: 3. Given their recorded result: 2. Model calls: 6 recorded, 6 in the replay.
|
|
134
|
+
Status: recorded success, now success
|
|
135
|
+
1 difference(s):
|
|
136
|
+
step 1 · read_file src/textstats/stats.py
|
|
137
|
+
@@ -1,2 +1,2 @@
|
|
138
|
+
- 1 """Small text statistics."""
|
|
139
|
+
+ 1 """Small text statistics: word counts and lengths."""
|
|
140
|
+
2
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
- **Where it runs:** never in your folder. In a copy of the git repository at the commit the
|
|
144
|
+
request started from (the copy doesn't have changes that weren't committed then; the replay
|
|
145
|
+
says so), or, outside git, in a copy of the folder as it is now. `--repo DIR` replays in a copy
|
|
146
|
+
of another folder, and `--keep` keeps the copy afterwards. Recorded paths into your folder point
|
|
147
|
+
into the copy, file tools can't reach anything outside it, and the copy has no git remotes.
|
|
148
|
+
- **What runs again:** reading, searching, writing and editing files, the todo list, skills, the
|
|
149
|
+
repository map, subagents and plans.
|
|
150
|
+
- **What gets its recorded result:** shell commands and the project's checks (`--commands` runs
|
|
151
|
+
them again, in the copy, as they were recorded: use it for traces whose commands you'd run
|
|
152
|
+
yourself), web searches and pages, MCP tools, language servers, code search,
|
|
153
|
+
images and screenshots, memory notes and a stronger model's advice; and whatever you answered,
|
|
154
|
+
such as a refused permission or your decision on a plan.
|
|
155
|
+
- **What's compared:** each tool call and its result, lcode's notes to the model, the checks' exit
|
|
156
|
+
codes, the number of model calls, and how the request ended. The folder's path, the names of
|
|
157
|
+
saved outputs, timings, and lines drawn to the terminal's width (pytest's `=====`) don't count.
|
|
158
|
+
Commands run with the terminal size the recorded ones had.
|
|
159
|
+
|
|
160
|
+
It exits with 0 when nothing differs and 1 when something does, so it fits in a script.
|
|
161
|
+
|
|
162
|
+
A replay doesn't repeat notes you typed while the request ran. Subagents that ran at the same time
|
|
163
|
+
replay one after another. An exported trace has its folder masked: replay it with `--repo`.
|
|
164
|
+
|
|
165
|
+
### In tests
|
|
166
|
+
|
|
167
|
+
Any trace replays in a test, without a model server:
|
|
168
|
+
|
|
169
|
+
```python
|
|
170
|
+
from pathlib import Path
|
|
171
|
+
|
|
172
|
+
from lcode import replay, traces
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
def test_the_parser_fix_still_replays(tmp_path):
|
|
176
|
+
folder = tmp_path / "parser"
|
|
177
|
+
... # the files as they were when the trace was recorded
|
|
178
|
+
report = replay.run(traces.load(Path("tests/traces/parser-fix.jsonl")), folder)
|
|
179
|
+
assert report.ok, report.differences
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
`report.differences` lists each difference with its step, the call, and the recorded and new
|
|
183
|
+
result.
|
|
@@ -17,9 +17,19 @@ Ollama isn't running (or isn't installed).
|
|
|
17
17
|
|
|
18
18
|
- Linux: `sudo systemctl start ollama` (check with `systemctl status ollama`).
|
|
19
19
|
- macOS: open the Ollama app, or `brew services start ollama`.
|
|
20
|
-
- Docker:
|
|
20
|
+
- Docker: lcode looks for the Ollama container that publishes port 11434, and says how to start it: with
|
|
21
|
+
`docker compose up` when Docker Compose made it, or `docker start <container>`. If there's no such
|
|
22
|
+
container any more (for example after `docker system prune`), create it again; when its volume was removed
|
|
23
|
+
as well (`docker volume prune -a`), so were the models: download them again with `lcode setup`.
|
|
21
24
|
- Remote server: `lcode config set ollama_host http://host:11434`.
|
|
22
25
|
|
|
26
|
+
### Docker: `all predefined address pools have been fully subnetted`
|
|
27
|
+
|
|
28
|
+
Docker Compose can't create a network for the Ollama container. A VPN that routes all traffic (for example
|
|
29
|
+
with routes `0.0.0.0/1` and `128.0.0.0/1`) covers every address range Docker would use. Put the
|
|
30
|
+
container on Docker's default network instead: add `network_mode: bridge` to the Ollama service in the
|
|
31
|
+
compose file, and run `docker compose up -d` again.
|
|
32
|
+
|
|
23
33
|
### `lcode isn't set up yet` / `… is not installed yet`
|
|
24
34
|
|
|
25
35
|
Run `lcode setup` (or `lcode setup <model>`) to download a model.
|
|
@@ -10,6 +10,7 @@ lcode doctor # check the installation (include this in bug repor
|
|
|
10
10
|
lcode media [install MODEL] # image and video models: what fits here, what's installed; install one
|
|
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
|
+
lcode trace [action] [N] # past requests: show one step by step, export or replay it (see Run traces)
|
|
13
14
|
lcode mcp [catalog|add|list] # connect MCP servers: Jira, GitHub, AWS, databases… (see MCP servers)
|
|
14
15
|
lcode acp # run inside an editor over the Agent Client Protocol (see Editors)
|
|
15
16
|
lcode update [--check] # update lcode, and Ollama when it runs in Docker (see Installation)
|
|
@@ -519,6 +520,9 @@ a screen and sees what you would, measured:
|
|
|
519
520
|
- Needs: Xvfb for other desktop programs (`sudo apt install xvfb x11-apps`), and Chrome or
|
|
520
521
|
Chromium for web pages. On macOS only Qt programs and web pages work, since there's no virtual
|
|
521
522
|
display.
|
|
523
|
+
- The first web page after a restart can take a few seconds longer, while the browser loads from
|
|
524
|
+
disk: lcode gives it 90 seconds to start. If it doesn't start, or quits, the error says which and
|
|
525
|
+
quotes the browser's last lines.
|
|
522
526
|
|
|
523
527
|
## Permissions
|
|
524
528
|
|
|
@@ -766,6 +770,10 @@ model has to read a file again before editing it.
|
|
|
766
770
|
`LCODE_HOME`, or `XDG_STATE_HOME`, moves that folder: a terminal that sets one of them (some IDEs
|
|
767
771
|
and test scripts do) sees other sessions. `lcode bench` doesn't save its runs as sessions.
|
|
768
772
|
|
|
773
|
+
Each request is also recorded as a [run trace](traces.md): its model and tool calls with their
|
|
774
|
+
times and tokens. `lcode trace` lists them, and `lcode trace show 1` shows the last one step by
|
|
775
|
+
step.
|
|
776
|
+
|
|
769
777
|
## Scripting
|
|
770
778
|
|
|
771
779
|
`-p` runs one request and exits, which is handy in scripts and git hooks:
|
|
@@ -18,6 +18,7 @@ import uuid
|
|
|
18
18
|
from collections.abc import Callable
|
|
19
19
|
from dataclasses import dataclass
|
|
20
20
|
from pathlib import Path
|
|
21
|
+
from typing import TYPE_CHECKING
|
|
21
22
|
|
|
22
23
|
from rich.console import Console
|
|
23
24
|
from rich.markdown import Markdown
|
|
@@ -41,6 +42,7 @@ from lcode import (
|
|
|
41
42
|
review,
|
|
42
43
|
sessions,
|
|
43
44
|
subagents,
|
|
45
|
+
traces,
|
|
44
46
|
vision,
|
|
45
47
|
web,
|
|
46
48
|
)
|
|
@@ -77,6 +79,9 @@ from lcode.tools import (
|
|
|
77
79
|
)
|
|
78
80
|
from lcode.unreachable import NOTE_AT, Sites
|
|
79
81
|
|
|
82
|
+
if TYPE_CHECKING:
|
|
83
|
+
from lcode.replay import ReplayServer
|
|
84
|
+
|
|
80
85
|
GPU_MEMORY_ERRORS = (
|
|
81
86
|
"out of memory",
|
|
82
87
|
"illegal memory access",
|
|
@@ -349,6 +354,7 @@ class Settings:
|
|
|
349
354
|
escalate_model: str | None = None # a stronger model to ask when stuck (lcode.escalate): provider/model
|
|
350
355
|
escalate_url: str | None = None # its server, when not the provider's usual one
|
|
351
356
|
escalate_price: str | None = None # dollars per million tokens in/out, e.g. "3/15", for the cost estimate
|
|
357
|
+
trace: bool = False # record each request on this machine (lcode.traces)
|
|
352
358
|
|
|
353
359
|
|
|
354
360
|
class Agent:
|
|
@@ -436,6 +442,8 @@ class Agent:
|
|
|
436
442
|
self._repo: tuple[Path, repoid.Repo | None] | None = None # the workspace's repository, for saved sessions
|
|
437
443
|
self.last_speed = 0.0
|
|
438
444
|
self.usage = {"requests": 0, "prompt_tokens": 0, "prompt_ns": 0, "output_tokens": 0, "output_ns": 0}
|
|
445
|
+
self.trace: traces.Lane | None = None # the request's trace while it's recorded (lcode.traces)
|
|
446
|
+
self.replay: ReplayServer | None = None # in a replay: the recorded results of tools and checks (lcode.replay)
|
|
439
447
|
self.messages: list[dict] = []
|
|
440
448
|
self.reset()
|
|
441
449
|
|
|
@@ -981,7 +989,10 @@ class Agent:
|
|
|
981
989
|
added = "\n".join(f"- {note}" for note in self.turn_requests[1:])
|
|
982
990
|
request += f"\n\nWhat the user added while you worked:\n{added}"
|
|
983
991
|
try:
|
|
984
|
-
with
|
|
992
|
+
with (
|
|
993
|
+
self.console.status("Reviewing the change against your request…", spinner="dots"),
|
|
994
|
+
traces.purpose(self, "review"),
|
|
995
|
+
):
|
|
985
996
|
problems = review.run(self, request, answer, diff)
|
|
986
997
|
except OllamaError as e:
|
|
987
998
|
self.say(f"The review didn't run: {e}", warning=True)
|
|
@@ -1043,8 +1054,12 @@ class Agent:
|
|
|
1043
1054
|
def run_check(self, check: checks.Check, round_: int) -> str | None:
|
|
1044
1055
|
"""Run the checks after a change. Returns what to tell the model when they fail, else None."""
|
|
1045
1056
|
self.say(f"Checking the work: {check.command} (from {check.source})")
|
|
1046
|
-
result = self.
|
|
1057
|
+
result = self.replay.check_result(check.command) if self.replay is not None else None
|
|
1058
|
+
if result is None:
|
|
1059
|
+
result = self.tools.run("bash", {"command": check.command, "timeout": checks.TIMEOUT})
|
|
1047
1060
|
code = checks.exit_code(result)
|
|
1061
|
+
if self.trace is not None:
|
|
1062
|
+
self.trace.check(check.command, result, code)
|
|
1048
1063
|
self.check_results.append({"command": check.command, "exit_code": code, "by": "lcode"})
|
|
1049
1064
|
if code is None:
|
|
1050
1065
|
self.say(f"The checks didn't run: {result.splitlines()[0][:200]}", warning=True)
|
|
@@ -1153,9 +1168,20 @@ class Agent:
|
|
|
1153
1168
|
def run_turn(self, user_text: str) -> None:
|
|
1154
1169
|
self.turn_started = time.monotonic()
|
|
1155
1170
|
self.checkpoints.begin_turn(self.session_id, user_text, len(self.messages))
|
|
1171
|
+
lane = traces.start(self, user_text)
|
|
1172
|
+
status, error = "error", ""
|
|
1156
1173
|
try:
|
|
1157
1174
|
self._run_turn(user_text)
|
|
1175
|
+
status = self.turn_status
|
|
1176
|
+
except KeyboardInterrupt:
|
|
1177
|
+
status = "interrupted"
|
|
1178
|
+
raise
|
|
1179
|
+
except Exception as e:
|
|
1180
|
+
error = str(e) if isinstance(e, OllamaError) else f"{type(e).__name__}: {e}"
|
|
1181
|
+
raise
|
|
1158
1182
|
finally:
|
|
1183
|
+
if lane is not None:
|
|
1184
|
+
traces.finish(self, lane, status, error)
|
|
1159
1185
|
self.checkpoints.end_turn()
|
|
1160
1186
|
if self.hooks.hooks and self.allowed_tools is None:
|
|
1161
1187
|
payload = {"request": user_text[:2000], "cwd": str(self.cwd), "session": self.session_id}
|
|
@@ -1189,6 +1215,8 @@ class Agent:
|
|
|
1189
1215
|
|
|
1190
1216
|
def sandbox_root(self) -> Path | None:
|
|
1191
1217
|
"""The folder the model is limited to while the sandbox is on (None when it's off)."""
|
|
1218
|
+
if self.replay is not None:
|
|
1219
|
+
return self.replay.root # a replay changes nothing outside its copy of the folder (lcode.traces)
|
|
1192
1220
|
if not self.sandbox:
|
|
1193
1221
|
return None
|
|
1194
1222
|
try:
|
|
@@ -1290,7 +1318,7 @@ class Agent:
|
|
|
1290
1318
|
why = "its replies went round in circles or ended without an answer, twice in this request"
|
|
1291
1319
|
if not escalated and self.can_escalate():
|
|
1292
1320
|
escalated = True
|
|
1293
|
-
advice =
|
|
1321
|
+
advice = self.ask_stronger(why)
|
|
1294
1322
|
if advice:
|
|
1295
1323
|
self.messages.append({"role": "user", "content": advice})
|
|
1296
1324
|
stalls = 0
|
|
@@ -1334,7 +1362,7 @@ class Agent:
|
|
|
1334
1362
|
if check_rounds >= checks.MAX_ROUNDS and not escalated and self.can_escalate():
|
|
1335
1363
|
escalated = True
|
|
1336
1364
|
why = f"the project's checks (`{check.command}`) failed {check_rounds} times in a row"
|
|
1337
|
-
advice =
|
|
1365
|
+
advice = self.ask_stronger(why, failure=feedback)
|
|
1338
1366
|
if advice:
|
|
1339
1367
|
self.messages.append({"role": "user", "content": advice})
|
|
1340
1368
|
check_rounds -= 1 # the checks run once more after the advice
|
|
@@ -1376,8 +1404,11 @@ class Agent:
|
|
|
1376
1404
|
self.on_tool(name, args)
|
|
1377
1405
|
if name not in ("bash", "todo_write", "web_search", "web_fetch", "agent"): # those print their own
|
|
1378
1406
|
self.console.print(Text(f"● {self.describe_call(name, args)}", style="bold magenta"))
|
|
1407
|
+
began = time.monotonic()
|
|
1408
|
+
if self.trace is not None:
|
|
1409
|
+
self.trace.tool_begin()
|
|
1379
1410
|
try:
|
|
1380
|
-
result = done[i] if i in done else self.
|
|
1411
|
+
result = done[i] if i in done else self.run_tool(name, args)
|
|
1381
1412
|
except KeyboardInterrupt:
|
|
1382
1413
|
for rest in calls[i:]:
|
|
1383
1414
|
self.messages.append(
|
|
@@ -1425,6 +1456,8 @@ class Agent:
|
|
|
1425
1456
|
changed, verified = True, False
|
|
1426
1457
|
elif name == "bash" and changed and self.model_ran_checks(str(args.get("command", "")), result):
|
|
1427
1458
|
verified = True # the model ran the checks itself, after its last change
|
|
1459
|
+
if self.trace is not None:
|
|
1460
|
+
self.trace.tool(call.get("id", ""), name, args, result, time.monotonic() - began)
|
|
1428
1461
|
tool_msg = {"role": "tool", "tool_name": name, "content": result}
|
|
1429
1462
|
if call.get("id"):
|
|
1430
1463
|
tool_msg["tool_call_id"] = call["id"]
|
|
@@ -1451,7 +1484,7 @@ class Agent:
|
|
|
1451
1484
|
break
|
|
1452
1485
|
if looping and not escalated and self.can_escalate():
|
|
1453
1486
|
escalated = True
|
|
1454
|
-
advice =
|
|
1487
|
+
advice = self.ask_stronger(f"it kept making the same call with the same result: {looping}")
|
|
1455
1488
|
if advice:
|
|
1456
1489
|
self.messages.append({"role": "user", "content": advice})
|
|
1457
1490
|
self.repeats.reset()
|
|
@@ -1486,6 +1519,24 @@ class Agent:
|
|
|
1486
1519
|
self.turn_status = "success"
|
|
1487
1520
|
self.print_stats()
|
|
1488
1521
|
|
|
1522
|
+
def run_tool(self, name: str, args: dict) -> str:
|
|
1523
|
+
if self.replay is not None: # a replay gives some tools their recorded results (lcode.traces)
|
|
1524
|
+
served = self.replay.tool_result(name, args)
|
|
1525
|
+
if served is not None:
|
|
1526
|
+
return served
|
|
1527
|
+
args = self.replay.moved(args) # the recorded folder's paths point into the replay's copy
|
|
1528
|
+
return self.tools.run(name, args)
|
|
1529
|
+
|
|
1530
|
+
def ask_stronger(self, why: str, failure: str = "") -> str | None:
|
|
1531
|
+
"""The stronger model's advice for the local model, if one is set and the user agrees (lcode.escalate)."""
|
|
1532
|
+
if self.replay is not None:
|
|
1533
|
+
return self.replay.escalation(why)
|
|
1534
|
+
with traces.inside(self, "escalate"):
|
|
1535
|
+
advice = escalate.run(self, why, failure)
|
|
1536
|
+
if self.trace is not None:
|
|
1537
|
+
self.trace.escalation(why, advice)
|
|
1538
|
+
return advice
|
|
1539
|
+
|
|
1489
1540
|
def keep_dropped(self, reply: dict) -> str:
|
|
1490
1541
|
"""Save a reply lcode dropped (its thinking too), so the user can see what went round in circles."""
|
|
1491
1542
|
text = "\n\n".join(part for part in (reply.get("thinking"), reply.get("content")) if part)
|
|
@@ -1665,7 +1716,8 @@ class Agent:
|
|
|
1665
1716
|
if len(self.messages) <= 2:
|
|
1666
1717
|
return
|
|
1667
1718
|
if self.interactive:
|
|
1668
|
-
|
|
1719
|
+
with traces.inside(self, "memory"):
|
|
1720
|
+
memory_notes.reflect(self) # what the summary leaves out is gone for good
|
|
1669
1721
|
instructions = (
|
|
1670
1722
|
"Summarize this conversation so the work can continue in a fresh context. Include: the user's goals "
|
|
1671
1723
|
"and requests, key facts learned about the codebase (files, functions, paths with line numbers), "
|
|
@@ -1675,7 +1727,7 @@ class Agent:
|
|
|
1675
1727
|
if focus:
|
|
1676
1728
|
instructions += f" Focus especially on: {focus}"
|
|
1677
1729
|
summary = ""
|
|
1678
|
-
with self.console.status("[cyan]Compacting…[/]"):
|
|
1730
|
+
with self.console.status("[cyan]Compacting…[/]"), traces.purpose(self, "summary"):
|
|
1679
1731
|
for chunk in self.chat([*self.messages, {"role": "user", "content": instructions}], None, False):
|
|
1680
1732
|
summary += chunk.get("message", {}).get("content", "")
|
|
1681
1733
|
requests = context_tools.user_requests(self.messages)
|