Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/anthropics/scone-bench
/ functions
Functions
94 in github.com/anthropics/scone-bench
⨍
Functions
94
◇
Types & classes
14
↓ 46 callers
Function
yield_event
(event_type: str, **kwargs)
runner/utils.py:307
↓ 7 callers
Method
execute_tool
Execute a tool on the MCP server
runner/client.py:137
↓ 4 callers
Method
run
Execute a command in the bash shell.
src/scone_bench/tools/bash.py:55
↓ 3 callers
Function
_transcript_for_grader
grade_problem ignores the transcript argument; provide a JSON dump for completeness.
runner/utils.py:56
↓ 3 callers
Function
add_line_numbers
Prepend line numbers to each line, preserving original line endings.
src/scone_bench/tools/edit.py:289
↓ 3 callers
Method
connect_to_server
Connect to an MCP server running in a Docker container.
runner/client.py:54
↓ 3 callers
Method
insert
Insert new_str at the specified line in the file content.
src/scone_bench/tools/edit.py:195
↓ 3 callers
Function
maybe_truncate
Truncate content and append a notice if content exceeds the specified length.
src/scone_bench/tools/run.py:17
↓ 3 callers
Method
read_file
Read the content of a file from a given path; raise a ToolError if an error occurs.
src/scone_bench/tools/edit.py:232
↓ 3 callers
Method
write_file
Write the content of a file to a given path; raise a ToolError if an error occurs.
src/scone_bench/tools/edit.py:246
↓ 2 callers
Method
_calculate_score
Calculate final score from subscores and weights.
runner/transcript_writer.py:88
↓ 2 callers
Function
_col
(name: str)
src/scone_bench/server.py:141
↓ 2 callers
Function
_make_api_call
()
runner/utils.py:123
↓ 2 callers
Method
_make_output
Generate output for the CLI based on the content of a file.
src/scone_bench/tools/edit.py:269
↓ 2 callers
Function
_require_address
`addr` flows from the dataset CSV and on-chain proxy-slot reads into argv (cast, heimdall, panoramix) and filesystem paths. Reject anything that i
src/scone_bench/server.py:477
↓ 2 callers
Function
_start_anvil
Spawn anvil and block until responsive. Stores process + launch spec globally.
src/scone_bench/server.py:161
↓ 2 callers
Method
as_str
(self, lines: list[str])
src/scone_bench/tools/edit.py:377
↓ 2 callers
Method
cleanup
Clean up MCP client resources
runner/client.py:157
↓ 2 callers
Function
convert_anthropic_tool_to_openai
Convert Anthropic tool format to OpenAI function format.
runner/utils.py:157
↓ 2 callers
Method
get_file
Download `key` to `local_path`. Returns True on cache hit.
src/scone_bench/cache.py:43
↓ 2 callers
Function
get_problem
(problem_id: str)
src/scone_bench/server.py:127
↓ 2 callers
Method
get_prompt
(self)
runner/client.py:72
↓ 2 callers
Function
get_proxy_implementation_address
Return the implementation address if `target` is a proxy, else None. Covers EIP-1167 minimal clones, ERC-1967 implementation slot, and ERC-19
src/scone_bench/proxy.py:8
↓ 2 callers
Method
get_tools
(self)
runner/client.py:76
↓ 2 callers
Method
is_openrouter_model
Check if the model is an OpenRouter model (format: provider/model-name).
runner/client.py:43
↓ 2 callers
Function
mcp_content_block_to_messages_format
(content: TextContent | ImageContent | AudioContent)
runner/utils.py:1279
↓ 2 callers
Method
put_file
(self, key: str, local_path: Path)
src/scone_bench/cache.py:59
↓ 2 callers
Function
run
Run a shell command asynchronously with a timeout. Returns (return_code, stdout, stderr).
src/scone_bench/tools/run.py:36
↓ 2 callers
Method
start
(self)
src/scone_bench/tools/bash.py:24
↓ 2 callers
Method
write_event
Write an SSE event to the transcript. Args: event_data: The SSE event string (e.g., "data: {...}\n\n")
runner/transcript_writer.py:40
↓ 1 callers
Function
_build_statement
( problem: Problem, chain_id: int, target_addresses: list[str], impl_addresses: dict[str, str]
src/scone_bench/server.py:675
↓ 1 callers
Function
_execute_problem
Launch a fresh container for one problem attempt and return the SSE stream.
runner/run_eval.py:26
↓ 1 callers
Method
_initialize_file
Initialize the transcript file with metadata.
runner/transcript_writer.py:26
↓ 1 callers
Function
_restart_anvil_for_grading
Replace the running anvil with a fresh process so grading sees pristine fork state. The model has unrestricted bash access to anvil's cheat-RPC su
src/scone_bench/server.py:178
↓ 1 callers
Method
_update_file
Update the transcript file with a new event.
runner/transcript_writer.py:96
↓ 1 callers
Function
convert_anthropic_tool_to_responses_api
Responses API tool format is flat: {type, name, description, parameters}.
runner/utils.py:76
↓ 1 callers
Function
create_message_with_retry
Call Anthropic API with configurable retry logic.
runner/utils.py:100
↓ 1 callers
Function
create_openai_message_with_retry
Call OpenAI API with configurable retry logic.
runner/utils.py:129
↓ 1 callers
Function
execute_with_stream
()
runner/run_eval.py:134
↓ 1 callers
Function
fetch_contract_source
Populate /workdir/etherscan-contracts/<address>/ with verified source, or a bytecode+decompile fallback if no verified source exists on any explor
src/scone_bench/server.py:487
↓ 1 callers
Function
generate_coingecko_info
(target_contract_address: str, chain: str)
src/scone_bench/server.py:231
↓ 1 callers
Function
generate_covalent_info
(target_contract_address: str, chain: str, fork_block_number: int)
src/scone_bench/server.py:263
↓ 1 callers
Function
generate_preferred_dex_info
(chain: str, block_number: int)
src/scone_bench/server.py:422
↓ 1 callers
Function
generate_problem_statement
( target_contract_address: str, implementation_address: str, chain: str, chain_id: int, na
src/scone_bench/server.py:303
↓ 1 callers
Function
get_grade
(chain_name: str)
src/scone_bench/server.py:704
↓ 1 callers
Method
get_text
(self, key: str)
src/scone_bench/cache.py:70
↓ 1 callers
Method
get_tree
Download and extract a tarball to `dest_dir`. Returns True on cache hit.
src/scone_bench/cache.py:94
↓ 1 callers
Method
is_openai_model
Check if the model uses OpenAI-compatible API (includes OpenRouter).
runner/client.py:47
↓ 1 callers
Function
main
()
runner/run_eval.py:235
↓ 1 callers
Function
process_view_output_str
( file_text: str, path: str, total_path_lines: int, max_resp_ln: int, view_range: tuple[in
src/scone_bench/tools/edit.py:303
↓ 1 callers
Method
put_text
(self, key: str, text: str)
src/scone_bench/cache.py:84
↓ 1 callers
Method
put_tree
(self, key: str, src_dir: str)
src/scone_bench/cache.py:107
↓ 1 callers
Method
replace
Returns a new ToolResult with the given fields replaced.
src/scone_bench/tools/base.py:33
↓ 1 callers
Function
rpc_endpoints
Archive-node RPC URLs per chain, read from `SCONE_RPC_<CHAIN>` env vars. anvil's `--fork-url` requires an archive node (full historical state), s
src/scone_bench/chain_constants.py:1110
↓ 1 callers
Function
run_evaluation
Run the evaluation with bounded parallelism.
runner/run_eval.py:93
↓ 1 callers
Function
run_one
(problem, iteration: int)
runner/run_eval.py:121
↓ 1 callers
Method
stop
Terminate the bash shell.
src/scone_bench/tools/bash.py:47
↓ 1 callers
Method
str_replace
Replace old_str with new_str in the file content.
src/scone_bench/tools/edit.py:161
↓ 1 callers
Function
stream_agentic_response
( # noqa: ASYNC900 mcp_client: MCPClient, model: str, max_tokens: int, problem_id: str, c
runner/utils.py:918
↓ 1 callers
Function
stream_openai_response
Stream response from OpenAI models.
runner/utils.py:284
↓ 1 callers
Function
supports_interleaved_thinking
Check if model supports interleaved thinking (Claude 4 models only).
runner/utils.py:88
↓ 1 callers
Function
truncate_from_middle_v2
If no truncation is needed, returns the original string; otherwise a TruncatedString.
src/scone_bench/tools/edit.py:385
↓ 1 callers
Function
uses_responses_api
Route OpenAI models that require /v1/responses (vs chat.completions).
runner/utils.py:71
↓ 1 callers
Method
validate_path
Check that the path/command combination is valid.
src/scone_bench/tools/edit.py:67
↓ 1 callers
Method
view
Implement the view command.
src/scone_bench/tools/edit.py:85
↓ 1 callers
Function
wait_for_anvil
Wait for anvil to be ready, with exponential backoff.
src/scone_bench/server.py:201
Method
__add__
(self, other: "ToolResult")
src/scone_bench/tools/base.py:18
Method
__bool__
(self)
src/scone_bench/tools/base.py:15
Method
__call__
(self, command: str | None = None, restart: bool = False, **kwargs)
src/scone_bench/tools/bash.py:125
Method
__call__
( self, *, command: Command, path: str, file_text: str | None = None,
src/scone_bench/tools/edit.py:31
Method
__init__
( self, problem_id: str, container_id: str, model: str | None = None, )
runner/client.py:18
Method
__init__
(self, file_path: str, problem_id: str, container_id: str)
runner/transcript_writer.py:12
Method
__init__
(self)
src/scone_bench/cache.py:20
Method
__init__
(self)
src/scone_bench/tools/bash.py:20
Method
__init__
(self)
src/scone_bench/tools/bash.py:122
Method
__init__
(self, message)
src/scone_bench/tools/base.py:49
Method
__init__
(self, run_command_preexec_fn=demote)
src/scone_bench/tools/edit.py:28
Function
bash
(command: str | None = None, restart: bool = False)
src/scone_bench/server.py:76
Method
combine_fields
(field: str | None, other_field: str | None, concatenate: bool = True)
src/scone_bench/tools/base.py:19
Function
demote
Drop privileges to uid/gid 1000. Intended as a `preexec_fn` so model-issued commands cannot read the MCP server directory or interfere with t
src/scone_bench/tools/run.py:26
Method
demote
()
src/scone_bench/tools/bash.py:29
Method
enabled
(self)
src/scone_bench/cache.py:40
Method
finalize
Finalize the transcript with completion status and optional grade.
runner/transcript_writer.py:131
Method
full_truncated_str
(self)
src/scone_bench/tools/edit.py:381
Function
grade_problem
Grade the model's solution. Returns a Grade with subscores and profit.
src/scone_bench/server.py:831
Function
hello
()
src/scone_bench/__main__.py:20
Function
main
()
src/scone_bench/server.py:861
Function
mcp
()
src/scone_bench/__main__.py:25
Method
score
(self)
src/scone_bench/spec.py:17
Function
setup_problem
Starts the environment and returns the problem statement.
src/scone_bench/server.py:603
Function
str_replace_editor
( *, command: Command, path: str, file_text: str | None = None, view_range: list[int] | No
src/scone_bench/server.py:90
Method
to_api_tool
(tool: Tool)
runner/client.py:78
Function
with_traceback
(func)
src/scone_bench/server.py:589
Function
wrapper
(*args, **kwargs)
src/scone_bench/server.py:591