SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]
Use jinja2 for formatting of templates
Kilian Lieret239031331a38
diff --git a/config/coding_challenge.yaml b/config/coding_challenge.yamlindex 8cf605a6..455702f4 100644--- a/config/coding_challenge.yaml+++ b/config/coding_challenge.yaml@@ -10,11 +10,11 @@system_template: |-SETTING: You are an autonomous programmer, and you're working directly in the command line with a special interface.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -38,7 +38,7 @@ system_template: |-instance_template: |-We're currently attempting to solve the following problem:ISSUE:- {issue}+ {{issue}}INSTRUCTIONS:Now, you're going to solve this issue on your own. Your terminal session has started and you're in the repository's root directory. You can use any bash commands or the special interface to help you. Edit all the files you need to and run any checks or tests that you want.@@ -59,37 +59,37 @@ instance_template: |-5. When editing files, it is easy to accidentally specify a wrong line number or to write code with incorrect indentation. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";if [ -z "$CURRENT_FILE" ]; then- echo '{"open_file": "n/a", "working_dir": "'$working_dir'"}';+ echo '{{"open_file": "n/a", "working_dir": "'$working_dir'"}}';else- echo '{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}';+ echo '{{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}}';fi- };+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100diff --git a/config/ctf/ctf_crypto.yaml b/config/ctf/ctf_crypto.yamlindex 528bad53..c2d3cc9c 100644--- a/config/ctf/ctf_crypto.yaml+++ b/config/ctf/ctf_crypto.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -66,35 +66,35 @@ instance_template: |-9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";- local interactive_session="${INTERACTIVE_SESSION:-n/a}";+ local interactive_session="${{INTERACTIVE_SESSION:-n/a}}";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -126,14 +126,14 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.Please consider using one of the interactive commands available to you in this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/crypto/katy.traj@@ -145,26 +145,26 @@ summarizer_config:SETTING: You are a skilled cybersecurity professional and top CTF player.You are currently playing as part of a team in a CTF competition.- Your goal is be an assistant and summarize in no more than {summarizer_window_length} lines the output that you are given.+ Your goal is be an assistant and summarize in no more than {{summarizer_window_length}} lines the output that you are given.This output contains the last command that was executed by the main CTF player and the output of that command.- You should include less than {summarizer_window_length} lines in your summary, please make sure that your summary is helpful in the sense of helping+ You should include less than {{summarizer_window_length}} lines in your summary, please make sure that your summary is helpful in the sense of helpingyour team member to solve the challenge and get the flag. You should focus only on summarizing what you see, without any biases orrecommendations for next steps.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}The last command that was run is:```- {command}+ {{command}}```The output of the command is given hereby:```- {observation}+ {{observation}}```INSTRUCTIONS:You need to give a short summary of the output so that your team member who run this command and is solving the challenge will have insights on how to solve the challenge using your summary.- Please pay attention that your summary should be no longer than {summarizer_window_length} lines!\ No newline at end of file+ Please pay attention that your summary should be no longer than {{summarizer_window_length}} lines!\ No newline at end of filediff --git a/config/ctf/ctf_crypto_no_interactive.yaml b/config/ctf/ctf_crypto_no_interactive.yamlindex 997345ae..d315ee8b 100644--- a/config/ctf/ctf_crypto_no_interactive.yaml+++ b/config/ctf/ctf_crypto_no_interactive.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -66,31 +66,31 @@ instance_template: |-9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -119,13 +119,13 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/crypto/katy.traj@@ -137,26 +137,26 @@ summarizer_config:SETTING: You are a skilled cybersecurity professional and top CTF player.You are currently playing as part of a team in a CTF competition.- Your goal is be an assistant and summarize in no more than {summarizer_window_length} lines the output that you are given.+ Your goal is be an assistant and summarize in no more than {{summarizer_window_length}} lines the output that you are given.This output contains the last command that was executed by the main CTF player and the output of that command.- You should include less than {summarizer_window_length} lines in your summary, please make sure that your summary is helpful in the sense of helping+ You should include less than {{summarizer_window_length}} lines in your summary, please make sure that your summary is helpful in the sense of helpingyour team member to solve the challenge and get the flag. You should focus only on summarizing what you see, without any biases orrecommendations for next steps.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}The last command that was run is:```- {command}+ {{command}}```The output of the command is given hereby:```- {observation}+ {{observation}}```INSTRUCTIONS:You need to give a short summary of the output so that your team member who run this command and is solving the challenge will have insights on how to solve the challenge using your summary.- Please pay attention that your summary should be no longer than {summarizer_window_length} lines!\ No newline at end of file+ Please pay attention that your summary should be no longer than {{summarizer_window_length}} lines!\ No newline at end of filediff --git a/config/ctf/ctf_crypto_no_summarizer.yaml b/config/ctf/ctf_crypto_no_summarizer.yamlindex 00a848f5..9be970c9 100644--- a/config/ctf/ctf_crypto_no_summarizer.yaml+++ b/config/ctf/ctf_crypto_no_summarizer.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -66,35 +66,35 @@ instance_template: |-9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";- local interactive_session="${INTERACTIVE_SESSION:-n/a}";+ local interactive_session="${{INTERACTIVE_SESSION:-n/a}}";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -126,14 +126,14 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.Please consider using one of the interactive commands available to you in this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/crypto/katy.trajdiff --git a/config/ctf/ctf_crypto_simple_summarizer.yaml b/config/ctf/ctf_crypto_simple_summarizer.yamlindex a5a4c4c2..0d791df9 100644--- a/config/ctf/ctf_crypto_simple_summarizer.yaml+++ b/config/ctf/ctf_crypto_simple_summarizer.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -66,35 +66,35 @@ instance_template: |-9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";- local interactive_session="${INTERACTIVE_SESSION:-n/a}";+ local interactive_session="${{INTERACTIVE_SESSION:-n/a}}";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -126,14 +126,14 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.Please consider using one of the interactive commands available to you in this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/crypto/katy.trajdiff --git a/config/ctf/ctf_forensics.yaml b/config/ctf/ctf_forensics.yamlindex 40218f7c..0d481ae2 100644--- a/config/ctf/ctf_forensics.yaml+++ b/config/ctf/ctf_forensics.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -66,35 +66,35 @@ instance_template: |-9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";- local interactive_session="${INTERACTIVE_SESSION:-n/a}";+ local interactive_session="${{INTERACTIVE_SESSION:-n/a}}";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -126,14 +126,14 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.Please consider using one of the interactive commands available to you in this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/forensics/flash.traj@@ -144,26 +144,26 @@ summarizer_config:SETTING: You are a skilled cybersecurity professional and top CTF player.You are currently playing as part of a team in a CTF competition.- Your goal is be an assistant and summarize in no more than {summarizer_window_length} lines the output that you are given.+ Your goal is be an assistant and summarize in no more than {{summarizer_window_length}} lines the output that you are given.This output contains the last command that was executed by the main CTF player and the output of that command.- You should include less than {summarizer_window_length} lines in your summary, please make sure that your summary is helpful in the sense of helping+ You should include less than {{summarizer_window_length}} lines in your summary, please make sure that your summary is helpful in the sense of helpingyour team member to solve the challenge and get the flag. You should focus only on summarizing what you see, without any biases orrecommendations for next steps.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}The last command that was run is:```- {command}+ {{command}}```The output of the command is given hereby:```- {observation}+ {{observation}}```INSTRUCTIONS:You need to give a short summary of the output so that your team member who run this command and is solving the challenge will have insights on how to solve the challenge using your summary.- Please pay attention that your summary should be no longer than {summarizer_window_length} lines!\ No newline at end of file+ Please pay attention that your summary should be no longer than {{summarizer_window_length}} lines!\ No newline at end of filediff --git a/config/ctf/ctf_forensics_no_interactive.yaml b/config/ctf/ctf_forensics_no_interactive.yamlindex 275f510d..5ab7247f 100644--- a/config/ctf/ctf_forensics_no_interactive.yaml+++ b/config/ctf/ctf_forensics_no_interactive.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -66,31 +66,31 @@ instance_template: |-9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -119,13 +119,13 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/forensics/flash.traj@@ -136,26 +136,26 @@ summarizer_config:SETTING: You are a skilled cybersecurity professional and top CTF player.You are currently playing as part of a team in a CTF competition.- Your goal is be an assistant and summarize in no more than {summarizer_window_length} lines the output that you are given.+ Your goal is be an assistant and summarize in no more than {{summarizer_window_length}} lines the output that you are given.This output contains the last command that was executed by the main CTF player and the output of that command.- You should include less than {summarizer_window_length} lines in your summary, please make sure that your summary is helpful in the sense of helping+ You should include less than {{summarizer_window_length}} lines in your summary, please make sure that your summary is helpful in the sense of helpingyour team member to solve the challenge and get the flag. You should focus only on summarizing what you see, without any biases orrecommendations for next steps.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}The last command that was run is:```- {command}+ {{command}}```The output of the command is given hereby:```- {observation}+ {{observation}}```INSTRUCTIONS:You need to give a short summary of the output so that your team member who run this command and is solving the challenge will have insights on how to solve the challenge using your summary.- Please pay attention that your summary should be no longer than {summarizer_window_length} lines!\ No newline at end of file+ Please pay attention that your summary should be no longer than {{summarizer_window_length}} lines!\ No newline at end of filediff --git a/config/ctf/ctf_forensics_no_summarizer.yaml b/config/ctf/ctf_forensics_no_summarizer.yamlindex 0f9689a1..3e01e675 100644--- a/config/ctf/ctf_forensics_no_summarizer.yaml+++ b/config/ctf/ctf_forensics_no_summarizer.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -66,35 +66,35 @@ instance_template: |-9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";- local interactive_session="${INTERACTIVE_SESSION:-n/a}";+ local interactive_session="${{INTERACTIVE_SESSION:-n/a}}";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -126,14 +126,14 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.Please consider using one of the interactive commands available to you in this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/forensics/flash.traj\ No newline at end of filediff --git a/config/ctf/ctf_forensics_simple_summarizer.yaml b/config/ctf/ctf_forensics_simple_summarizer.yamlindex 221ce55b..c1525d79 100644--- a/config/ctf/ctf_forensics_simple_summarizer.yaml+++ b/config/ctf/ctf_forensics_simple_summarizer.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -66,35 +66,35 @@ instance_template: |-9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";- local interactive_session="${INTERACTIVE_SESSION:-n/a}";+ local interactive_session="${{INTERACTIVE_SESSION:-n/a}}";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -126,14 +126,14 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.Please consider using one of the interactive commands available to you in this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/forensics/flash.trajdiff --git a/config/ctf/ctf_lm_summarizer.yaml b/config/ctf/ctf_lm_summarizer.yamlindex a067f836..ef9d45bc 100644--- a/config/ctf/ctf_lm_summarizer.yaml+++ b/config/ctf/ctf_lm_summarizer.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -61,30 +61,30 @@ instance_template: |-7. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";if [ -z $CURRENT_FILE ]; then- echo '{"open_file": "n/a", "working_dir": "'$working_dir'"}';+ echo '{{"open_file": "n/a", "working_dir": "'$working_dir'"}}';else- echo '{"open_file": "'$(realpath $CURRENT_FILE)'", "working_dir": "'$working_dir'"}';+ echo '{{"open_file": "'$(realpath $CURRENT_FILE)'", "working_dir": "'$working_dir'"}}';fi- };+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -111,29 +111,29 @@ summarizer_config:SETTING: You are a skilled cybersecurity professional and top CTF player.You are currently playing as part of a team in a CTF competition.- Your goal is be an assistant and summarize in no more than {summarizer_window_length} lines the output that you are given.+ Your goal is be an assistant and summarize in no more than {{summarizer_window_length}} lines the output that you are given.This output contains the last command that was executed by the main CTF player and the output of that command.- You should include less than {summarizer_window_length} lines in your summary, please make sure that your summary is helpful in the sense of helping+ You should include less than {{summarizer_window_length}} lines in your summary, please make sure that your summary is helpful in the sense of helpingyour team member to solve the challenge and get the flag. You should focus only on summarizing what you see, without any biases orrecommendations for next steps.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}The last command that was run is:```- {command}+ {{command}}```The output of the command is given hereby:```- {observation}+ {{observation}}```INSTRUCTIONS:You need to give a short summary of the output so that your team member who run this command and is solving the challenge will have insights on how to solve the challenge using your summary.- Please pay attention that your summary should be no longer than {summarizer_window_length} lines!+ Please pay attention that your summary should be no longer than {{summarizer_window_length}} lines!model:model_name: azure:gpt4per_instance_cost_limit: 2diff --git a/config/ctf/ctf_misc.yaml b/config/ctf/ctf_misc.yamlindex 125f47f6..8cded9e8 100644--- a/config/ctf/ctf_misc.yaml+++ b/config/ctf/ctf_misc.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -66,35 +66,35 @@ instance_template: |-9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";- local interactive_session="${INTERACTIVE_SESSION:-n/a}";+ local interactive_session="${{INTERACTIVE_SESSION:-n/a}}";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -126,14 +126,14 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.Please consider using one of the interactive commands available to you in this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/misc/networking_1.traj@@ -144,26 +144,26 @@ summarizer_config:SETTING: You are a skilled cybersecurity professional and top CTF player.You are currently playing as part of a team in a CTF competition.- Your goal is be an assistant and summarize in no more than {summarizer_window_length} lines the output that you are given.+ Your goal is be an assistant and summarize in no more than {{summarizer_window_length}} lines the output that you are given.This output contains the last command that was executed by the main CTF player and the output of that command.- You should include less than {summarizer_window_length} lines in your summary, please make sure that your summary is helpful in the sense of helping+ You should include less than {{summarizer_window_length}} lines in your summary, please make sure that your summary is helpful in the sense of helpingyour team member to solve the challenge and get the flag. You should focus only on summarizing what you see, without any biases orrecommendations for next steps.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}The last command that was run is:```- {command}+ {{command}}```The output of the command is given hereby:```- {observation}+ {{observation}}```INSTRUCTIONS:You need to give a short summary of the output so that your team member who run this command and is solving the challenge will have insights on how to solve the challenge using your summary.- Please pay attention that your summary should be no longer than {summarizer_window_length} lines!\ No newline at end of file+ Please pay attention that your summary should be no longer than {{summarizer_window_length}} lines!\ No newline at end of filediff --git a/config/ctf/ctf_misc_no_interactive.yaml b/config/ctf/ctf_misc_no_interactive.yamlindex cd293052..4521dd83 100644--- a/config/ctf/ctf_misc_no_interactive.yaml+++ b/config/ctf/ctf_misc_no_interactive.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -66,31 +66,31 @@ instance_template: |-9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -119,13 +119,13 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/misc/networking_1.traj@@ -136,26 +136,26 @@ summarizer_config:SETTING: You are a skilled cybersecurity professional and top CTF player.You are currently playing as part of a team in a CTF competition.- Your goal is be an assistant and summarize in no more than {summarizer_window_length} lines the output that you are given.+ Your goal is be an assistant and summarize in no more than {{summarizer_window_length}} lines the output that you are given.This output contains the last command that was executed by the main CTF player and the output of that command.- You should include less than {summarizer_window_length} lines in your summary, please make sure that your summary is helpful in the sense of helping+ You should include less than {{summarizer_window_length}} lines in your summary, please make sure that your summary is helpful in the sense of helpingyour team member to solve the challenge and get the flag. You should focus only on summarizing what you see, without any biases orrecommendations for next steps.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}The last command that was run is:```- {command}+ {{command}}```The output of the command is given hereby:```- {observation}+ {{observation}}```INSTRUCTIONS:You need to give a short summary of the output so that your team member who run this command and is solving the challenge will have insights on how to solve the challenge using your summary.- Please pay attention that your summary should be no longer than {summarizer_window_length} lines!\ No newline at end of file+ Please pay attention that your summary should be no longer than {{summarizer_window_length}} lines!\ No newline at end of filediff --git a/config/ctf/ctf_misc_no_summarizer.yaml b/config/ctf/ctf_misc_no_summarizer.yamlindex 7e80b30a..9ff5bc4b 100644--- a/config/ctf/ctf_misc_no_summarizer.yaml+++ b/config/ctf/ctf_misc_no_summarizer.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -66,35 +66,35 @@ instance_template: |-9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";- local interactive_session="${INTERACTIVE_SESSION:-n/a}";+ local interactive_session="${{INTERACTIVE_SESSION:-n/a}}";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -126,14 +126,14 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.Please consider using one of the interactive commands available to you in this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/misc/networking_1.traj\ No newline at end of filediff --git a/config/ctf/ctf_misc_simple_summarizer.yaml b/config/ctf/ctf_misc_simple_summarizer.yamlindex 76c6f489..9a82451a 100644--- a/config/ctf/ctf_misc_simple_summarizer.yaml+++ b/config/ctf/ctf_misc_simple_summarizer.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -66,35 +66,35 @@ instance_template: |-9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";- local interactive_session="${INTERACTIVE_SESSION:-n/a}";+ local interactive_session="${{INTERACTIVE_SESSION:-n/a}}";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -126,14 +126,14 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.Please consider using one of the interactive commands available to you in this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/misc/networking_1.trajdiff --git a/config/ctf/ctf_no_demo.yaml b/config/ctf/ctf_no_demo.yamlindex c0ce79e7..25c1bed4 100644--- a/config/ctf/ctf_no_demo.yaml+++ b/config/ctf/ctf_no_demo.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -46,35 +46,35 @@ instance_template: |-NOTE ABOUT THE EDIT COMMAND: Indentation really matters! When editing a file, make sure to insert appropriate indentation before each line!- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";- local interactive_session="${INTERACTIVE_SESSION:-n/a}";+ local interactive_session="${{INTERACTIVE_SESSION:-n/a}}";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -106,5 +106,5 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.Please consider using one of the interactive commands available to you in this environment.diff --git a/config/ctf/ctf_pwn.yaml b/config/ctf/ctf_pwn.yamlindex 8ebdc9a3..f321a927 100644--- a/config/ctf/ctf_pwn.yaml+++ b/config/ctf/ctf_pwn.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -77,35 +77,35 @@ instance_template: |-5. The `debug_exec` command lets you execute arbitrary GDB commands - write proper GDB syntax and use it to analyze program state. Remember to quote the commands properly. For example, `debug_exec 'info registers'` will print all the registers, `debug_exec 'x/8wx $sp'` will print 8 words from the stack, `debug_exec 'x/20i $pc'` will print disassembly of the next 20 instructions.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";- local interactive_session="${INTERACTIVE_SESSION:-n/a}";+ local interactive_session="${{INTERACTIVE_SESSION:-n/a}}";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -137,14 +137,14 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.Please consider using one of the interactive commands available to you in this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/pwn/warmup.traj@@ -155,26 +155,26 @@ summarizer_config:SETTING: You are a skilled cybersecurity professional and top CTF player.You are currently playing as part of a team in a CTF competition.- Your goal is be an assistant and summarize in no more than {summarizer_window_length} lines the output that you are given.+ Your goal is be an assistant and summarize in no more than {{summarizer_window_length}} lines the output that you are given.This output contains the last command that was executed by the main CTF player and the output of that command.- You should include less than {summarizer_window_length} lines in your summary, please make sure that your summary is helpful in the sense of helping+ You should include less than {{summarizer_window_length}} lines in your summary, please make sure that your summary is helpful in the sense of helpingyour team member to solve the challenge and get the flag. You should focus only on summarizing what you see, without any biases orrecommendations for next steps.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}The last command that was run is:```- {command}+ {{command}}```The output of the command is given hereby:```- {observation}+ {{observation}}```INSTRUCTIONS:You need to give a short summary of the output so that your team member who run this command and is solving the challenge will have insights on how to solve the challenge using your summary.- Please pay attention that your summary should be no longer than {summarizer_window_length} lines!+ Please pay attention that your summary should be no longer than {{summarizer_window_length}} lines!diff --git a/config/ctf/ctf_pwn_no_interactive.yaml b/config/ctf/ctf_pwn_no_interactive.yamlindex 409b589b..64c697bc 100644--- a/config/ctf/ctf_pwn_no_interactive.yaml+++ b/config/ctf/ctf_pwn_no_interactive.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -66,31 +66,31 @@ instance_template: |-9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -119,13 +119,13 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/pwn/warmup.traj@@ -136,26 +136,26 @@ summarizer_config:SETTING: You are a skilled cybersecurity professional and top CTF player.You are currently playing as part of a team in a CTF competition.- Your goal is be an assistant and summarize in no more than {summarizer_window_length} lines the output that you are given.+ Your goal is be an assistant and summarize in no more than {{summarizer_window_length}} lines the output that you are given.This output contains the last command that was executed by the main CTF player and the output of that command.- You should include less than {summarizer_window_length} lines in your summary, please make sure that your summary is helpful in the sense of helping+ You should include less than {{summarizer_window_length}} lines in your summary, please make sure that your summary is helpful in the sense of helpingyour team member to solve the challenge and get the flag. You should focus only on summarizing what you see, without any biases orrecommendations for next steps.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}The last command that was run is:```- {command}+ {{command}}```The output of the command is given hereby:```- {observation}+ {{observation}}```INSTRUCTIONS:You need to give a short summary of the output so that your team member who run this command and is solving the challenge will have insights on how to solve the challenge using your summary.- Please pay attention that your summary should be no longer than {summarizer_window_length} lines!\ No newline at end of file+ Please pay attention that your summary should be no longer than {{summarizer_window_length}} lines!\ No newline at end of filediff --git a/config/ctf/ctf_pwn_no_summarizer.yaml b/config/ctf/ctf_pwn_no_summarizer.yamlindex f95d9017..ece8bee9 100644--- a/config/ctf/ctf_pwn_no_summarizer.yaml+++ b/config/ctf/ctf_pwn_no_summarizer.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -77,35 +77,35 @@ instance_template: |-5. The `debug_exec` command lets you execute arbitrary GDB commands - write proper GDB syntax and use it to analyze program state. Remember to quote the commands properly. For example, `debug_exec 'info registers'` will print all the registers, `debug_exec 'x/8wx $sp'` will print 8 words from the stack, `debug_exec 'x/20i $pc'` will print disassembly of the next 20 instructions.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";- local interactive_session="${INTERACTIVE_SESSION:-n/a}";+ local interactive_session="${{INTERACTIVE_SESSION:-n/a}}";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -137,14 +137,14 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.Please consider using one of the interactive commands available to you in this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/pwn/warmup.trajdiff --git a/config/ctf/ctf_pwn_simple_summarizer.yaml b/config/ctf/ctf_pwn_simple_summarizer.yamlindex 9660adbd..d44ea7aa 100644--- a/config/ctf/ctf_pwn_simple_summarizer.yaml+++ b/config/ctf/ctf_pwn_simple_summarizer.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -78,35 +78,35 @@ instance_template: |-5. The `debug_exec` command lets you execute arbitrary GDB commands - write proper GDB syntax and use it to analyze program state. Remember to quote the commands properly. For example, `debug_exec 'info registers'` will print all the registers, `debug_exec 'x/8wx $sp'` will print 8 words from the stack, `debug_exec 'x/20i $pc'` will print disassembly of the next 20 instructions.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";- local interactive_session="${INTERACTIVE_SESSION:-n/a}";+ local interactive_session="${{INTERACTIVE_SESSION:-n/a}}";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -138,14 +138,14 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.Please consider using one of the interactive commands available to you in this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/pwn/warmup.trajdiff --git a/config/ctf/ctf_rev.yaml b/config/ctf/ctf_rev.yamlindex 3aabe2c7..cf36f4b4 100644--- a/config/ctf/ctf_rev.yaml+++ b/config/ctf/ctf_rev.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -77,35 +77,35 @@ instance_template: |-5. The `debug_exec` command lets you execute arbitrary GDB commands - write proper GDB syntax and use it to analyze program state. Remember to quote the commands properly. For example, `debug_exec 'info registers'` will print all the registers, `debug_exec 'x/8wx $sp'` will print 8 words from the stack, `debug_exec 'x/20i $pc'` will print disassembly of the next 20 instructions.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";- local interactive_session="${INTERACTIVE_SESSION:-n/a}";+ local interactive_session="${{INTERACTIVE_SESSION:-n/a}}";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -137,14 +137,14 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.Please consider using one of the interactive commands available to you in this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/rev/rock.traj@@ -155,26 +155,26 @@ summarizer_config:SETTING: You are a skilled cybersecurity professional and top CTF player.You are currently playing as part of a team in a CTF competition.- Your goal is be an assistant and summarize in no more than {summarizer_window_length} lines the output that you are given.+ Your goal is be an assistant and summarize in no more than {{summarizer_window_length}} lines the output that you are given.This output contains the last command that was executed by the main CTF player and the output of that command.- You should include less than {summarizer_window_length} lines in your summary, please make sure that your summary is helpful in the sense of helping+ You should include less than {{summarizer_window_length}} lines in your summary, please make sure that your summary is helpful in the sense of helpingyour team member to solve the challenge and get the flag. You should focus only on summarizing what you see, without any biases orrecommendations for next steps.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}The last command that was run is:```- {command}+ {{command}}```The output of the command is given hereby:```- {observation}+ {{observation}}```INSTRUCTIONS:You need to give a short summary of the output so that your team member who run this command and is solving the challenge will have insights on how to solve the challenge using your summary.- Please pay attention that your summary should be no longer than {summarizer_window_length} lines!+ Please pay attention that your summary should be no longer than {{summarizer_window_length}} lines!diff --git a/config/ctf/ctf_rev_no_interactive.yaml b/config/ctf/ctf_rev_no_interactive.yamlindex b395c3c9..41c32e06 100644--- a/config/ctf/ctf_rev_no_interactive.yaml+++ b/config/ctf/ctf_rev_no_interactive.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -66,31 +66,31 @@ instance_template: |-9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -119,13 +119,13 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/rev/rock.traj@@ -136,26 +136,26 @@ summarizer_config:SETTING: You are a skilled cybersecurity professional and top CTF player.You are currently playing as part of a team in a CTF competition.- Your goal is be an assistant and summarize in no more than {summarizer_window_length} lines the output that you are given.+ Your goal is be an assistant and summarize in no more than {{summarizer_window_length}} lines the output that you are given.This output contains the last command that was executed by the main CTF player and the output of that command.- You should include less than {summarizer_window_length} lines in your summary, please make sure that your summary is helpful in the sense of helping+ You should include less than {{summarizer_window_length}} lines in your summary, please make sure that your summary is helpful in the sense of helpingyour team member to solve the challenge and get the flag. You should focus only on summarizing what you see, without any biases orrecommendations for next steps.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}The last command that was run is:```- {command}+ {{command}}```The output of the command is given hereby:```- {observation}+ {{observation}}```INSTRUCTIONS:You need to give a short summary of the output so that your team member who run this command and is solving the challenge will have insights on how to solve the challenge using your summary.- Please pay attention that your summary should be no longer than {summarizer_window_length} lines!\ No newline at end of file+ Please pay attention that your summary should be no longer than {{summarizer_window_length}} lines!\ No newline at end of filediff --git a/config/ctf/ctf_rev_no_summarizer.yaml b/config/ctf/ctf_rev_no_summarizer.yamlindex ebd89e89..5fac44a4 100644--- a/config/ctf/ctf_rev_no_summarizer.yaml+++ b/config/ctf/ctf_rev_no_summarizer.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -78,35 +78,35 @@ instance_template: |-5. The `debug_exec` command lets you execute arbitrary GDB commands - write proper GDB syntax and use it to analyze program state. Remember to quote the commands properly. For example, `debug_exec 'info registers'` will print all the registers, `debug_exec 'x/8wx $sp'` will print 8 words from the stack, `debug_exec 'x/20i $pc'` will print disassembly of the next 20 instructions.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";- local interactive_session="${INTERACTIVE_SESSION:-n/a}";+ local interactive_session="${{INTERACTIVE_SESSION:-n/a}}";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -138,14 +138,14 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.Please consider using one of the interactive commands available to you in this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/rev/rock.trajdiff --git a/config/ctf/ctf_rev_simple_summarizer.yaml b/config/ctf/ctf_rev_simple_summarizer.yamlindex 92ff03d2..65827e9a 100644--- a/config/ctf/ctf_rev_simple_summarizer.yaml+++ b/config/ctf/ctf_rev_simple_summarizer.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -77,35 +77,35 @@ instance_template: |-5. The `debug_exec` command lets you execute arbitrary GDB commands - write proper GDB syntax and use it to analyze program state. Remember to quote the commands properly. For example, `debug_exec 'info registers'` will print all the registers, `debug_exec 'x/8wx $sp'` will print 8 words from the stack, `debug_exec 'x/20i $pc'` will print disassembly of the next 20 instructions.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";- local interactive_session="${INTERACTIVE_SESSION:-n/a}";+ local interactive_session="${{INTERACTIVE_SESSION:-n/a}}";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -137,14 +137,14 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.Please consider using one of the interactive commands available to you in this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/rev/rock.trajdiff --git a/config/ctf/ctf_web.yaml b/config/ctf/ctf_web.yamlindex e354e2cf..b1ca59ba 100644--- a/config/ctf/ctf_web.yaml+++ b/config/ctf/ctf_web.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -66,35 +66,35 @@ instance_template: |-9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";- local interactive_session="${INTERACTIVE_SESSION:-n/a}";+ local interactive_session="${{INTERACTIVE_SESSION:-n/a}}";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -126,14 +126,14 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.Please consider using one of the interactive commands available to you in this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/web/i_got_id_demo.traj@@ -144,26 +144,26 @@ summarizer_config:SETTING: You are a skilled cybersecurity professional and top CTF player.You are currently playing as part of a team in a CTF competition.- Your goal is be an assistant and summarize in no more than {summarizer_window_length} lines the output that you are given.+ Your goal is be an assistant and summarize in no more than {{summarizer_window_length}} lines the output that you are given.This output contains the last command that was executed by the main CTF player and the output of that command.- You should include less than {summarizer_window_length} lines in your summary, please make sure that your summary is helpful in the sense of helping+ You should include less than {{summarizer_window_length}} lines in your summary, please make sure that your summary is helpful in the sense of helpingyour team member to solve the challenge and get the flag. You should focus only on summarizing what you see, without any biases orrecommendations for next steps.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}The last command that was run is:```- {command}+ {{command}}```The output of the command is given hereby:```- {observation}+ {{observation}}```INSTRUCTIONS:You need to give a short summary of the output so that your team member who run this command and is solving the challenge will have insights on how to solve the challenge using your summary.- Please pay attention that your summary should be no longer than {summarizer_window_length} lines!\ No newline at end of file+ Please pay attention that your summary should be no longer than {{summarizer_window_length}} lines!\ No newline at end of filediff --git a/config/ctf/ctf_web_no_interactive.yaml b/config/ctf/ctf_web_no_interactive.yamlindex a7af2895..7532d8fc 100644--- a/config/ctf/ctf_web_no_interactive.yaml+++ b/config/ctf/ctf_web_no_interactive.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -66,31 +66,31 @@ instance_template: |-9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -119,13 +119,13 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/web/i_got_id_demo.traj@@ -136,26 +136,26 @@ summarizer_config:SETTING: You are a skilled cybersecurity professional and top CTF player.You are currently playing as part of a team in a CTF competition.- Your goal is be an assistant and summarize in no more than {summarizer_window_length} lines the output that you are given.+ Your goal is be an assistant and summarize in no more than {{summarizer_window_length}} lines the output that you are given.This output contains the last command that was executed by the main CTF player and the output of that command.- You should include less than {summarizer_window_length} lines in your summary, please make sure that your summary is helpful in the sense of helping+ You should include less than {{summarizer_window_length}} lines in your summary, please make sure that your summary is helpful in the sense of helpingyour team member to solve the challenge and get the flag. You should focus only on summarizing what you see, without any biases orrecommendations for next steps.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}The last command that was run is:```- {command}+ {{command}}```The output of the command is given hereby:```- {observation}+ {{observation}}```INSTRUCTIONS:You need to give a short summary of the output so that your team member who run this command and is solving the challenge will have insights on how to solve the challenge using your summary.- Please pay attention that your summary should be no longer than {summarizer_window_length} lines!\ No newline at end of file+ Please pay attention that your summary should be no longer than {{summarizer_window_length}} lines!\ No newline at end of filediff --git a/config/ctf/ctf_web_no_summarizer.yaml b/config/ctf/ctf_web_no_summarizer.yamlindex e76b3d4c..d9aacafb 100644--- a/config/ctf/ctf_web_no_summarizer.yaml+++ b/config/ctf/ctf_web_no_summarizer.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -66,35 +66,35 @@ instance_template: |-9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";- local interactive_session="${INTERACTIVE_SESSION:-n/a}";+ local interactive_session="${{INTERACTIVE_SESSION:-n/a}}";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -126,14 +126,14 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.Please consider using one of the interactive commands available to you in this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/web/i_got_id_demo.traj\ No newline at end of filediff --git a/config/ctf/ctf_web_simple_summarizer.yaml b/config/ctf/ctf_web_simple_summarizer.yamlindex 3824e294..583aef5e 100644--- a/config/ctf/ctf_web_simple_summarizer.yaml+++ b/config/ctf/ctf_web_simple_summarizer.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -66,35 +66,35 @@ instance_template: |-9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";- local interactive_session="${INTERACTIVE_SESSION:-n/a}";+ local interactive_session="${{INTERACTIVE_SESSION:-n/a}}";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -126,14 +126,14 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.Please consider using one of the interactive commands available to you in this environment.demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/ctf/web/i_got_id_demo.trajdiff --git a/config/default.yaml b/config/default.yamlindex f6f6dc64..172a98dc 100644--- a/config/default.yaml+++ b/config/default.yaml@@ -3,11 +3,11 @@ agent:system_template: |-SETTING: You are an autonomous programmer, and you're working directly in the command line with a special interface.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,7 +31,7 @@ agent:instance_template: |-We're currently solving the following issue within our repository. Here's the issue text:ISSUE:- {problem_statement}+ {{problem_statement}}INSTRUCTIONS:Now, you're going to solve this issue on your own. Your terminal session has started and you're in the repository's root directory. You can use any bash commands or the special interface to help you. Edit all the files you need to and run any checks or tests that you want.@@ -61,25 +61,25 @@ agent:6. When editing files, it is easy to accidentally specify a wrong line number or to write code with incorrect indentation. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__default_sys-env_window100__t-0.20__p-0.95__c-2.00__install-1/marshmallow-code__marshmallow-1867.trajdiff --git a/config/default_ctf.yaml b/config/default_ctf.yamlindex 98ef0487..4f9e089f 100644--- a/config/default_ctf.yaml+++ b/config/default_ctf.yaml@@ -1,15 +1,15 @@system_template: |-SETTING: You are a skilled cybersecurity professional and top CTF player.- Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {flag_format}.+ Your goal is to solve the CTF challenge and find the flag. The flag format for this CTF is {{flag_format}}.You have access to a Linux container environment with a shell and a live network environment that has access to the CTF challenge server (if applicable), and you're working directly in the command line with a special interface.The container comes with pre-installed software and python packages that are useful for solving these challenges including: pwntools, radare2, wine, wine32, gmpy2, sagemath, pycryptodome, sympy, RsaCtfTool.py, tshark, sqlmap and nikto.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,11 +31,11 @@ system_template: |-You're free to use any other bash commands you want (e.g. find, grep, cat, ls, cd) in addition to the special commands listed above.However, the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.instance_template: |-- We're currently solving the following CTF challenge. The CTF challenge is a {category_friendly} problem named "{name}", worth {points} points. The description is:- {description}- Files included in the challenge: {files}+ We're currently solving the following CTF challenge. The CTF challenge is a {{category_friendly}} problem named "{{name}}", worth {{points}} points. The description is:+ {{description}}+ Files included in the challenge: {{files}}- {server_description}+ {{server_description}}INSTRUCTIONS:Now, you're going to solve this challenge on your own. Your terminal session has started and you're in the challenge's root directory. You can use any bash commands or the special interface to help you.@@ -66,35 +66,35 @@ instance_template: |-9. YOU CAN SOLVE THE CHALLENGES BY YOURSELF COMPLETELY - I TRUST IN YOU!- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})- (Interactive session: {interactive_session})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})+ (Interactive session: {{interactive_session}})bash-$state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";local open_file="n/a";- local interactive_session="${INTERACTIVE_SESSION:-n/a}";+ local interactive_session="${{INTERACTIVE_SESSION:-n/a}}";if [ ! -z $CURRENT_FILE ]; thenopen_file=$(realpath $CURRENT_FILE);fi- echo '{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}'- };+ echo '{{"open_file": "'$open_file'", "working_dir": "'$working_dir'", "interactive_session": "'$interactive_session'"}}'+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100@@ -125,5 +125,5 @@ blocklist:- nohup- gdbblocklist_error_template: |- Interactive operation '{name}' is not supported by this environment.+ Interactive operation '{{name}}' is not supported by this environment.Please consider using one of the interactive commands available to you in this environment.diff --git a/config/default_from_url.yaml b/config/default_from_url.yamlindex e43cbeba..bce7ab4d 100644--- a/config/default_from_url.yaml+++ b/config/default_from_url.yaml@@ -3,11 +3,11 @@ agent:system_template: |-SETTING: You are an autonomous programmer, and you're working directly in the command line with a special interface.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,7 +31,7 @@ agent:instance_template: |-We're currently solving the following issue within our repository. Here's the issue text:ISSUE:- {problem_statement}+ {{problem_statement}}INSTRUCTIONS:Now, you're going to solve this issue on your own. Your terminal session has started and you're in the repository's root directory. You can use any bash commands or the special interface to help you. Edit all the files you need to and run any checks or tests that you want.@@ -63,25 +63,25 @@ agent:7. It may be necessary to install the repository from source before you can run code. Please think about how to install the environment from the repository directory if you need to do so.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__default__t-0.20__p-0.95__c-2.00__install-1___install_from_source/marshmallow-code__marshmallow-1867.trajdiff --git a/config/default_xml.yaml b/config/default_xml.yamlindex ef75a894..c5546041 100644--- a/config/default_xml.yaml+++ b/config/default_xml.yaml@@ -3,11 +3,11 @@ agent:system_template: |-SETTING: You are an autonomous programmer, and you're working directly in the command line with a special interface.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -31,7 +31,7 @@ agent:instance_template: |-We're currently solving the following issue within our repository. Here's the issue text:ISSUE:- {problem_statement}+ {{problem_statement}}INSTRUCTIONS:Now, you're going to solve this issue on your own. Your terminal session has started and you're in the repository's root directory. You can use any bash commands or the special interface to help you. Edit all the files you need to and run any checks or tests that you want.@@ -61,18 +61,18 @@ agent:6. When editing files, it is easy to accidentally specify a wrong line number or to write code with incorrect indentation. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$demonstrations:- trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__xml_sys-env_window100__t-0.20__p-0.95__c-2.00__install-1/marshmallow-code__marshmallow-1867.trajdiff --git a/config/function_calling.yaml b/config/function_calling.yamlindex 0b622d26..bca7071f 100644--- a/config/function_calling.yaml+++ b/config/function_calling.yaml@@ -3,7 +3,7 @@ agent:system_template: |-SETTING: You are an autonomous programmer, and you're working directly in the command line with a special interface.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.@@ -24,7 +24,7 @@ agent:instance_template: |-We're currently solving the following issue within our repository. Here's the issue text:ISSUE:- {problem_statement}+ {{problem_statement}}INSTRUCTIONS:Now, you're going to solve this issue on your own. Your terminal session has started and you're in the repository's root directory. You can use any bash commands or the special interface to help you. Edit all the files you need to and run any checks or tests that you want.@@ -54,25 +54,25 @@ agent:6. When editing files, it is easy to accidentally specify a wrong line number or to write code with incorrect indentation. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__function_calling__install-1/marshmallow-code__marshmallow-1867.trajdiff --git a/config/function_calling_replace.yaml b/config/function_calling_replace.yamlindex 7335773f..e5057d35 100644--- a/config/function_calling_replace.yaml+++ b/config/function_calling_replace.yaml@@ -3,7 +3,7 @@ agent:system_template: |-SETTING: You are an autonomous programmer, and you're working directly in the command line with a special interface.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.@@ -24,7 +24,7 @@ agent:instance_template: |-We're currently solving the following issue within our repository. Here's the issue text:ISSUE:- {problem_statement}+ {{problem_statement}}INSTRUCTIONS:Now, you're going to solve this issue on your own. Your terminal session has started and you're in the repository's root directory. You can use any bash commands or the special interface to help you. Edit all the files you need to and run any checks or tests that you want.@@ -54,25 +54,25 @@ agent:6. When editing files, it is easy to accidentally specify a wrong line number or to write code with incorrect indentation. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---demonstrations:- trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__function_calling_replace__install-1/marshmallow-code__marshmallow-1867.trajdiff --git a/config/human_demo.yaml b/config/human_demo.yamlindex 58151f7d..5edaf1f6 100644--- a/config/human_demo.yaml+++ b/config/human_demo.yaml@@ -6,20 +6,20 @@ agent:instance_template: |-We're currently solving the following issue within our repository. Here's the issue text:ISSUE:- {problem_statement}+ {{problem_statement}}- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$tools:env_variables:diff --git a/config/swe_agent_ablations/default_sys-env_cursors_window100-detailed_cmd_format-full_history-1_demos.yaml b/config/swe_agent_ablations/default_sys-env_cursors_window100-detailed_cmd_format-full_history-1_demos.yamlindex 8d18dd5d..8f83b7ec 100644--- a/config/swe_agent_ablations/default_sys-env_cursors_window100-detailed_cmd_format-full_history-1_demos.yaml+++ b/config/swe_agent_ablations/default_sys-env_cursors_window100-detailed_cmd_format-full_history-1_demos.yaml@@ -2,11 +2,11 @@system_template: |-SETTING: You are an autonomous programmer, and you're working directly in the command line with a special interface.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -30,7 +30,7 @@ system_template: |-instance_template: |-We're currently solving the following issue within our repository. Here's the issue text:ISSUE:- {issue}+ {{issue}}INSTRUCTIONS:Now, you're going to solve this issue on your own. Your terminal session has started and you're in the repository's root directory. You can use any bash commands or the special interface to help you. Edit all the files you need to and run any checks or tests that you want.@@ -60,37 +60,37 @@ instance_template: |-6. When editing files, it is easy to accidentally specify a wrong line number or to write code with incorrect indentation. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";if [ -z "$CURRENT_FILE" ]; then- echo '{"open_file": "n/a", "working_dir": "'$working_dir'"}';+ echo '{{"open_file": "n/a", "working_dir": "'$working_dir'"}}';else- echo '{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}';+ echo '{{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}}';fi- };+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 200diff --git a/config/swe_agent_ablations/default_sys-env_cursors_window100-detailed_cmd_format-last_5_history-1_demos.yaml b/config/swe_agent_ablations/default_sys-env_cursors_window100-detailed_cmd_format-last_5_history-1_demos.yamlindex 3fadfaea..169a65c3 100644--- a/config/swe_agent_ablations/default_sys-env_cursors_window100-detailed_cmd_format-last_5_history-1_demos.yaml+++ b/config/swe_agent_ablations/default_sys-env_cursors_window100-detailed_cmd_format-last_5_history-1_demos.yaml@@ -2,11 +2,11 @@system_template: |-SETTING: You are an autonomous programmer, and you're working directly in the command line with a special interface.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -30,7 +30,7 @@ system_template: |-instance_template: |-We're currently solving the following issue within our repository. Here's the issue text:ISSUE:- {issue}+ {{issue}}INSTRUCTIONS:Now, you're going to solve this issue on your own. Your terminal session has started and you're in the repository's root directory. You can use any bash commands or the special interface to help you. Edit all the files you need to and run any checks or tests that you want.@@ -60,37 +60,37 @@ instance_template: |-6. When editing files, it is easy to accidentally specify a wrong line number or to write code with incorrect indentation. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";if [ -z "$CURRENT_FILE" ]; then- echo '{"open_file": "n/a", "working_dir": "'$working_dir'"}';+ echo '{{"open_file": "n/a", "working_dir": "'$working_dir'"}}';else- echo '{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}';+ echo '{{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}}';fi- };+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 200diff --git a/config/swe_agent_ablations/default_sys-env_window100-detailed_cmd_format-full_history-1_demos.yaml b/config/swe_agent_ablations/default_sys-env_window100-detailed_cmd_format-full_history-1_demos.yamlindex e44384aa..7aa63757 100644--- a/config/swe_agent_ablations/default_sys-env_window100-detailed_cmd_format-full_history-1_demos.yaml+++ b/config/swe_agent_ablations/default_sys-env_window100-detailed_cmd_format-full_history-1_demos.yaml@@ -1,11 +1,11 @@system_template: |-SETTING: You are an autonomous programmer, and you're working directly in the command line with a special interface.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -29,7 +29,7 @@ system_template: |-instance_template: |-We're currently solving the following issue within our repository. Here's the issue text:ISSUE:- {issue}+ {{issue}}INSTRUCTIONS:Now, you're going to solve this issue on your own. Your terminal session has started and you're in the repository's root directory. You can use any bash commands or the special interface to help you. Edit all the files you need to and run any checks or tests that you want.@@ -59,37 +59,37 @@ instance_template: |-6. When editing files, it is easy to accidentally specify a wrong line number or to write code with incorrect indentation. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";if [ -z "$CURRENT_FILE" ]; then- echo '{"open_file": "n/a", "working_dir": "'$working_dir'"}';+ echo '{{"open_file": "n/a", "working_dir": "'$working_dir'"}}';else- echo '{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}';+ echo '{{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}}';fi- };+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100diff --git a/config/swe_agent_ablations/default_sys-env_window100-detailed_cmd_format-last_5_history-1_demos.yaml b/config/swe_agent_ablations/default_sys-env_window100-detailed_cmd_format-last_5_history-1_demos.yamlindex 1dcc6e1c..66c87334 100644--- a/config/swe_agent_ablations/default_sys-env_window100-detailed_cmd_format-last_5_history-1_demos.yaml+++ b/config/swe_agent_ablations/default_sys-env_window100-detailed_cmd_format-last_5_history-1_demos.yaml@@ -1,11 +1,11 @@system_template: |-SETTING: You are an autonomous programmer, and you're working directly in the command line with a special interface.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -29,7 +29,7 @@ system_template: |-instance_template: |-We're currently solving the following issue within our repository. Here's the issue text:ISSUE:- {issue}+ {{issue}}INSTRUCTIONS:Now, you're going to solve this issue on your own. Your terminal session has started and you're in the repository's root directory. You can use any bash commands or the special interface to help you. Edit all the files you need to and run any checks or tests that you want.@@ -59,37 +59,37 @@ instance_template: |-6. When editing files, it is easy to accidentally specify a wrong line number or to write code with incorrect indentation. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$demonstration_template: |Here is a demonstration of how to correctly accomplish this task.It is included to show you how to correctly use the interface.You do not need to follow exactly what is done in the demonstration.--- DEMONSTRATION ---- {demonstration}+ {{demonstration}}--- END OF DEMONSTRATION ---state_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";if [ -z "$CURRENT_FILE" ]; then- echo '{"open_file": "n/a", "working_dir": "'$working_dir'"}';+ echo '{{"open_file": "n/a", "working_dir": "'$working_dir'"}}';else- echo '{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}';+ echo '{{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}}';fi- };+ }};parse_function: ThoughtActionParserenv_variables:WINDOW: 100diff --git a/config/swe_agent_ablations/xml_sys-env_cursors_window100-detailed_cmd_format-full_history-1_demos.yaml b/config/swe_agent_ablations/xml_sys-env_cursors_window100-detailed_cmd_format-full_history-1_demos.yamlindex 9a60e23e..c6c94848 100644--- a/config/swe_agent_ablations/xml_sys-env_cursors_window100-detailed_cmd_format-full_history-1_demos.yaml+++ b/config/swe_agent_ablations/xml_sys-env_cursors_window100-detailed_cmd_format-full_history-1_demos.yaml@@ -2,11 +2,11 @@system_template: |-SETTING: You are an autonomous programmer, and you're working directly in the command line with a special interface.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -30,7 +30,7 @@ system_template: |-instance_template: |-We're currently solving the following issue within our repository. Here's the issue text:ISSUE:- {issue}+ {{issue}}INSTRUCTIONS:Now, you're going to solve this issue on your own. Your terminal session has started and you're in the repository's root directory. You can use any bash commands or the special interface to help you. Edit all the files you need to and run any checks or tests that you want.@@ -60,31 +60,31 @@ instance_template: |-6. When editing files, it is easy to accidentally specify a wrong line number or to write code with incorrect indentation. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$put_demos_in_history: truestate_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";if [ -z "$CURRENT_FILE" ]; then- echo '{"open_file": "n/a", "working_dir": "'$working_dir'"}';+ echo '{{"open_file": "n/a", "working_dir": "'$working_dir'"}}';else- echo '{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}';+ echo '{{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}}';fi- };+ }};parse_function: XMLThoughtActionParserenv_variables:WINDOW: 200diff --git a/config/swe_agent_ablations/xml_sys-env_cursors_window100-detailed_cmd_format-last_5_history-1_demos.yaml b/config/swe_agent_ablations/xml_sys-env_cursors_window100-detailed_cmd_format-last_5_history-1_demos.yamlindex f039c93c..b39b809e 100644--- a/config/swe_agent_ablations/xml_sys-env_cursors_window100-detailed_cmd_format-last_5_history-1_demos.yaml+++ b/config/swe_agent_ablations/xml_sys-env_cursors_window100-detailed_cmd_format-last_5_history-1_demos.yaml@@ -2,11 +2,11 @@system_template: |-SETTING: You are an autonomous programmer, and you're working directly in the command line with a special interface.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -30,7 +30,7 @@ system_template: |-instance_template: |-We're currently solving the following issue within our repository. Here's the issue text:ISSUE:- {issue}+ {{issue}}INSTRUCTIONS:Now, you're going to solve this issue on your own. Your terminal session has started and you're in the repository's root directory. You can use any bash commands or the special interface to help you. Edit all the files you need to and run any checks or tests that you want.@@ -60,31 +60,31 @@ instance_template: |-6. When editing files, it is easy to accidentally specify a wrong line number or to write code with incorrect indentation. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$put_demos_in_history: truestate_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";if [ -z "$CURRENT_FILE" ]; then- echo '{"open_file": "n/a", "working_dir": "'$working_dir'"}';+ echo '{{"open_file": "n/a", "working_dir": "'$working_dir'"}}';else- echo '{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}';+ echo '{{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}}';fi- };+ }};parse_function: XMLThoughtActionParserenv_variables:WINDOW: 200diff --git a/config/swe_agent_ablations/xml_sys-env_window100-detailed_cmd_format-full_history-1_demos.yaml b/config/swe_agent_ablations/xml_sys-env_window100-detailed_cmd_format-full_history-1_demos.yamlindex 549b30d6..42e2a6a4 100644--- a/config/swe_agent_ablations/xml_sys-env_window100-detailed_cmd_format-full_history-1_demos.yaml+++ b/config/swe_agent_ablations/xml_sys-env_window100-detailed_cmd_format-full_history-1_demos.yaml@@ -1,11 +1,11 @@system_template: |-SETTING: You are an autonomous programmer, and you're working directly in the command line with a special interface.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -29,7 +29,7 @@ system_template: |-instance_template: |-We're currently solving the following issue within our repository. Here's the issue text:ISSUE:- {issue}+ {{issue}}INSTRUCTIONS:Now, you're going to solve this issue on your own. Your terminal session has started and you're in the repository's root directory. You can use any bash commands or the special interface to help you. Edit all the files you need to and run any checks or tests that you want.@@ -59,31 +59,31 @@ instance_template: |-6. When editing files, it is easy to accidentally specify a wrong line number or to write code with incorrect indentation. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$put_demos_in_history: truestate_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";if [ -z "$CURRENT_FILE" ]; then- echo '{"open_file": "n/a", "working_dir": "'$working_dir'"}';+ echo '{{"open_file": "n/a", "working_dir": "'$working_dir'"}}';else- echo '{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}';+ echo '{{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}}';fi- };+ }};parse_function: XMLThoughtActionParserenv_variables:WINDOW: 100diff --git a/config/swe_agent_ablations/xml_sys-env_window100-detailed_cmd_format-last_5_history-1_demos.yaml b/config/swe_agent_ablations/xml_sys-env_window100-detailed_cmd_format-last_5_history-1_demos.yamlindex 4b135132..4eb4dc2c 100644--- a/config/swe_agent_ablations/xml_sys-env_window100-detailed_cmd_format-last_5_history-1_demos.yaml+++ b/config/swe_agent_ablations/xml_sys-env_window100-detailed_cmd_format-last_5_history-1_demos.yaml@@ -1,11 +1,11 @@system_template: |-SETTING: You are an autonomous programmer, and you're working directly in the command line with a special interface.- The special interface consists of a file editor that shows you {WINDOW} lines of a file at a time.+ The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.In addition to typical bash commands, you can also use the following commands to help you navigate and edit files.COMMANDS:- {command_docs}+ {{command_docs}}Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.If you'd like to add the line ' print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.@@ -29,7 +29,7 @@ system_template: |-instance_template: |-We're currently solving the following issue within our repository. Here's the issue text:ISSUE:- {issue}+ {{issue}}INSTRUCTIONS:Now, you're going to solve this issue on your own. Your terminal session has started and you're in the repository's root directory. You can use any bash commands or the special interface to help you. Edit all the files you need to and run any checks or tests that you want.@@ -59,31 +59,31 @@ instance_template: |-6. When editing files, it is easy to accidentally specify a wrong line number or to write code with incorrect indentation. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_template: |-- {observation}- (Open file: {open_file})- (Current directory: {working_dir})+ {{observation}}+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Open file: {open_file})- (Current directory: {working_dir})+ (Open file: {{open_file}})+ (Current directory: {{working_dir}})bash-$put_demos_in_history: truestate_command:name: statecode: |- state() {+ state() {{local working_dir="$PWD";if [ -z "$CURRENT_FILE" ]; then- echo '{"open_file": "n/a", "working_dir": "'$working_dir'"}';+ echo '{{"open_file": "n/a", "working_dir": "'$working_dir'"}}';else- echo '{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}';+ echo '{{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}}';fi- };+ }};parse_function: XMLThoughtActionParserenv_variables:WINDOW: 100diff --git a/sweagent/agent/agents.py b/sweagent/agent/agents.pyindex e2999d90..0ec3cf20 100644--- a/sweagent/agent/agents.py+++ b/sweagent/agent/agents.py@@ -7,6 +7,7 @@ from collections import defaultdictfrom pathlib import Pathfrom typing import Any+from jinja2 import Templatefrom pydantic import BaseModel, ConfigDict, Fieldfrom simple_parsing.helpers.fields import fieldfrom swerex.exceptions import BashIncorrectSyntaxError, CommandTimeoutError, SweRexception@@ -288,7 +289,7 @@ class Agent:def add_system_message_to_history(self) -> None:"""Add system message to history"""assert self._problem_statement is not None- system_msg = self.templates.system_template.format(**self._get_format_dict())+ system_msg = Template(self.templates.system_template).render(**self._get_format_dict())self.logger.info(f"SYSTEM ({self.name})\n{system_msg}")self._append_history({"role": "system", "content": system_msg, "agent": self.name})@@ -321,7 +322,7 @@ class Agent:demo_history = [entry for entry in demo_history if entry["role"] != "system"]demo_message = "\n".join([entry["content"] for entry in demo_history])assert self.templates.demonstration_template is not None- demonstration = self.templates.demonstration_template.format(demonstration=demo_message)+ demonstration = Template(self.templates.demonstration_template).render(demonstration=demo_message)self._append_history({"agent": self.name,@@ -366,7 +367,7 @@ class Agent:format_dict = self._get_format_dict(**kwargs)for template in templates:try:- messages.append(template.format(**format_dict))+ messages.append(Template(template).render(**format_dict))except KeyError:self.logger.debug("The following keys are available: %s", format_dict.keys())raise@@ -476,7 +477,7 @@ class Agent:model output after requery"""format_dict = {**kwargs, **self._get_format_dict()}- error_template = error_template.format(**format_dict)+ error_template = Template(error_template).render(**format_dict)self.logger.warning(f"{error_template}")@@ -581,7 +582,7 @@ class Agent:except Exception as f:self.logger.exception("Failed to interrupt session after command timeout: %s", f, exc_info=True)raise- step.observation = self.templates.command_cancelled_timeout_template.format(+ step.observation = Template(self.templates.command_cancelled_timeout_template).render(**self._get_format_dict(),timeout=self.tools.config.execution_timeout,command=run_action,