* test_runtime_client.py to test _execute_bash()
* runtime_build and runtime tweaks
* fix in docker script
* revert bash changes
* use sandbox_config.update_source_code to control source code update
* add od_version to the sandbox tag
* add doc instruction for update source code
* do not remove whole poetry folder;
add mamba clean
* add missing newlines
* cleanup runtime dockerfile into jinja template
* make prep temp file a separate function;
make that function accessible through cli
* modify `runtime_build.py` so it can generate directory for building docker img
* add dockerfile and sdist of runtime to gitignore since it will be dynamically generated
* add runtime to build
* do not rebuild new image when an `od_runtime` is provided
* use default container_image for testing if possible
* move runtime tests to ghcr runtime workflow
* update docker base dir for runtime
* fix unittest
* fix image name
* fix image name for test case
* rename to make it consistent
---------
Co-authored-by: tobitege <tobitege@gmx.de>
* WIP for integrate aider linter, see OpenDevin#2220
Updated aider linter to:
* Always return text and line numbers
* Moved extract line number more consistently
* Changed pylint to stop after first linter detects errors
Updated agentskills
* To get back a LintResult object and then use lines and text for error message and related line number
* Moved code for extracting line number to aider linter
Tests:
* Added additional unit tests for aider to test for
* Return values from lint failures
* Confirm linter works for non-configured languages like Ruby
* move to agent_skills, fixes not seeing skills error
* format/lint to new code, fix failing tests, remove unused code from aider linter
* small changes (remove litellm, fix readme typo)
* fix failing sandbox test
* keep, change dumping of metadata
* WIP for integrate aider linter, see OpenDevin#2220
Updated aider linter to:
* Always return text and line numbers
* Moved extract line number more consistently
* Changed pylint to stop after first linter detects errors
Updated agentskills
* To get back a LintResult object and then use lines and text for error message and related line number
* Moved code for extracting line number to aider linter
Tests:
* Added additional unit tests for aider to test for
* Return values from lint failures
* Confirm linter works for non-configured languages like Ruby
* move to agent_skills, fixes not seeing skills error
* format/lint to new code, fix failing tests, remove unused code from aider linter
* remove duplication of tree-sitter, grep-ast and update poetry.lock
* revert to main branch poetry.lock version
* only update necessary package
* fix jupyter kernel wrong interpreter issue (only for swebench)
* fix failing lint tests
* update syntax error checks for flake
* update poetry lock file
* update poetry.lock file, which update content-hash
* add grep ast
* remove extra stuff caused by merge
* update pyproject
* remove extra pytest fixture, ruff styling fixes
* lint files
* update poetry.lock file
---------
Co-authored-by: Jeff Katzy <jeffreyerickatz@gmail.com>
Co-authored-by: yufansong <yufan@risingwave-labs.com>
Co-authored-by: Xingyao Wang <xingyao@all-hands.dev>
Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>
Co-authored-by: tobitege <tobitege@gmx.de>
* deprecating recall action
* fix integration tests
* fix integration tests
* refractor runtime to use async
* remove search memory
* rename .initialize to .ainit
* draft of runtime image building (separate from img agnostic)
* refractor runtime build into separate file and add unit tests for it
* fix image agnostic tests
* move `split_bash_commands` into a separate util file
* fix bash pexcept parsing for env
* refractor add_env_var from sandbox to runtime;
add test runtime for env var, remove it from sandbox;
* remove unclear comment
* capture broader error
* make `add_env_var` handle multiple export at the same time
* add multi env var test
* fix tests with new config
* make runtime tests a separate ci to avoid full disk
* Update Runtime README with architecture diagram and detailed explanations
* update test
* remove dependency of global config in sandbox test
* fix sandbox typo
* runtime tests does not need ghcr build now
* remove download runtime img
* remove dependency of global config in sandbox test
* fix sandbox typo
* try to free disk before running the tests
* Update opendevin/runtime/client/README.md
Co-authored-by: Yufan Song <33971064+yufansong@users.noreply.github.com>
* Update opendevin/runtime/client/README.md
Co-authored-by: Yufan Song <33971064+yufansong@users.noreply.github.com>
* Update opendevin/runtime/client/README.md
Co-authored-by: Yufan Song <33971064+yufansong@users.noreply.github.com>
* try to reduce code duplication
* Update opendevin/runtime/client/README.md
Co-authored-by: Yufan Song <33971064+yufansong@users.noreply.github.com>
* Update opendevin/runtime/client/README.md
Co-authored-by: Yufan Song <33971064+yufansong@users.noreply.github.com>
* Update opendevin/runtime/client/README.md
Co-authored-by: Yufan Song <33971064+yufansong@users.noreply.github.com>
* Update opendevin/runtime/client/README.md
Co-authored-by: Yufan Song <33971064+yufansong@users.noreply.github.com>
* Update opendevin/runtime/client/README.md
Co-authored-by: Yufan Song <33971064+yufansong@users.noreply.github.com>
* cleanup before setup
* temporarily remove this enable lint test since env var are now handled by runtime
* linter
---------
Co-authored-by: OpenDevin <opendevin@all-hands.dev>
Co-authored-by: Yufan Song <33971064+yufansong@users.noreply.github.com>
* Updated documentation using ruff's autofix feature
* Updated pyproject.toml to include docstring validations
* Updated documentation using ruff's autofix feature
* Updated pyproject.toml to include docstring validations
* Updated docstrings using ruff's autfix feature
* Deleted opendevin/runtime/utils/soource.py, Keeping in sync with main
---------
Co-authored-by: Graham Neubig <neubig@gmail.com>
* support loading a particular runtime class via config.runtime (default to server to not break things)
* move image agnostic util to shared runtime util
* move dependency
* include poetry.lock in sdist
* accept port as arg for client
* make client start server with specified port
* update image agnostic utility for eventstream runtime
* make client and runtime working with REST API
* rename execute_server
* add plugin to initialize stuff inside es-runtime;
cleanup runtime methods to delegate everything to container
* remove redundant ls -alh
* fix jupyter
* improve logging in agnostic sandbox
* improve logging of test function
* add read & edit
* update agnostic sandbox
* support setting work dir at start
* fix file read/write test
* fix unit test
* update tescase
* Fix unit test again
* fix unit test again again
* add replace-based block edit & preliminary test case fix
* further fix the insert behavior
* make edit only work on first occurence
* bump codeact version since we now use new edit agentskills
* update prompt for new agentskills
* update integration tests
* make run_infer.sh executable
* remove code block for edit_file
* update integration test for prompt changes
* default to not use hint for eval
* fix insert emptyfile bug
* throw value error when `to_replace` is empty
* make `_edit_or_insert_file` return string so we can try to fix some linter errors (best attempt)
* add todo
* update integration test
* fix sandbox test for this PR
* fix inserting with additional newline
* rename to edit_file_by_replace
* add back `edit_file_by_line`
* update prompt for new editing tool
* fix integration tests
* bump codeact version since there are more changes
* add back append file
* fix current line for append
* fix append unit tests
* change the location where we show edited line no to agent and fix tests
* update integration tests
* fix global window size affect by open_file bug
* fix global window size affect by open_file bug
* increase window size to 300
* add file beginning and ending marker to avoid looping
* expand the editor window to better display edit error for model
* refractor to breakdown edit to internal functions
* reduce window to 200
* move window to 100
* refractor to cleanup some logic into _calculate_window_bounds
* fix integration tests
* fix sandbox test on new prompt
* update demonstration with new changes
* fix integration
* initialize llm inside process_instance to circumvent "AttributeError: Can't pickle local object"
* update kwargs
* retry for internal server error
* fix max iteration
* override max iter from config
* fix integration tests
* remove edit file by line
* fix integration tests
* add instruction to avoid hanging
* Revert "add instruction to avoid hanging"
This reverts commit 06fd2c5938.
* handle content policy violation error
* fix integration tests
* fix typo in prompt - the window is 100
* update all integration tests
---------
Co-authored-by: Graham Neubig <neubig@gmail.com>
Co-authored-by: Xingyao Wang <xingyao@all-hands.dev>
Currently, OpenDevin uses a global singleton LLM config and a global singleton agent config. This PR allows customers to configure an LLM config for each agent. A hypothetically useful scenario is to use a cheaper LLM for repo exploration / code search, and a more powerful LLM to actually do the problem solving (CodeActAgent).
Partially solves #2075 (web GUI improvement is not the goal of this PR)
* add replace-based block edit & preliminary test case fix
* further fix the insert behavior
* make edit only work on first occurence
* bump codeact version since we now use new edit agentskills
* update prompt for new agentskills
* update integration tests
* make run_infer.sh executable
* remove code block for edit_file
* update integration test for prompt changes
* default to not use hint for eval
* fix insert emptyfile bug
* throw value error when `to_replace` is empty
* make `_edit_or_insert_file` return string so we can try to fix some linter errors (best attempt)
* add todo
* update integration test
* fix sandbox test for this PR
1. Add support for rejection action on frontend
2. Show users the reason for rejection
3. Get rid of weird empty box after delegation
4. On web GUI, show customer when a delegation starts and ends
* tmp
* tmp
* merge main
* feat: auto build image cache
* remove plugins
* use config file
* update mamba setup shell
* support agnostic sandbox image autobuild
* remove config
* Update .gitignore
Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>
* Update opendevin/runtime/docker/ssh_box.py
Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>
* update setup.sh
* readd sudo
* add sudo in dockerfile
* remove export
* move od-runtime dependencies to sandbox dockerfile
* factor out re-build logic into a separate util file
* tweak existing plugin to use OD specific sandbox
* update testcase
* attempt to fix unit test using image built in ghcr
* use cache tag
* try to fix unit tests
* add unittest
* add unittest
* add some unittests
* revert gh workflow changes
* feat: optimize sandbox image naming rule
* add pull latest image hint
* add opendevin python hint and use mamba to install gcc
* update docker image naming rule and fix mamba issue
* Update opendevin/runtime/docker/ssh_box.py
Co-authored-by: Boxuan Li <liboxuan@connect.hku.hk>
* fix: opendevin user use correct pip
* fix lint issue
* fix custom sandbox base image
* rename test name
* add skipif
---------
Co-authored-by: Graham Neubig <neubig@gmail.com>
Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>
Co-authored-by: Boxuan Li <liboxuan@connect.hku.hk>
Co-authored-by: Yufan Song <33971064+yufansong@users.noreply.github.com>
Co-authored-by: tobitege <tobitege@gmx.de>