MCPcopy Create free account

hub / github.com/anthropics/scone-bench / functions

Functions94 in github.com/anthropics/scone-bench

↓ 46 callersFunctionyield_event
(event_type: str, **kwargs)
runner/utils.py:307
↓ 7 callersMethodexecute_tool
Execute a tool on the MCP server
runner/client.py:137
↓ 4 callersMethodrun
Execute a command in the bash shell.
src/scone_bench/tools/bash.py:55
↓ 3 callersFunction_transcript_for_grader
grade_problem ignores the transcript argument; provide a JSON dump for completeness.
runner/utils.py:56
↓ 3 callersFunctionadd_line_numbers
Prepend line numbers to each line, preserving original line endings.
src/scone_bench/tools/edit.py:289
↓ 3 callersMethodconnect_to_server
Connect to an MCP server running in a Docker container.
runner/client.py:54
↓ 3 callersMethodinsert
Insert new_str at the specified line in the file content.
src/scone_bench/tools/edit.py:195
↓ 3 callersFunctionmaybe_truncate
Truncate content and append a notice if content exceeds the specified length.
src/scone_bench/tools/run.py:17
↓ 3 callersMethodread_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 callersMethodwrite_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 callersMethod_calculate_score
Calculate final score from subscores and weights.
runner/transcript_writer.py:88
↓ 2 callersFunction_col
(name: str)
src/scone_bench/server.py:141
↓ 2 callersFunction_make_api_call
()
runner/utils.py:123
↓ 2 callersMethod_make_output
Generate output for the CLI based on the content of a file.
src/scone_bench/tools/edit.py:269
↓ 2 callersFunction_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 callersFunction_start_anvil
Spawn anvil and block until responsive. Stores process + launch spec globally.
src/scone_bench/server.py:161
↓ 2 callersMethodas_str
(self, lines: list[str])
src/scone_bench/tools/edit.py:377
↓ 2 callersMethodcleanup
Clean up MCP client resources
runner/client.py:157
↓ 2 callersFunctionconvert_anthropic_tool_to_openai
Convert Anthropic tool format to OpenAI function format.
runner/utils.py:157
↓ 2 callersMethodget_file
Download `key` to `local_path`. Returns True on cache hit.
src/scone_bench/cache.py:43
↓ 2 callersFunctionget_problem
(problem_id: str)
src/scone_bench/server.py:127
↓ 2 callersMethodget_prompt
(self)
runner/client.py:72
↓ 2 callersFunctionget_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 callersMethodget_tools
(self)
runner/client.py:76
↓ 2 callersMethodis_openrouter_model
Check if the model is an OpenRouter model (format: provider/model-name).
runner/client.py:43
↓ 2 callersFunctionmcp_content_block_to_messages_format
(content: TextContent | ImageContent | AudioContent)
runner/utils.py:1279
↓ 2 callersMethodput_file
(self, key: str, local_path: Path)
src/scone_bench/cache.py:59
↓ 2 callersFunctionrun
Run a shell command asynchronously with a timeout. Returns (return_code, stdout, stderr).
src/scone_bench/tools/run.py:36
↓ 2 callersMethodstart
(self)
src/scone_bench/tools/bash.py:24
↓ 2 callersMethodwrite_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 callersFunction_build_statement
( problem: Problem, chain_id: int, target_addresses: list[str], impl_addresses: dict[str, str]
src/scone_bench/server.py:675
↓ 1 callersFunction_execute_problem
Launch a fresh container for one problem attempt and return the SSE stream.
runner/run_eval.py:26
↓ 1 callersMethod_initialize_file
Initialize the transcript file with metadata.
runner/transcript_writer.py:26
↓ 1 callersFunction_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 callersMethod_update_file
Update the transcript file with a new event.
runner/transcript_writer.py:96
↓ 1 callersFunctionconvert_anthropic_tool_to_responses_api
Responses API tool format is flat: {type, name, description, parameters}.
runner/utils.py:76
↓ 1 callersFunctioncreate_message_with_retry
Call Anthropic API with configurable retry logic.
runner/utils.py:100
↓ 1 callersFunctioncreate_openai_message_with_retry
Call OpenAI API with configurable retry logic.
runner/utils.py:129
↓ 1 callersFunctionexecute_with_stream
()
runner/run_eval.py:134
↓ 1 callersFunctionfetch_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 callersFunctiongenerate_coingecko_info
(target_contract_address: str, chain: str)
src/scone_bench/server.py:231
↓ 1 callersFunctiongenerate_covalent_info
(target_contract_address: str, chain: str, fork_block_number: int)
src/scone_bench/server.py:263
↓ 1 callersFunctiongenerate_preferred_dex_info
(chain: str, block_number: int)
src/scone_bench/server.py:422
↓ 1 callersFunctiongenerate_problem_statement
( target_contract_address: str, implementation_address: str, chain: str, chain_id: int, na
src/scone_bench/server.py:303
↓ 1 callersFunctionget_grade
(chain_name: str)
src/scone_bench/server.py:704
↓ 1 callersMethodget_text
(self, key: str)
src/scone_bench/cache.py:70
↓ 1 callersMethodget_tree
Download and extract a tarball to `dest_dir`. Returns True on cache hit.
src/scone_bench/cache.py:94
↓ 1 callersMethodis_openai_model
Check if the model uses OpenAI-compatible API (includes OpenRouter).
runner/client.py:47
↓ 1 callersFunctionmain
()
runner/run_eval.py:235
↓ 1 callersFunctionprocess_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 callersMethodput_text
(self, key: str, text: str)
src/scone_bench/cache.py:84
↓ 1 callersMethodput_tree
(self, key: str, src_dir: str)
src/scone_bench/cache.py:107
↓ 1 callersMethodreplace
Returns a new ToolResult with the given fields replaced.
src/scone_bench/tools/base.py:33
↓ 1 callersFunctionrpc_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 callersFunctionrun_evaluation
Run the evaluation with bounded parallelism.
runner/run_eval.py:93
↓ 1 callersFunctionrun_one
(problem, iteration: int)
runner/run_eval.py:121
↓ 1 callersMethodstop
Terminate the bash shell.
src/scone_bench/tools/bash.py:47
↓ 1 callersMethodstr_replace
Replace old_str with new_str in the file content.
src/scone_bench/tools/edit.py:161
↓ 1 callersFunctionstream_agentic_response
( # noqa: ASYNC900 mcp_client: MCPClient, model: str, max_tokens: int, problem_id: str, c
runner/utils.py:918
↓ 1 callersFunctionstream_openai_response
Stream response from OpenAI models.
runner/utils.py:284
↓ 1 callersFunctionsupports_interleaved_thinking
Check if model supports interleaved thinking (Claude 4 models only).
runner/utils.py:88
↓ 1 callersFunctiontruncate_from_middle_v2
If no truncation is needed, returns the original string; otherwise a TruncatedString.
src/scone_bench/tools/edit.py:385
↓ 1 callersFunctionuses_responses_api
Route OpenAI models that require /v1/responses (vs chat.completions).
runner/utils.py:71
↓ 1 callersMethodvalidate_path
Check that the path/command combination is valid.
src/scone_bench/tools/edit.py:67
↓ 1 callersMethodview
Implement the view command.
src/scone_bench/tools/edit.py:85
↓ 1 callersFunctionwait_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
Functionbash
(command: str | None = None, restart: bool = False)
src/scone_bench/server.py:76
Methodcombine_fields
(field: str | None, other_field: str | None, concatenate: bool = True)
src/scone_bench/tools/base.py:19
Functiondemote
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
Methoddemote
()
src/scone_bench/tools/bash.py:29
Methodenabled
(self)
src/scone_bench/cache.py:40
Methodfinalize
Finalize the transcript with completion status and optional grade.
runner/transcript_writer.py:131
Methodfull_truncated_str
(self)
src/scone_bench/tools/edit.py:381
Functiongrade_problem
Grade the model's solution. Returns a Grade with subscores and profit.
src/scone_bench/server.py:831
Functionhello
()
src/scone_bench/__main__.py:20
Functionmain
()
src/scone_bench/server.py:861
Functionmcp
()
src/scone_bench/__main__.py:25
Methodscore
(self)
src/scone_bench/spec.py:17
Functionsetup_problem
Starts the environment and returns the problem statement.
src/scone_bench/server.py:603
Functionstr_replace_editor
( *, command: Command, path: str, file_text: str | None = None, view_range: list[int] | No
src/scone_bench/server.py:90
Methodto_api_tool
(tool: Tool)
runner/client.py:78
Functionwith_traceback
(func)
src/scone_bench/server.py:589
Functionwrapper
(*args, **kwargs)
src/scone_bench/server.py:591