├── hf_space ├── sandbox │ ├── __init__.py │ ├── sandbox_state.py │ └── constants.py ├── e2b_sandbox_template │ ├── gradio_app │ │ └── main.py │ ├── pygame_app │ │ └── main.py │ ├── react_app │ │ ├── src │ │ │ ├── App.css │ │ │ ├── vite-env.d.ts │ │ │ ├── index.css │ │ │ ├── App.tsx │ │ │ └── main.tsx │ │ ├── postcss.config.js │ │ ├── tsconfig.json │ │ ├── vite.config.ts │ │ ├── tailwind.config.js │ │ ├── .gitignore │ │ ├── index.html │ │ ├── tsconfig.node.json │ │ ├── tsconfig.app.json │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── public │ │ │ └── vite.svg │ │ └── README.md │ ├── streamlit_app │ │ └── main.py │ ├── vue_app │ │ ├── env.d.ts │ │ ├── src │ │ │ ├── index.css │ │ │ ├── views │ │ │ │ ├── HomeView.vue │ │ │ │ └── AboutView.vue │ │ │ ├── assets │ │ │ │ ├── logo.svg │ │ │ │ └── base.css │ │ │ ├── components │ │ │ │ ├── icons │ │ │ │ │ ├── IconSupport.vue │ │ │ │ │ ├── IconTooling.vue │ │ │ │ │ ├── IconCommunity.vue │ │ │ │ │ ├── IconDocumentation.vue │ │ │ │ │ └── IconEcosystem.vue │ │ │ │ ├── HelloWorld.vue │ │ │ │ ├── WelcomeItem.vue │ │ │ │ └── TheWelcome.vue │ │ │ ├── main.ts │ │ │ ├── App.vue │ │ │ └── router │ │ │ │ └── index.ts │ │ ├── postcss.config.js │ │ ├── public │ │ │ └── favicon.ico │ │ ├── tsconfig.json │ │ ├── tailwind.config.js │ │ ├── tsconfig.app.json │ │ ├── index.html │ │ ├── .gitignore │ │ ├── tsconfig.node.json │ │ ├── vite.config.ts │ │ ├── package.json │ │ └── README.md │ ├── .dockerignore │ ├── container_app │ │ ├── src │ │ │ ├── vite-env.d.ts │ │ │ └── main.tsx │ │ ├── tsconfig.json │ │ ├── vite.config.ts │ │ ├── .gitignore │ │ ├── tsconfig.node.json │ │ ├── index.html │ │ ├── tsconfig.app.json │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── public │ │ │ └── vite.svg │ │ └── README.md │ ├── README.md │ ├── package.json │ ├── node_modules │ │ ├── openapi-typescript-helpers │ │ │ ├── index.cjs │ │ │ ├── index.js │ │ │ ├── tsconfig.json │ │ │ ├── README.md │ │ │ ├── LICENSE │ │ │ ├── package.json │ │ │ ├── CHANGELOG.md │ │ │ └── index.d.ts │ │ ├── openapi-fetch │ │ │ ├── biome.json │ │ │ ├── tsconfig.json │ │ │ ├── scripts │ │ │ │ └── generate-types.js │ │ │ ├── LICENSE │ │ │ ├── package.json │ │ │ └── README.md │ │ ├── compare-versions │ │ │ ├── src │ │ │ │ ├── index.ts │ │ │ │ ├── compareVersions.ts │ │ │ │ ├── validate.ts │ │ │ │ ├── utils.ts │ │ │ │ ├── compare.ts │ │ │ │ └── satisfies.ts │ │ │ ├── LICENSE │ │ │ ├── package.json │ │ │ └── README.md │ │ ├── e2b │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── package.json │ │ ├── @e2b │ │ │ └── code-interpreter │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ └── package.json │ │ ├── platform │ │ │ ├── package.json │ │ │ ├── LICENSE │ │ │ └── README.md │ │ ├── @connectrpc │ │ │ ├── connect-web │ │ │ │ ├── README.md │ │ │ │ └── package.json │ │ │ └── connect │ │ │ │ ├── package.json │ │ │ │ └── README.md │ │ ├── @bufbuild │ │ │ └── protobuf │ │ │ │ ├── README.md │ │ │ │ └── package.json │ │ └── .package-lock.json │ ├── html_app │ │ └── index.html │ ├── e2b.toml │ ├── get_top_pypi.py │ ├── nginx │ │ └── nginx.conf │ ├── top_pypi_packages.txt │ ├── package-lock.json │ └── e2b.Dockerfile ├── README.md └── requirements.txt ├── autocodearena ├── sandbox │ └── __init__.py ├── e2b_sandbox_template │ ├── gradio_app │ │ └── main.py │ ├── pygame_app │ │ └── main.py │ ├── react_app │ │ ├── src │ │ │ ├── App.css │ │ │ ├── vite-env.d.ts │ │ │ ├── index.css │ │ │ ├── App.tsx │ │ │ └── main.tsx │ │ ├── postcss.config.js │ │ ├── tsconfig.json │ │ ├── vite.config.ts │ │ ├── tailwind.config.js │ │ ├── .gitignore │ │ ├── index.html │ │ ├── tsconfig.node.json │ │ ├── tsconfig.app.json │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── public │ │ │ └── vite.svg │ │ └── README.md │ ├── streamlit_app │ │ └── main.py │ ├── vue_app │ │ ├── env.d.ts │ │ ├── src │ │ │ ├── index.css │ │ │ ├── views │ │ │ │ ├── HomeView.vue │ │ │ │ └── AboutView.vue │ │ │ ├── assets │ │ │ │ ├── logo.svg │ │ │ │ └── base.css │ │ │ ├── components │ │ │ │ ├── icons │ │ │ │ │ ├── IconSupport.vue │ │ │ │ │ ├── IconTooling.vue │ │ │ │ │ ├── IconCommunity.vue │ │ │ │ │ ├── IconDocumentation.vue │ │ │ │ │ └── IconEcosystem.vue │ │ │ │ ├── HelloWorld.vue │ │ │ │ ├── WelcomeItem.vue │ │ │ │ └── TheWelcome.vue │ │ │ ├── main.ts │ │ │ ├── App.vue │ │ │ └── router │ │ │ │ └── index.ts │ │ ├── postcss.config.js │ │ ├── public │ │ │ └── favicon.ico │ │ ├── tsconfig.json │ │ ├── tailwind.config.js │ │ ├── tsconfig.app.json │ │ ├── index.html │ │ ├── .gitignore │ │ ├── tsconfig.node.json │ │ ├── vite.config.ts │ │ ├── package.json │ │ └── README.md │ ├── .dockerignore │ ├── container_app │ │ ├── src │ │ │ ├── vite-env.d.ts │ │ │ └── main.tsx │ │ ├── tsconfig.json │ │ ├── vite.config.ts │ │ ├── .gitignore │ │ ├── tsconfig.node.json │ │ ├── index.html │ │ ├── tsconfig.app.json │ │ ├── eslint.config.js │ │ ├── package.json │ │ ├── public │ │ │ └── vite.svg │ │ └── README.md │ ├── README.md │ ├── html_app │ │ └── index.html │ ├── e2b.toml │ ├── get_top_pypi.py │ ├── nginx │ │ └── nginx.conf │ ├── top_pypi_packages.txt │ └── e2b.Dockerfile ├── requirements.txt ├── config │ ├── gen_answer_config.yaml │ └── autocodearena.yaml ├── install_docker_sandbox.sh └── utils │ └── bedrock_utils.py └── bigcodereward ├── requirements.txt ├── config ├── bigcodereward.yaml └── judge_model_config.yaml └── prompts ├── judge_prompt_unified_no_output.md └── judge_prompt_unified.md /hf_space/sandbox/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /autocodearena/sandbox/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/gradio_app/main.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/pygame_app/main.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/gradio_app/main.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/pygame_app/main.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/react_app/src/App.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/streamlit_app/main.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/react_app/src/App.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/streamlit_app/main.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/.dockerignore: -------------------------------------------------------------------------------- 1 | **/node_modules 2 | .venv 3 | .git 4 | __pycache__ 5 | *.pyc -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/container_app/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/react_app/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/.dockerignore: -------------------------------------------------------------------------------- 1 | **/node_modules 2 | .venv 3 | .git 4 | __pycache__ 5 | *.pyc -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/container_app/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/react_app/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/README.md: -------------------------------------------------------------------------------- 1 | # Sandbox Template 2 | 3 | This is the folder for the sandbox template. 4 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/src/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/README.md: -------------------------------------------------------------------------------- 1 | # Sandbox Template 2 | 3 | This is the folder for the sandbox template. 4 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/src/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/react_app/src/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/react_app/src/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@e2b/code-interpreter": "^2.0.0" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/react_app/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/react_app/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigcode-project/bigcodearena/HEAD/hf_space/e2b_sandbox_template/vue_app/public/favicon.ico -------------------------------------------------------------------------------- /bigcodereward/requirements.txt: -------------------------------------------------------------------------------- 1 | numpy>=1.21.0 2 | pandas>=1.3.0 3 | scikit-learn>=1.0.0 4 | tqdm>=4.62.0 5 | scipy>=1.7.0 6 | matplotlib>=3.5.0 7 | seaborn>=0.11.0 8 | datasets>=2.0.0 -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigcode-project/bigcodearena/HEAD/autocodearena/e2b_sandbox_template/vue_app/public/favicon.ico -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/openapi-typescript-helpers/index.cjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Stub file to allow importing from the root of the package. 3 | */ 4 | module.exports = null; 5 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/openapi-typescript-helpers/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Stub file to allow importing from the root of the package. 3 | */ 4 | export default null; 5 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/react_app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { "path": "./tsconfig.app.json" }, 5 | { "path": "./tsconfig.node.json" } 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/react_app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { "path": "./tsconfig.app.json" }, 5 | { "path": "./tsconfig.node.json" } 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/container_app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { "path": "./tsconfig.app.json" }, 5 | { "path": "./tsconfig.node.json" } 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/container_app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { "path": "./tsconfig.app.json" }, 5 | { "path": "./tsconfig.node.json" } 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/openapi-typescript-helpers/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "rootDir": ".", 5 | "skipLibCheck": false 6 | }, 7 | "include": ["."] 8 | } 9 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { 5 | "path": "./tsconfig.node.json" 6 | }, 7 | { 8 | "path": "./tsconfig.app.json" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { 5 | "path": "./tsconfig.node.json" 6 | }, 7 | { 8 | "path": "./tsconfig.app.json" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/react_app/src/App.tsx: -------------------------------------------------------------------------------- 1 | const Inner = () => { 2 | return ( 3 |
4 |

React App

5 | This is a placeholder for the React app. 6 |
7 | ); 8 | }; 9 | 10 | export default Inner; -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/react_app/src/App.tsx: -------------------------------------------------------------------------------- 1 | const Inner = () => { 2 | return ( 3 |
4 |

React App

5 | This is a placeholder for the React app. 6 |
7 | ); 8 | }; 9 | 10 | export default Inner; -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/src/views/HomeView.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/src/views/HomeView.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/container_app/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | base: '/container/', 7 | plugins: [react()] 8 | }) -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/react_app/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | base: '/react/', 7 | plugins: [react()] 8 | }) 9 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/container_app/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | base: '/container/', 7 | plugins: [react()] 8 | }) -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/react_app/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | base: '/react/', 7 | plugins: [react()] 8 | }) 9 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | purge: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | } 9 | 10 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | purge: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | } 9 | 10 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/openapi-fetch/biome.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://biomejs.dev/schemas/1.7.0/schema.json", 3 | "extends": ["../../biome.json"], 4 | "files": { 5 | "include": ["./src/", "./test/"], 6 | "ignore": ["**/fixtures/**/*"] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/react_app/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: [ 4 | "./index.html", 5 | "./src/**/*.{js,ts,jsx,tsx}", 6 | ], 7 | theme: { 8 | extend: {}, 9 | }, 10 | plugins: [], 11 | } 12 | 13 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/react_app/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: [ 4 | "./index.html", 5 | "./src/**/*.{js,ts,jsx,tsx}", 6 | ], 7 | theme: { 8 | extend: {}, 9 | }, 10 | plugins: [], 11 | } 12 | 13 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/container_app/src/main.tsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from 'react' 2 | import { createRoot } from 'react-dom/client' 3 | import App from './App.tsx' 4 | 5 | createRoot(document.getElementById('root')!).render( 6 | 7 | 8 | , 9 | ) 10 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/container_app/src/main.tsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from 'react' 2 | import { createRoot } from 'react-dom/client' 3 | import App from './App.tsx' 4 | 5 | createRoot(document.getElementById('root')!).render( 6 | 7 | 8 | , 9 | ) 10 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/openapi-typescript-helpers/README.md: -------------------------------------------------------------------------------- 1 | # openapi-typescript-helpers 2 | 3 | Helper utilities that power `openapi-fetch` but are generically-available for any project. 4 | 5 | This package isn’t as well-documented as the others, so it’s a bit “use at your own discretion.” 6 | -------------------------------------------------------------------------------- /autocodearena/requirements.txt: -------------------------------------------------------------------------------- 1 | # Core dependencies 2 | gradio>=4.0.0 3 | pyyaml>=6.0 4 | requests>=2.28.0 5 | boto3>=1.26.0 6 | openai>=1.0.0 7 | tqdm>=4.64.0 8 | datasets>=2.14.0 9 | huggingface-hub>=0.17.0 10 | 11 | # Screenshot and execution dependencies 12 | playwright>=1.40.0 13 | psutil>=5.8.0 14 | uv>=0.8.0 -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/compare-versions/src/index.ts: -------------------------------------------------------------------------------- 1 | export { compare } from './compare.js'; 2 | export { compareVersions } from './compareVersions.js'; 3 | export { satisfies } from './satisfies.js'; 4 | export { CompareOperator } from './utils.js'; 5 | export { validate, validateStrict } from './validate.js'; 6 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/src/views/AboutView.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/src/views/AboutView.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /hf_space/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: BigCodeArena 3 | emoji: 🚀 4 | colorFrom: pink 5 | colorTo: yellow 6 | python_version: 3.12.10 7 | sdk: gradio 8 | sdk_version: 5.44.1 9 | app_file: app.py 10 | pinned: false 11 | license: apache-2.0 12 | --- 13 | 14 | Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference 15 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/react_app/src/main.tsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from 'react' 2 | import { createRoot } from 'react-dom/client' 3 | import './index.css' 4 | import App from './App.tsx' 5 | 6 | createRoot(document.getElementById('root')!).render( 7 | 8 |
9 | 10 |
11 |
, 12 | ) -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/react_app/src/main.tsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from 'react' 2 | import { createRoot } from 'react-dom/client' 3 | import './index.css' 4 | import App from './App.tsx' 5 | 6 | createRoot(document.getElementById('root')!).render( 7 | 8 |
9 | 10 |
11 |
, 12 | ) -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/src/main.ts: -------------------------------------------------------------------------------- 1 | import './index.css' // import css for tailwind 2 | 3 | import { createApp, h } from 'vue' 4 | import App from './App.vue' 5 | // import router from './router' 6 | 7 | const app = createApp({ 8 | render: () => h('div', { class: 'w-full h-full p-0 m-0' }, [h(App)]) 9 | }) 10 | 11 | // app.use(router) 12 | 13 | app.mount('#app') 14 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/src/main.ts: -------------------------------------------------------------------------------- 1 | import './index.css' // import css for tailwind 2 | 3 | import { createApp, h } from 'vue' 4 | import App from './App.vue' 5 | // import router from './router' 6 | 7 | const app = createApp({ 8 | render: () => h('div', { class: 'w-full h-full p-0 m-0' }, [h(App)]) 9 | }) 10 | 11 | // app.use(router) 12 | 13 | app.mount('#app') 14 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.dom.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], 4 | "exclude": ["src/**/__tests__/*"], 5 | "compilerOptions": { 6 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", 7 | 8 | "paths": { 9 | "@/*": ["./src/*"] 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.dom.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], 4 | "exclude": ["src/**/__tests__/*"], 5 | "compilerOptions": { 6 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", 7 | 8 | "paths": { 9 | "@/*": ["./src/*"] 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/container_app/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/html_app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | HTML App Placeholder 7 | 8 | 9 |
10 |

HTML App

11 | This is a placeholder for the HTML app. 12 |
13 | 14 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/react_app/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/container_app/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/html_app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | HTML App Placeholder 7 | 8 | 9 |
10 |

HTML App

11 | This is a placeholder for the HTML app. 12 |
13 | 14 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/react_app/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/react_app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React + TS 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/react_app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React + TS 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/src/App.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/src/App.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | coverage 15 | *.local 16 | 17 | /cypress/videos/ 18 | /cypress/screenshots/ 19 | 20 | # Editor directories and files 21 | .vscode/* 22 | !.vscode/extensions.json 23 | .idea 24 | *.suo 25 | *.ntvs* 26 | *.njsproj 27 | *.sln 28 | *.sw? 29 | 30 | *.tsbuildinfo 31 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | coverage 15 | *.local 16 | 17 | /cypress/videos/ 18 | /cypress/screenshots/ 19 | 20 | # Editor directories and files 21 | .vscode/* 22 | !.vscode/extensions.json 23 | .idea 24 | *.suo 25 | *.ntvs* 26 | *.njsproj 27 | *.sln 28 | *.sw? 29 | 30 | *.tsbuildinfo 31 | -------------------------------------------------------------------------------- /hf_space/requirements.txt: -------------------------------------------------------------------------------- 1 | # Core dependencies for BigCodeArena 2 | gradio 3 | gradio-sandboxcomponent 4 | requests 5 | openai 6 | boto3 7 | PyYAML 8 | tqdm 9 | shortuuid 10 | Pillow 11 | pytest 12 | black 13 | flake8 14 | tree-sitter 15 | tree-sitter-javascript 16 | tree-sitter-java 17 | tree-sitter-python 18 | tree-sitter-go 19 | tree-sitter-rust 20 | tree-sitter-php 21 | tree-sitter-typescript 22 | tree-sitter-c 23 | e2b-code-interpreter 24 | azure-storage-blob 25 | huggingface_hub 26 | datasets 27 | scikit-learn -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node22/tsconfig.json", 3 | "include": [ 4 | "vite.config.*", 5 | "vitest.config.*", 6 | "cypress.config.*", 7 | "nightwatch.conf.*", 8 | "playwright.config.*" 9 | ], 10 | "compilerOptions": { 11 | "noEmit": true, 12 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", 13 | 14 | "module": "ESNext", 15 | "moduleResolution": "Bundler", 16 | "types": ["node"] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node22/tsconfig.json", 3 | "include": [ 4 | "vite.config.*", 5 | "vitest.config.*", 6 | "cypress.config.*", 7 | "nightwatch.conf.*", 8 | "playwright.config.*" 9 | ], 10 | "compilerOptions": { 11 | "noEmit": true, 12 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", 13 | 14 | "module": "ESNext", 15 | "moduleResolution": "Bundler", 16 | "types": ["node"] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from 'node:url' 2 | 3 | import { defineConfig } from 'vite' 4 | import vue from '@vitejs/plugin-vue' 5 | import vueJsx from '@vitejs/plugin-vue-jsx' 6 | import vueDevTools from 'vite-plugin-vue-devtools' 7 | 8 | // https://vite.dev/config/ 9 | export default defineConfig({ 10 | base: '/vue/', 11 | plugins: [ 12 | vue(), 13 | vueJsx(), 14 | vueDevTools(), 15 | ], 16 | resolve: { 17 | alias: { 18 | '@': fileURLToPath(new URL('./src', import.meta.url)) 19 | }, 20 | }, 21 | }) 22 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/openapi-fetch/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowSyntheticDefaultImports": true, 4 | "declaration": true, 5 | "downlevelIteration": false, 6 | "esModuleInterop": true, 7 | "lib": ["ESNext", "DOM"], 8 | "module": "ESNext", 9 | "moduleResolution": "Bundler", 10 | "noUncheckedIndexedAccess": true, 11 | "outDir": "dist", 12 | "skipLibCheck": false, 13 | "strict": true, 14 | "target": "ESNext", 15 | "types": ["vitest/globals"] 16 | }, 17 | "include": ["src", "test"], 18 | "exclude": ["examples", "node_modules"] 19 | } 20 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from 'node:url' 2 | 3 | import { defineConfig } from 'vite' 4 | import vue from '@vitejs/plugin-vue' 5 | import vueJsx from '@vitejs/plugin-vue-jsx' 6 | import vueDevTools from 'vite-plugin-vue-devtools' 7 | 8 | // https://vite.dev/config/ 9 | export default defineConfig({ 10 | base: './', // Use relative paths for assets to work in both local and remote environments 11 | plugins: [ 12 | vue(), 13 | vueJsx(), 14 | vueDevTools(), 15 | ], 16 | resolve: { 17 | alias: { 18 | '@': fileURLToPath(new URL('./src', import.meta.url)) 19 | }, 20 | }, 21 | }) 22 | -------------------------------------------------------------------------------- /autocodearena/config/gen_answer_config.yaml: -------------------------------------------------------------------------------- 1 | bench_name: autocodearena 2 | 3 | # a list of model to generate answers 4 | model_list: 5 | - gpt-4o-mini-2024-07-18 6 | # - gpt-4o-2024-11-20 7 | # - claude35_sonnet 8 | # - claude35_haiku 9 | # - gemini-2.5-pro 10 | # - gemini-2.5-flash 11 | # - qwen3-coder 12 | # - claude37_sonnet 13 | # - gpt-oss-120b 14 | # - gpt-oss-20b 15 | # - deepseek-chat-v3-0324 16 | # - glm-4.5 17 | # - gpt-4.1-2025-04-14 18 | # - kimi-k2 19 | # - o4-mini-2025-04-16 20 | # - o3-mini-2025-01-31 21 | # - deepseek-r1-0528 22 | # - gpt-5-2025-08-07 23 | # - claude-4-sonnet 24 | # - claude-4-opus 25 | # - deepseek-chat-v3.1 26 | # - grok-code -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/e2b.toml: -------------------------------------------------------------------------------- 1 | # This is a config for E2B sandbox template. 2 | # You can use template ID (bxq9sha9l55ytsyfturr) to create a sandbox: 3 | 4 | # Python SDK 5 | # from e2b import Sandbox, AsyncSandbox 6 | # sandbox = Sandbox("bxq9sha9l55ytsyfturr") # Sync sandbox 7 | # sandbox = await AsyncSandbox.create("bxq9sha9l55ytsyfturr") # Async sandbox 8 | 9 | # JS SDK 10 | # import { Sandbox } from 'e2b' 11 | # const sandbox = await Sandbox.create('bxq9sha9l55ytsyfturr') 12 | 13 | team_id = "42ca5fd5-471c-4eef-ae14-c061bf58ce5a" 14 | memory_mb = 8_192 15 | cpu_count = 8 16 | start_cmd = "/root/.jupyter/start-up.sh" 17 | dockerfile = "e2b.Dockerfile" 18 | template_id = "bxq9sha9l55ytsyfturr" 19 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/e2b.toml: -------------------------------------------------------------------------------- 1 | # This is a config for E2B sandbox template. 2 | # You can use template ID (bxq9sha9l55ytsyfturr) to create a sandbox: 3 | 4 | # Python SDK 5 | # from e2b import Sandbox, AsyncSandbox 6 | # sandbox = Sandbox("bxq9sha9l55ytsyfturr") # Sync sandbox 7 | # sandbox = await AsyncSandbox.create("bxq9sha9l55ytsyfturr") # Async sandbox 8 | 9 | # JS SDK 10 | # import { Sandbox } from 'e2b' 11 | # const sandbox = await Sandbox.create('bxq9sha9l55ytsyfturr') 12 | 13 | team_id = "42ca5fd5-471c-4eef-ae14-c061bf58ce5a" 14 | memory_mb = 5_120 15 | cpu_count = 2 16 | start_cmd = "/root/.jupyter/start-up.sh" 17 | dockerfile = "e2b.Dockerfile" 18 | template_id = "bxq9sha9l55ytsyfturr" 19 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/src/router/index.ts: -------------------------------------------------------------------------------- 1 | import { createRouter, createWebHistory } from 'vue-router' 2 | import HomeView from '../views/HomeView.vue' 3 | 4 | const router = createRouter({ 5 | history: createWebHistory(import.meta.env.BASE_URL), 6 | routes: [ 7 | { 8 | path: '/', 9 | name: 'home', 10 | component: HomeView, 11 | }, 12 | { 13 | path: '/about', 14 | name: 'about', 15 | // route level code-splitting 16 | // this generates a separate chunk (About.[hash].js) for this route 17 | // which is lazy-loaded when the route is visited. 18 | component: () => import('../views/AboutView.vue'), 19 | }, 20 | ], 21 | }) 22 | 23 | export default router 24 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/src/router/index.ts: -------------------------------------------------------------------------------- 1 | import { createRouter, createWebHistory } from 'vue-router' 2 | import HomeView from '../views/HomeView.vue' 3 | 4 | const router = createRouter({ 5 | history: createWebHistory(import.meta.env.BASE_URL), 6 | routes: [ 7 | { 8 | path: '/', 9 | name: 'home', 10 | component: HomeView, 11 | }, 12 | { 13 | path: '/about', 14 | name: 'about', 15 | // route level code-splitting 16 | // this generates a separate chunk (About.[hash].js) for this route 17 | // which is lazy-loaded when the route is visited. 18 | component: () => import('../views/AboutView.vue'), 19 | }, 20 | ], 21 | }) 22 | 23 | export default router 24 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/react_app/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", 4 | "target": "ES2022", 5 | "lib": ["ES2023"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "isolatedModules": true, 13 | "moduleDetection": "force", 14 | "noEmit": true, 15 | 16 | /* Linting */ 17 | "strict": true, 18 | "noUnusedLocals": true, 19 | "noUnusedParameters": true, 20 | "noFallthroughCasesInSwitch": true, 21 | "noUncheckedSideEffectImports": true 22 | }, 23 | "include": ["vite.config.ts"] 24 | } 25 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/react_app/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", 4 | "target": "ES2022", 5 | "lib": ["ES2023"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "isolatedModules": true, 13 | "moduleDetection": "force", 14 | "noEmit": true, 15 | 16 | /* Linting */ 17 | "strict": true, 18 | "noUnusedLocals": true, 19 | "noUnusedParameters": true, 20 | "noFallthroughCasesInSwitch": true, 21 | "noUncheckedSideEffectImports": true 22 | }, 23 | "include": ["vite.config.ts"] 24 | } 25 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/container_app/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", 4 | "target": "ES2022", 5 | "lib": ["ES2023"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "isolatedModules": true, 13 | "moduleDetection": "force", 14 | "noEmit": true, 15 | 16 | /* Linting */ 17 | "strict": true, 18 | "noUnusedLocals": true, 19 | "noUnusedParameters": true, 20 | "noFallthroughCasesInSwitch": true, 21 | "noUncheckedSideEffectImports": true 22 | }, 23 | "include": ["vite.config.ts"] 24 | } 25 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/container_app/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", 4 | "target": "ES2022", 5 | "lib": ["ES2023"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "isolatedModules": true, 13 | "moduleDetection": "force", 14 | "noEmit": true, 15 | 16 | /* Linting */ 17 | "strict": true, 18 | "noUnusedLocals": true, 19 | "noUnusedParameters": true, 20 | "noFallthroughCasesInSwitch": true, 21 | "noUncheckedSideEffectImports": true 22 | }, 23 | "include": ["vite.config.ts"] 24 | } 25 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/openapi-fetch/scripts/generate-types.js: -------------------------------------------------------------------------------- 1 | import { execa } from "execa"; 2 | import { fileURLToPath } from "node:url"; 3 | 4 | const root = new URL("../", import.meta.url); 5 | 6 | const SCHEMA = "./test/fixtures/api.yaml"; 7 | const V6_OUTPUT = "./test/fixtures/api.d.ts"; 8 | const V7_OUTPUT = "./test/fixtures/v7-beta.d.ts"; 9 | 10 | async function generate() { 11 | const cwd = fileURLToPath(root); 12 | 13 | await Promise.all([ 14 | // note: the version inside node_modules is 6.x 15 | execa("pnpm", ["exec", "openapi-typescript", SCHEMA, "-o", V6_OUTPUT], { cwd }), 16 | // note: the version locally is 7.x 17 | execa("../openapi-typescript/bin/cli.js", [SCHEMA, "-o", V7_OUTPUT], { cwd }), 18 | ]); 19 | } 20 | 21 | generate(); 22 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/container_app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React + TS 8 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/container_app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React + TS 8 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/container_app/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", 4 | "target": "ES2020", 5 | "useDefineForClassFields": true, 6 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 7 | "module": "ESNext", 8 | "skipLibCheck": true, 9 | 10 | /* Bundler mode */ 11 | "moduleResolution": "bundler", 12 | "allowImportingTsExtensions": true, 13 | "isolatedModules": true, 14 | "moduleDetection": "force", 15 | "noEmit": true, 16 | "jsx": "react-jsx", 17 | 18 | /* Linting */ 19 | "strict": true, 20 | "noUnusedLocals": true, 21 | "noUnusedParameters": true, 22 | "noFallthroughCasesInSwitch": true, 23 | "noUncheckedSideEffectImports": true 24 | }, 25 | "include": ["src"] 26 | } 27 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/container_app/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", 4 | "target": "ES2020", 5 | "useDefineForClassFields": true, 6 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 7 | "module": "ESNext", 8 | "skipLibCheck": true, 9 | 10 | /* Bundler mode */ 11 | "moduleResolution": "bundler", 12 | "allowImportingTsExtensions": true, 13 | "isolatedModules": true, 14 | "moduleDetection": "force", 15 | "noEmit": true, 16 | "jsx": "react-jsx", 17 | 18 | /* Linting */ 19 | "strict": true, 20 | "noUnusedLocals": true, 21 | "noUnusedParameters": true, 22 | "noFallthroughCasesInSwitch": true, 23 | "noUncheckedSideEffectImports": true 24 | }, 25 | "include": ["src"] 26 | } 27 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/react_app/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", 4 | "target": "ES2020", 5 | "useDefineForClassFields": true, 6 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 7 | "module": "ESNext", 8 | "skipLibCheck": true, 9 | 10 | /* Bundler mode */ 11 | "moduleResolution": "bundler", 12 | "allowImportingTsExtensions": true, 13 | "isolatedModules": true, 14 | "moduleDetection": "force", 15 | 16 | "noEmit": true, 17 | "allowJs": true, 18 | "jsx": "react-jsx", 19 | 20 | /* Linting */ 21 | "strict": false, 22 | "noUnusedLocals": false, 23 | "noUnusedParameters": false, 24 | "noFallthroughCasesInSwitch": false, 25 | "noUncheckedSideEffectImports": false 26 | }, 27 | "include": ["src"] 28 | } 29 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/react_app/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", 4 | "target": "ES2020", 5 | "useDefineForClassFields": true, 6 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 7 | "module": "ESNext", 8 | "skipLibCheck": true, 9 | 10 | /* Bundler mode */ 11 | "moduleResolution": "bundler", 12 | "allowImportingTsExtensions": true, 13 | "isolatedModules": true, 14 | "moduleDetection": "force", 15 | 16 | "noEmit": true, 17 | "allowJs": true, 18 | "jsx": "react-jsx", 19 | 20 | /* Linting */ 21 | "strict": false, 22 | "noUnusedLocals": false, 23 | "noUnusedParameters": false, 24 | "noFallthroughCasesInSwitch": false, 25 | "noUncheckedSideEffectImports": false 26 | }, 27 | "include": ["src"] 28 | } 29 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/react_app/eslint.config.js: -------------------------------------------------------------------------------- 1 | import js from '@eslint/js' 2 | import globals from 'globals' 3 | import reactHooks from 'eslint-plugin-react-hooks' 4 | import reactRefresh from 'eslint-plugin-react-refresh' 5 | import tseslint from 'typescript-eslint' 6 | 7 | export default tseslint.config( 8 | { ignores: ['dist'] }, 9 | { 10 | extends: [js.configs.recommended, ...tseslint.configs.recommended], 11 | files: ['**/*.{ts,tsx}'], 12 | languageOptions: { 13 | ecmaVersion: 2020, 14 | globals: globals.browser, 15 | }, 16 | plugins: { 17 | 'react-hooks': reactHooks, 18 | 'react-refresh': reactRefresh, 19 | }, 20 | rules: { 21 | ...reactHooks.configs.recommended.rules, 22 | 'react-refresh/only-export-components': [ 23 | 'warn', 24 | { allowConstantExport: true }, 25 | ], 26 | }, 27 | }, 28 | ) 29 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/react_app/eslint.config.js: -------------------------------------------------------------------------------- 1 | import js from '@eslint/js' 2 | import globals from 'globals' 3 | import reactHooks from 'eslint-plugin-react-hooks' 4 | import reactRefresh from 'eslint-plugin-react-refresh' 5 | import tseslint from 'typescript-eslint' 6 | 7 | export default tseslint.config( 8 | { ignores: ['dist'] }, 9 | { 10 | extends: [js.configs.recommended, ...tseslint.configs.recommended], 11 | files: ['**/*.{ts,tsx}'], 12 | languageOptions: { 13 | ecmaVersion: 2020, 14 | globals: globals.browser, 15 | }, 16 | plugins: { 17 | 'react-hooks': reactHooks, 18 | 'react-refresh': reactRefresh, 19 | }, 20 | rules: { 21 | ...reactHooks.configs.recommended.rules, 22 | 'react-refresh/only-export-components': [ 23 | 'warn', 24 | { allowConstantExport: true }, 25 | ], 26 | }, 27 | }, 28 | ) 29 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/container_app/eslint.config.js: -------------------------------------------------------------------------------- 1 | import js from '@eslint/js' 2 | import globals from 'globals' 3 | import reactHooks from 'eslint-plugin-react-hooks' 4 | import reactRefresh from 'eslint-plugin-react-refresh' 5 | import tseslint from 'typescript-eslint' 6 | 7 | export default tseslint.config( 8 | { ignores: ['dist'] }, 9 | { 10 | extends: [js.configs.recommended, ...tseslint.configs.recommended], 11 | files: ['**/*.{ts,tsx}'], 12 | languageOptions: { 13 | ecmaVersion: 2020, 14 | globals: globals.browser, 15 | }, 16 | plugins: { 17 | 'react-hooks': reactHooks, 18 | 'react-refresh': reactRefresh, 19 | }, 20 | rules: { 21 | ...reactHooks.configs.recommended.rules, 22 | 'react-refresh/only-export-components': [ 23 | 'warn', 24 | { allowConstantExport: true }, 25 | ], 26 | }, 27 | }, 28 | ) 29 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/container_app/eslint.config.js: -------------------------------------------------------------------------------- 1 | import js from '@eslint/js' 2 | import globals from 'globals' 3 | import reactHooks from 'eslint-plugin-react-hooks' 4 | import reactRefresh from 'eslint-plugin-react-refresh' 5 | import tseslint from 'typescript-eslint' 6 | 7 | export default tseslint.config( 8 | { ignores: ['dist'] }, 9 | { 10 | extends: [js.configs.recommended, ...tseslint.configs.recommended], 11 | files: ['**/*.{ts,tsx}'], 12 | languageOptions: { 13 | ecmaVersion: 2020, 14 | globals: globals.browser, 15 | }, 16 | plugins: { 17 | 'react-hooks': reactHooks, 18 | 'react-refresh': reactRefresh, 19 | }, 20 | rules: { 21 | ...reactHooks.configs.recommended.rules, 22 | 'react-refresh/only-export-components': [ 23 | 'warn', 24 | { allowConstantExport: true }, 25 | ], 26 | }, 27 | }, 28 | ) 29 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/container_app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "container_app", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "tsc -b && vite build", 9 | "lint": "eslint .", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "lodash": "^4.17.21", 14 | "react": "^18.3.1", 15 | "react-dom": "^18.3.1" 16 | }, 17 | "devDependencies": { 18 | "@eslint/js": "^9.17.0", 19 | "@types/lodash": "^4.17.14", 20 | "@types/react": "^18.3.18", 21 | "@types/react-dom": "^18.3.5", 22 | "@vitejs/plugin-react": "^4.3.4", 23 | "eslint": "^9.17.0", 24 | "eslint-plugin-react-hooks": "^5.0.0", 25 | "eslint-plugin-react-refresh": "^0.4.16", 26 | "globals": "^15.14.0", 27 | "typescript": "~5.6.2", 28 | "typescript-eslint": "^8.18.2", 29 | "vite": "^6.0.5" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 17 | 18 | 42 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/container_app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "container_app", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "tsc -b && vite build", 9 | "lint": "eslint .", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "lodash": "^4.17.21", 14 | "react": "^18.3.1", 15 | "react-dom": "^18.3.1" 16 | }, 17 | "devDependencies": { 18 | "@eslint/js": "^9.17.0", 19 | "@types/lodash": "^4.17.14", 20 | "@types/react": "^18.3.18", 21 | "@types/react-dom": "^18.3.5", 22 | "@vitejs/plugin-react": "^4.3.4", 23 | "eslint": "^9.17.0", 24 | "eslint-plugin-react-hooks": "^5.0.0", 25 | "eslint-plugin-react-refresh": "^0.4.16", 26 | "globals": "^15.14.0", 27 | "typescript": "~5.6.2", 28 | "typescript-eslint": "^8.18.2", 29 | "vite": "^6.0.5" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 17 | 18 | 42 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue_app", 3 | "version": "0.0.0", 4 | "private": true, 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "preview": "vite preview", 10 | "build-only": "vite build", 11 | "type-check": "vue-tsc --build" 12 | }, 13 | "dependencies": { 14 | "vue": "^3.5.13", 15 | "vue-router": "^4.5.0" 16 | }, 17 | "devDependencies": { 18 | "@tsconfig/node22": "^22.0.0", 19 | "@types/node": "^22.10.2", 20 | "@vitejs/plugin-vue": "^5.2.1", 21 | "@vitejs/plugin-vue-jsx": "^4.1.1", 22 | "@vue/tsconfig": "^0.7.0", 23 | "autoprefixer": "^10.4.20", 24 | "npm-run-all2": "^7.0.2", 25 | "picocolors": "^1.1.1", 26 | "postcss": "^8.5.1", 27 | "tailwindcss": "^3.4.17", 28 | "typescript": "~5.6.3", 29 | "vite": "^6.0.5", 30 | "vite-plugin-vue-devtools": "^7.6.8", 31 | "vue-tsc": "^2.1.10" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue_app", 3 | "version": "0.0.0", 4 | "private": true, 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "preview": "vite preview", 10 | "build-only": "vite build", 11 | "type-check": "vue-tsc --build" 12 | }, 13 | "dependencies": { 14 | "vue": "^3.5.13", 15 | "vue-router": "^4.5.0" 16 | }, 17 | "devDependencies": { 18 | "@tsconfig/node22": "^22.0.0", 19 | "@types/node": "^22.10.2", 20 | "@vitejs/plugin-vue": "^5.2.1", 21 | "@vitejs/plugin-vue-jsx": "^4.1.1", 22 | "@vue/tsconfig": "^0.7.0", 23 | "autoprefixer": "^10.4.20", 24 | "npm-run-all2": "^7.0.2", 25 | "picocolors": "^1.1.1", 26 | "postcss": "^8.5.1", 27 | "tailwindcss": "^3.4.17", 28 | "typescript": "~5.6.3", 29 | "vite": "^6.0.5", 30 | "vite-plugin-vue-devtools": "^7.6.8", 31 | "vue-tsc": "^2.1.10" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/react_app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react_app", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "TSC_COMPILE_ON_ERROR=true tsc --noEmit && vite build", 9 | "lint": "eslint .", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "picocolors": "^1.1.1", 14 | "react": "^18.3.1", 15 | "react-dom": "^18.3.1" 16 | }, 17 | "devDependencies": { 18 | "@eslint/js": "^9.17.0", 19 | "@types/react": "^18.3.18", 20 | "@types/react-dom": "^18.3.5", 21 | "@vitejs/plugin-react": "^4.3.4", 22 | "autoprefixer": "^10.4.20", 23 | "eslint": "^9.17.0", 24 | "eslint-plugin-react-hooks": "^5.0.0", 25 | "eslint-plugin-react-refresh": "^0.4.16", 26 | "globals": "^15.14.0", 27 | "postcss": "^8.5.1", 28 | "tailwindcss": "^3.4.17", 29 | "typescript": "~5.6.2", 30 | "typescript-eslint": "^8.18.2", 31 | "vite": "^6.0.5" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/react_app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react_app", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "TSC_COMPILE_ON_ERROR=true tsc --noEmit && vite build", 9 | "lint": "eslint .", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "picocolors": "^1.1.1", 14 | "react": "^18.3.1", 15 | "react-dom": "^18.3.1" 16 | }, 17 | "devDependencies": { 18 | "@eslint/js": "^9.17.0", 19 | "@types/react": "^18.3.18", 20 | "@types/react-dom": "^18.3.5", 21 | "@vitejs/plugin-react": "^4.3.4", 22 | "autoprefixer": "^10.4.20", 23 | "eslint": "^9.17.0", 24 | "eslint-plugin-react-hooks": "^5.0.0", 25 | "eslint-plugin-react-refresh": "^0.4.16", 26 | "globals": "^15.14.0", 27 | "postcss": "^8.5.1", 28 | "tailwindcss": "^3.4.17", 29 | "typescript": "~5.6.2", 30 | "typescript-eslint": "^8.18.2", 31 | "vite": "^6.0.5" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/README.md: -------------------------------------------------------------------------------- 1 | # vue_app 2 | 3 | This template should help get you started developing with Vue 3 in Vite. 4 | 5 | ## Recommended IDE Setup 6 | 7 | [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur). 8 | 9 | ## Type Support for `.vue` Imports in TS 10 | 11 | TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types. 12 | 13 | ## Customize configuration 14 | 15 | See [Vite Configuration Reference](https://vite.dev/config/). 16 | 17 | ## Project Setup 18 | 19 | ```sh 20 | npm install 21 | ``` 22 | 23 | ### Compile and Hot-Reload for Development 24 | 25 | ```sh 26 | npm run dev 27 | ``` 28 | 29 | ### Type-Check, Compile and Minify for Production 30 | 31 | ```sh 32 | npm run build 33 | ``` 34 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/README.md: -------------------------------------------------------------------------------- 1 | # vue_app 2 | 3 | This template should help get you started developing with Vue 3 in Vite. 4 | 5 | ## Recommended IDE Setup 6 | 7 | [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur). 8 | 9 | ## Type Support for `.vue` Imports in TS 10 | 11 | TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types. 12 | 13 | ## Customize configuration 14 | 15 | See [Vite Configuration Reference](https://vite.dev/config/). 16 | 17 | ## Project Setup 18 | 19 | ```sh 20 | npm install 21 | ``` 22 | 23 | ### Compile and Hot-Reload for Development 24 | 25 | ```sh 26 | npm run dev 27 | ``` 28 | 29 | ### Type-Check, Compile and Minify for Production 30 | 31 | ```sh 32 | npm run build 33 | ``` 34 | -------------------------------------------------------------------------------- /bigcodereward/config/bigcodereward.yaml: -------------------------------------------------------------------------------- 1 | # BigCodeReward Evaluation Configuration 2 | 3 | # Dataset information 4 | dataset: 5 | name: bigcode/bigcodereward 6 | 7 | # Default judge model 8 | default_judge_model: sonnet35v2 9 | 10 | # Evaluation settings 11 | evaluation: 12 | default_workers: 8 13 | default_max_records: null # null means no limit 14 | include_output: true # Include execution results by default 15 | retry_failed: false 16 | 17 | # Output directories 18 | paths: 19 | results_dir: results 20 | logs_dir: results/logs 21 | prompts_dir: prompts 22 | analysis_dir: analysis_results 23 | 24 | # ELO computation parameters 25 | elo_params: 26 | K: 4 27 | SCALE: 400 28 | BASE: 10 29 | INIT_RATING: 1000 30 | n_bootstrap: 1000 31 | confidence_level: 0.9 32 | 33 | # Classification labels 34 | labels: 35 | original: [vote_left, vote_right, vote_tie, vote_both_bad] 36 | merged: [vote_left, vote_right, vote_uncertain] 37 | merge_rule: tie_and_bad # Merge vote_tie and vote_both_bad into vote_uncertain 38 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/src/components/icons/IconTooling.vue: -------------------------------------------------------------------------------- 1 | 2 | 20 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/src/components/icons/IconTooling.vue: -------------------------------------------------------------------------------- 1 | 2 | 20 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/src/components/icons/IconCommunity.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/src/components/icons/IconCommunity.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/e2b/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 FOUNDRYLABS, INC. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/@e2b/code-interpreter/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 FOUNDRYLABS, INC. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/platform/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "platform", 3 | "version": "1.3.6", 4 | "description": "A platform detection library that works on nearly all JavaScript platforms.", 5 | "license": "MIT", 6 | "main": "platform.js", 7 | "keywords": "environment, platform, ua, useragent", 8 | "author": "Benjamin Tan ", 9 | "contributors": [ 10 | "Benjamin Tan ", 11 | "John-David Dalton ", 12 | "Mathias Bynens " 13 | ], 14 | "repository": "bestiejs/platform.js", 15 | "scripts": { 16 | "doc": "docdown platform.js doc/README.md style=github title=\"Platform.js v${npm_package_version}\" toc=properties url=https://github.com/bestiejs/platform.js/blob/${npm_package_version}/platform.js", 17 | "prepublishOnly": "node bump/bump.js ${npm_package_version}", 18 | "test": "node test/test.js" 19 | }, 20 | "devDependencies": { 21 | "docdown": "^0.7.3", 22 | "qunit-extras": "^1.5.0", 23 | "qunitjs": "^1.23.1", 24 | "replace": "^1.1.0", 25 | "requirejs": "^2.3.6" 26 | }, 27 | "files": [ 28 | "platform.js" 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/openapi-fetch/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Drew Powers 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/openapi-typescript-helpers/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Drew Powers 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/compare-versions/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015-2021 Ole Michelsen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/platform/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2014-2020 Benjamin Tan 2 | Copyright 2011-2013 John-David Dalton 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/get_top_pypi.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | def get_top_pypi_packages(limit=50): 4 | # API endpoint for PyPI download statistics (30 days) 5 | url = "https://hugovk.github.io/top-pypi-packages/top-pypi-packages-30-days.min.json" 6 | 7 | try: 8 | response = requests.get(url) 9 | response.raise_for_status() 10 | data = response.json() 11 | 12 | # Get the top packages 13 | top_packages = data["rows"][:limit] 14 | return [pkg['project'] for pkg in top_packages] 15 | 16 | except requests.exceptions.RequestException as e: 17 | print(f"Error fetching data: {e}") 18 | return None 19 | 20 | def write_to_file(packages, filename="top_pypi_packages.txt"): 21 | try: 22 | with open(filename, "w") as file: 23 | for i, package in enumerate(packages, 1): 24 | file.write(f"{package}\n") 25 | print(f"Successfully wrote top {len(packages)} packages to {filename}") 26 | except IOError as e: 27 | print(f"Error writing to file: {e}") 28 | 29 | if __name__ == "__main__": 30 | top_packages = get_top_pypi_packages(100) 31 | if top_packages: 32 | write_to_file(top_packages) -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/get_top_pypi.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | def get_top_pypi_packages(limit=50): 4 | # API endpoint for PyPI download statistics (30 days) 5 | url = "https://hugovk.github.io/top-pypi-packages/top-pypi-packages-30-days.min.json" 6 | 7 | try: 8 | response = requests.get(url) 9 | response.raise_for_status() 10 | data = response.json() 11 | 12 | # Get the top packages 13 | top_packages = data["rows"][:limit] 14 | return [pkg['project'] for pkg in top_packages] 15 | 16 | except requests.exceptions.RequestException as e: 17 | print(f"Error fetching data: {e}") 18 | return None 19 | 20 | def write_to_file(packages, filename="top_pypi_packages.txt"): 21 | try: 22 | with open(filename, "w") as file: 23 | for i, package in enumerate(packages, 1): 24 | file.write(f"{package}\n") 25 | print(f"Successfully wrote top {len(packages)} packages to {filename}") 26 | except IOError as e: 27 | print(f"Error writing to file: {e}") 28 | 29 | if __name__ == "__main__": 30 | top_packages = get_top_pypi_packages(100) 31 | if top_packages: 32 | write_to_file(top_packages) -------------------------------------------------------------------------------- /autocodearena/install_docker_sandbox.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Install Docker Sandbox Dependencies 4 | echo "🐳 Installing Docker sandbox dependencies..." 5 | 6 | # Install Docker Python SDK 7 | pip install docker 8 | 9 | echo "✅ Docker sandbox dependencies installed successfully!" 10 | 11 | # Check if Docker is installed and running 12 | if command -v docker &> /dev/null; then 13 | if docker info &> /dev/null; then 14 | echo "✅ Docker is installed and running" 15 | else 16 | echo "⚠️ Docker is installed but not running. Please start Docker daemon:" 17 | echo " sudo systemctl start docker" 18 | echo " or start Docker Desktop if using macOS/Windows" 19 | fi 20 | else 21 | echo "❌ Docker is not installed. Please install Docker first:" 22 | echo " - Linux: https://docs.docker.com/engine/install/" 23 | echo " - macOS: https://docs.docker.com/desktop/install/mac-install/" 24 | echo " - Windows: https://docs.docker.com/desktop/install/windows-install/" 25 | fi 26 | 27 | echo "" 28 | echo "🚀 Docker sandbox is now ready to use!" 29 | echo " The sandbox will automatically build Docker images as needed." 30 | echo " To switch back to Firejail, change USE_DOCKER_SANDBOX=False in execute_code.py" 31 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/compare-versions/src/compareVersions.ts: -------------------------------------------------------------------------------- 1 | import { compareSegments, validateAndParse } from './utils.js'; 2 | 3 | /** 4 | * Compare [semver](https://semver.org/) version strings to find greater, equal or lesser. 5 | * This library supports the full semver specification, including comparing versions with different number of digits like `1.0.0`, `1.0`, `1`, and pre-release versions like `1.0.0-alpha`. 6 | * @param v1 - First version to compare 7 | * @param v2 - Second version to compare 8 | * @returns Numeric value compatible with the [Array.sort(fn) interface](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters). 9 | */ 10 | export const compareVersions = (v1: string, v2: string) => { 11 | // validate input and split into segments 12 | const n1 = validateAndParse(v1); 13 | const n2 = validateAndParse(v2); 14 | 15 | // pop off the patch 16 | const p1 = n1.pop(); 17 | const p2 = n2.pop(); 18 | 19 | // validate numbers 20 | const r = compareSegments(n1, n2); 21 | if (r !== 0) return r; 22 | 23 | // validate pre-release 24 | if (p1 && p2) { 25 | return compareSegments(p1.split('.'), p2.split('.')); 26 | } else if (p1 || p2) { 27 | return p1 ? -1 : 1; 28 | } 29 | 30 | return 0; 31 | }; 32 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/src/components/icons/IconDocumentation.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/src/components/icons/IconDocumentation.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/openapi-typescript-helpers/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "openapi-typescript-helpers", 3 | "description": "TypeScript helpers for consuming openapi-typescript types", 4 | "version": "0.0.8", 5 | "author": { 6 | "name": "Drew Powers", 7 | "email": "drew@pow.rs" 8 | }, 9 | "license": "MIT", 10 | "type": "module", 11 | "main": "./index.js", 12 | "types": "./index.d.ts", 13 | "exports": { 14 | ".": { 15 | "import": { 16 | "types": "./index.d.ts", 17 | "default": "./index.js" 18 | }, 19 | "require": { 20 | "types": "./index.d.cts", 21 | "default": "./index.cjs" 22 | } 23 | }, 24 | "./*": "./*" 25 | }, 26 | "homepage": "https://openapi-ts.pages.dev", 27 | "repository": { 28 | "type": "git", 29 | "url": "https://github.com/drwpow/openapi-typescript", 30 | "directory": "packages/openapi-fetch" 31 | }, 32 | "bugs": { 33 | "url": "https://github.com/drwpow/openapi-typescript/issues" 34 | }, 35 | "scripts": { 36 | "build": "cp index.d.ts index.d.cts", 37 | "lint": "pnpm run lint:js", 38 | "lint:js": "eslint \"*.{js,ts}\"", 39 | "lint:prettier": "prettier --check \"{src,test}/**/*\"", 40 | "test": "tsc --noEmit" 41 | }, 42 | "devDependencies": { 43 | "typescript": "^5.4.5" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /autocodearena/config/autocodearena.yaml: -------------------------------------------------------------------------------- 1 | # judge_model: gpt-4.5-preview (This judge is goated) 2 | 3 | # judge_model: gemini-2.5 4 | # temperature: 1.0 5 | # max_tokens: 32000: 6 | judge_model: claude37_sonnet 7 | temperature: 0.0 8 | max_tokens: 8192 9 | parallel: 32 10 | 11 | bench_name: autocodearena 12 | 13 | reference: null 14 | 15 | regex_patterns: 16 | - \[\[([AB<>=]+)\]\] 17 | - \[([AB<>=]+)\] 18 | 19 | prompt_template: "<|The Start of User Question|>\n{QUESTION}\n<|The End of User Question|>\n\n<|The Start of Assistant A's Answer|>\n{ANSWER_A}{SCREENSHOT_A_SECTION}{VISUAL_A_SECTION}<|The End of Assistant A's Answer|>\n\n<|The Start of Assistant B's Answer|>\n{ANSWER_B}{SCREENSHOT_B_SECTION}{VISUAL_B_SECTION}<|The End of Assistant B's Answer|>" 20 | 21 | baseline_model: gpt-4.1-2025-04-14 22 | model_list: 23 | # - glm-4.5 24 | # - kimi-k2 25 | # - claude-4-sonnet 26 | # - claude-4-opus 27 | # - gpt-4.1-2025-04-14 28 | # - gemini-2.5-pro 29 | # - qwen3-coder 30 | # - o3-mini-2025-01-31 31 | # - o4-mini-2025-04-16 32 | # - claude37_sonnet 33 | # - gpt-oss-120b 34 | # - gpt-oss-20b 35 | # - deepseek-chat-v3-0324 36 | # - gemini-2.5-flash 37 | # - deepseek-r1-0528 38 | # - gpt-5-2025-08-07 39 | # - gpt-4o-mini-2024-07-18 40 | # - gpt-4o-2024-11-20 41 | # - claude35_sonnet 42 | # - claude35_haiku 43 | # - deepseek-chat-v3.1 44 | # - grok-code -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/compare-versions/src/validate.ts: -------------------------------------------------------------------------------- 1 | import { semver } from './utils.js'; 2 | 3 | /** 4 | * Validate [semver](https://semver.org/) version strings. 5 | * 6 | * @param version Version number to validate 7 | * @returns `true` if the version number is a valid semver version number, `false` otherwise. 8 | * 9 | * @example 10 | * ``` 11 | * validate('1.0.0-rc.1'); // return true 12 | * validate('1.0-rc.1'); // return false 13 | * validate('foo'); // return false 14 | * ``` 15 | */ 16 | export const validate = (version: string) => 17 | typeof version === 'string' && /^[v\d]/.test(version) && semver.test(version); 18 | 19 | /** 20 | * Validate [semver](https://semver.org/) version strings strictly. Will not accept wildcards and version ranges. 21 | * 22 | * @param version Version number to validate 23 | * @returns `true` if the version number is a valid semver version number `false` otherwise 24 | * 25 | * @example 26 | * ``` 27 | * validate('1.0.0-rc.1'); // return true 28 | * validate('1.0-rc.1'); // return false 29 | * validate('foo'); // return false 30 | * ``` 31 | */ 32 | export const validateStrict = (version: string) => 33 | typeof version === 'string' && 34 | /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/.test( 35 | version 36 | ); 37 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 8000 default_server; 3 | 4 | # Serve container_app at /container/ 5 | location /container/ { 6 | alias /home/user/container_app/dist/; 7 | try_files $uri $uri/ /container/index.html?$query_string; 8 | } 9 | 10 | # Serve react_app at /react/ 11 | location /react/ { 12 | alias /home/user/react_app/dist/; 13 | try_files $uri $uri/ /react/index.html; 14 | } 15 | 16 | # Serve vue_app at /vue/ 17 | location /vue/ { 18 | alias /home/user/vue_app/dist/; 19 | try_files $uri $uri/ /vue/index.html; 20 | } 21 | 22 | # Serve html_app at /html/ 23 | location /html/ { 24 | alias /home/user/html_app/; 25 | try_files $uri $uri/ /html/index.html; 26 | } 27 | 28 | # Serve pygame_app at /pygame/ 29 | location /pygame/ { 30 | alias /home/user/pygame_app/build/web/; 31 | try_files $uri $uri/ /pygame/index.html; 32 | } 33 | 34 | location /gradio/ { 35 | proxy_pass http://localhost:7860/; 36 | proxy_buffering off; 37 | proxy_redirect off; 38 | proxy_http_version 1.1; 39 | proxy_set_header Upgrade $http_upgrade; 40 | proxy_set_header Connection "upgrade"; 41 | proxy_set_header Host $host; 42 | proxy_set_header X-Forwarded-Host $host; 43 | proxy_set_header X-Forwarded-Proto $scheme; 44 | } 45 | } -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 8000 default_server; 3 | 4 | # Serve container_app at /container/ 5 | location /container/ { 6 | alias /home/user/container_app/dist/; 7 | try_files $uri $uri/ /container/index.html?$query_string; 8 | } 9 | 10 | # Serve react_app at /react/ 11 | location /react/ { 12 | alias /home/user/react_app/dist/; 13 | try_files $uri $uri/ /react/index.html; 14 | } 15 | 16 | # Serve vue_app at /vue/ 17 | location /vue/ { 18 | alias /home/user/vue_app/dist/; 19 | try_files $uri $uri/ /vue/index.html; 20 | } 21 | 22 | # Serve html_app at /html/ 23 | location /html/ { 24 | alias /home/user/html_app/; 25 | try_files $uri $uri/ /html/index.html; 26 | } 27 | 28 | # Serve pygame_app at /pygame/ 29 | location /pygame/ { 30 | alias /home/user/pygame_app/build/web/; 31 | try_files $uri $uri/ /pygame/index.html; 32 | } 33 | 34 | location /gradio/ { 35 | proxy_pass http://localhost:7860/; 36 | proxy_buffering off; 37 | proxy_redirect off; 38 | proxy_http_version 1.1; 39 | proxy_set_header Upgrade $http_upgrade; 40 | proxy_set_header Connection "upgrade"; 41 | proxy_set_header Host $host; 42 | proxy_set_header X-Forwarded-Host $host; 43 | proxy_set_header X-Forwarded-Proto $scheme; 44 | } 45 | } -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/compare-versions/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "compare-versions", 3 | "version": "6.1.1", 4 | "description": "Compare semver version strings to find greater, equal or lesser.", 5 | "repository": { 6 | "type": "git", 7 | "url": "git+https://github.com/omichelsen/compare-versions.git" 8 | }, 9 | "author": "Ole Michelsen", 10 | "license": "MIT", 11 | "bugs": { 12 | "url": "https://github.com/omichelsen/compare-versions/issues" 13 | }, 14 | "homepage": "https://github.com/omichelsen/compare-versions#readme", 15 | "keywords": [ 16 | "semver", 17 | "version", 18 | "compare", 19 | "browser", 20 | "node" 21 | ], 22 | "scripts": { 23 | "build": "npm run build:esm && npm run build:umd", 24 | "build:esm": "tsc --module esnext --target es2017 --outDir lib/esm", 25 | "build:umd": "rollup lib/esm/index.js --format umd --name compareVersions --sourcemap -o lib/umd/index.js", 26 | "prepublishOnly": "npm run build", 27 | "test": "c8 --reporter=lcov mocha" 28 | }, 29 | "main": "./lib/umd/index.js", 30 | "module": "./lib/esm/index.js", 31 | "types": "./lib/esm/index.d.ts", 32 | "sideEffects": false, 33 | "files": [ 34 | "lib", 35 | "src" 36 | ], 37 | "devDependencies": { 38 | "@types/mocha": "^10.0.7", 39 | "c8": "^10.1.2", 40 | "mocha": "^10.6.0", 41 | "rollup": "^4.18.1", 42 | "ts-node": "^10.9.2", 43 | "typescript": "^5.5.3" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/react_app/public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/react_app/public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/container_app/public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/container_app/public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/top_pypi_packages.txt: -------------------------------------------------------------------------------- 1 | boto3 2 | botocore 3 | urllib3 4 | setuptools 5 | requests 6 | certifi 7 | idna 8 | charset-normalizer 9 | packaging 10 | typing-extensions 11 | python-dateutil 12 | aiobotocore 13 | s3transfer 14 | grpcio-status 15 | pyyaml 16 | six 17 | fsspec 18 | s3fs 19 | numpy 20 | wheel 21 | pip 22 | cryptography 23 | awscli 24 | pydantic 25 | cffi 26 | attrs 27 | google-api-core 28 | pycparser 29 | pandas 30 | importlib-metadata 31 | jmespath 32 | click 33 | zipp 34 | rsa 35 | pyasn1 36 | markupsafe 37 | pytz 38 | colorama 39 | protobuf 40 | platformdirs 41 | jinja2 42 | rich 43 | tomli 44 | pytest 45 | pydantic-core 46 | pyjwt 47 | pluggy 48 | aiohttp 49 | virtualenv 50 | jsonschema 51 | googleapis-common-protos 52 | cachetools 53 | google-auth 54 | filelock 55 | wrapt 56 | sqlalchemy 57 | docutils 58 | pyasn1-modules 59 | pyarrow 60 | greenlet 61 | iniconfig 62 | pygments 63 | annotated-types 64 | yarl 65 | requests-oauthlib 66 | tzdata 67 | psutil 68 | multidict 69 | pyparsing 70 | requests-toolbelt 71 | exceptiongroup 72 | werkzeug 73 | soupsieve 74 | oauthlib 75 | beautifulsoup4 76 | frozenlist 77 | more-itertools 78 | distlib 79 | tomlkit 80 | pathspec 81 | aiosignal 82 | grpcio 83 | tqdm 84 | scipy 85 | async-timeout 86 | pillow 87 | isodate 88 | anyio 89 | sortedcontainers 90 | decorator 91 | markdown-it-py 92 | deprecated 93 | mypy-extensions 94 | sniffio 95 | httpx 96 | coverage 97 | openpyxl 98 | flask 99 | rpds-py 100 | et-xmlfile 101 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/top_pypi_packages.txt: -------------------------------------------------------------------------------- 1 | boto3 2 | botocore 3 | urllib3 4 | setuptools 5 | requests 6 | certifi 7 | idna 8 | charset-normalizer 9 | packaging 10 | typing-extensions 11 | python-dateutil 12 | aiobotocore 13 | s3transfer 14 | grpcio-status 15 | pyyaml 16 | six 17 | fsspec 18 | s3fs 19 | numpy 20 | wheel 21 | pip 22 | cryptography 23 | awscli 24 | pydantic 25 | cffi 26 | attrs 27 | google-api-core 28 | pycparser 29 | pandas 30 | importlib-metadata 31 | jmespath 32 | click 33 | zipp 34 | rsa 35 | pyasn1 36 | markupsafe 37 | pytz 38 | colorama 39 | protobuf 40 | platformdirs 41 | jinja2 42 | rich 43 | tomli 44 | pytest 45 | pydantic-core 46 | pyjwt 47 | pluggy 48 | aiohttp 49 | virtualenv 50 | jsonschema 51 | googleapis-common-protos 52 | cachetools 53 | google-auth 54 | filelock 55 | wrapt 56 | sqlalchemy 57 | docutils 58 | pyasn1-modules 59 | pyarrow 60 | greenlet 61 | iniconfig 62 | pygments 63 | annotated-types 64 | yarl 65 | requests-oauthlib 66 | tzdata 67 | psutil 68 | multidict 69 | pyparsing 70 | requests-toolbelt 71 | exceptiongroup 72 | werkzeug 73 | soupsieve 74 | oauthlib 75 | beautifulsoup4 76 | frozenlist 77 | more-itertools 78 | distlib 79 | tomlkit 80 | pathspec 81 | aiosignal 82 | grpcio 83 | tqdm 84 | scipy 85 | async-timeout 86 | pillow 87 | isodate 88 | anyio 89 | sortedcontainers 90 | decorator 91 | markdown-it-py 92 | deprecated 93 | mypy-extensions 94 | sniffio 95 | httpx 96 | coverage 97 | openpyxl 98 | flask 99 | rpds-py 100 | et-xmlfile 101 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/compare-versions/src/utils.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Allowed arithmetic operators 3 | */ 4 | export type CompareOperator = '>' | '>=' | '=' | '<' | '<=' | '!='; 5 | 6 | export const semver = 7 | /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i; 8 | 9 | export const validateAndParse = (version: string) => { 10 | if (typeof version !== 'string') { 11 | throw new TypeError('Invalid argument expected string'); 12 | } 13 | const match = version.match(semver); 14 | if (!match) { 15 | throw new Error( 16 | `Invalid argument not valid semver ('${version}' received)` 17 | ); 18 | } 19 | match.shift(); 20 | return match; 21 | }; 22 | 23 | const isWildcard = (s: string) => s === '*' || s === 'x' || s === 'X'; 24 | 25 | const tryParse = (v: string) => { 26 | const n = parseInt(v, 10); 27 | return isNaN(n) ? v : n; 28 | }; 29 | 30 | const forceType = (a: string | number, b: string | number) => 31 | typeof a !== typeof b ? [String(a), String(b)] : [a, b]; 32 | 33 | const compareStrings = (a: string, b: string) => { 34 | if (isWildcard(a) || isWildcard(b)) return 0; 35 | const [ap, bp] = forceType(tryParse(a), tryParse(b)); 36 | if (ap > bp) return 1; 37 | if (ap < bp) return -1; 38 | return 0; 39 | }; 40 | 41 | export const compareSegments = ( 42 | a: string | string[] | RegExpMatchArray, 43 | b: string | string[] | RegExpMatchArray 44 | ) => { 45 | for (let i = 0; i < Math.max(a.length, b.length); i++) { 46 | const r = compareStrings(a[i] || '0', b[i] || '0'); 47 | if (r !== 0) return r; 48 | } 49 | return 0; 50 | }; 51 | -------------------------------------------------------------------------------- /bigcodereward/prompts/judge_prompt_unified_no_output.md: -------------------------------------------------------------------------------- 1 | You are a code-review judge assigned to compare two candidate solutions (A and B) against a user's programming request. Your job is to evaluate each submission and choose an overall winner based on how well each solution implements the requested features. 2 | 3 | **Important**: You will only see the code implementations, not their execution results or screenshots. Focus your evaluation purely on code quality, structure, and theoretical correctness. 4 | 5 | **Evaluation Criteria** 6 | Your primary focus should be: **The solution implements every requested feature accurately and correctly without adding or omitting functionality.** 7 | 8 | Consider multiple aspects including code efficiency, explanation, readability, maintainability, correctness, and UI/UX, but the most critical factor is complete and accurate implementation of all requested features. 9 | 10 | **Winner Options** 11 | * **"A":** Solution A is clearly better 12 | * **"B":** Solution B is clearly better 13 | * **"Tie":** Both solutions are roughly equivalent in quality 14 | 15 | **Evaluation Process** 16 | You should evaluate based on: 17 | * The code implementation 18 | * How completely each solution addresses the original request 19 | 20 | **Input Format** 21 | <|Instruction|> 22 | {INSTRUCTION} 23 | 24 | <|The Start of Assistant A's Answer|> 25 | {ANSWER_A}<|The End of Assistant A's Answer|> 26 | 27 | <|The Start of Assistant B's Answer|> 28 | {ANSWER_B}<|The End of Assistant B's Answer|> 29 | 30 | **Output Format** 31 | Return exactly one JSON object with this schema: 32 | ```json 33 | { 34 | "Overall": { 35 | "winner": "A"|"B"|"Tie", 36 | "justification": "..." 37 | } 38 | } 39 | ``` -------------------------------------------------------------------------------- /bigcodereward/prompts/judge_prompt_unified.md: -------------------------------------------------------------------------------- 1 | You are a code-review judge assigned to compare two candidate solutions (A and B) against a user's programming request. Your job is to evaluate each submission and choose an overall winner based on how well each solution implements the requested features. 2 | 3 | **Evaluation Criteria** 4 | Your primary focus should be: **The solution implements every requested feature accurately and correctly without adding or omitting functionality.** 5 | 6 | Consider multiple aspects including code efficiency, explanation, readability, maintainability, correctness, and UI/UX, but the most critical factor is complete and accurate implementation of all requested features. 7 | 8 | **Winner Options** 9 | * **"A":** Solution A is clearly better 10 | * **"B":** Solution B is clearly better 11 | * **"Tie":** Both solutions are roughly equivalent in quality 12 | 13 | **Evaluation Process** 14 | You should evaluate based on the combination of: 15 | * The code implementation 16 | * Code output or results produced 17 | * Visual rendering results 18 | * How completely each solution addresses the original request 19 | 20 | **Input Format** 21 | <|Instruction|> 22 | {INSTRUCTION} 23 | 24 | <|The Start of Assistant A's Answer|> 25 | {ANSWER_A}{SCREENSHOT_A_SECTION}{VISUAL_A_SECTION}<|The End of Assistant A's Answer|> 26 | 27 | <|The Start of Assistant B's Answer|> 28 | {ANSWER_B}{SCREENSHOT_B_SECTION}{VISUAL_B_SECTION}<|The End of Assistant B's Answer|> 29 | 30 | **Output Format** 31 | Return exactly one JSON object with this schema below. "reasoning" is a single paragraph explanation without line breaks. Any quotation marks within the text should be properly escaped for a valid JSON format. 32 | ```json 33 | { 34 | "Overall": { 35 | "winner": "A"|"B"|"Tie", 36 | "reasoning": "..." 37 | } 38 | } 39 | ``` -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/react_app/README.md: -------------------------------------------------------------------------------- 1 | # React + TypeScript + Vite 2 | 3 | This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. 4 | 5 | Currently, two official plugins are available: 6 | 7 | - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh 8 | - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh 9 | 10 | ## Expanding the ESLint configuration 11 | 12 | If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: 13 | 14 | - Configure the top-level `parserOptions` property like this: 15 | 16 | ```js 17 | export default tseslint.config({ 18 | languageOptions: { 19 | // other options... 20 | parserOptions: { 21 | project: ['./tsconfig.node.json', './tsconfig.app.json'], 22 | tsconfigRootDir: import.meta.dirname, 23 | }, 24 | }, 25 | }) 26 | ``` 27 | 28 | - Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked` 29 | - Optionally add `...tseslint.configs.stylisticTypeChecked` 30 | - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config: 31 | 32 | ```js 33 | // eslint.config.js 34 | import react from 'eslint-plugin-react' 35 | 36 | export default tseslint.config({ 37 | // Set the react version 38 | settings: { react: { version: '18.3' } }, 39 | plugins: { 40 | // Add the react plugin 41 | react, 42 | }, 43 | rules: { 44 | // other rules... 45 | // Enable its recommended rules 46 | ...react.configs.recommended.rules, 47 | ...react.configs['jsx-runtime'].rules, 48 | }, 49 | }) 50 | ``` 51 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/react_app/README.md: -------------------------------------------------------------------------------- 1 | # React + TypeScript + Vite 2 | 3 | This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. 4 | 5 | Currently, two official plugins are available: 6 | 7 | - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh 8 | - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh 9 | 10 | ## Expanding the ESLint configuration 11 | 12 | If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: 13 | 14 | - Configure the top-level `parserOptions` property like this: 15 | 16 | ```js 17 | export default tseslint.config({ 18 | languageOptions: { 19 | // other options... 20 | parserOptions: { 21 | project: ['./tsconfig.node.json', './tsconfig.app.json'], 22 | tsconfigRootDir: import.meta.dirname, 23 | }, 24 | }, 25 | }) 26 | ``` 27 | 28 | - Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked` 29 | - Optionally add `...tseslint.configs.stylisticTypeChecked` 30 | - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config: 31 | 32 | ```js 33 | // eslint.config.js 34 | import react from 'eslint-plugin-react' 35 | 36 | export default tseslint.config({ 37 | // Set the react version 38 | settings: { react: { version: '18.3' } }, 39 | plugins: { 40 | // Add the react plugin 41 | react, 42 | }, 43 | rules: { 44 | // other rules... 45 | // Enable its recommended rules 46 | ...react.configs.recommended.rules, 47 | ...react.configs['jsx-runtime'].rules, 48 | }, 49 | }) 50 | ``` 51 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/container_app/README.md: -------------------------------------------------------------------------------- 1 | # React + TypeScript + Vite 2 | 3 | This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. 4 | 5 | Currently, two official plugins are available: 6 | 7 | - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh 8 | - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh 9 | 10 | ## Expanding the ESLint configuration 11 | 12 | If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: 13 | 14 | - Configure the top-level `parserOptions` property like this: 15 | 16 | ```js 17 | export default tseslint.config({ 18 | languageOptions: { 19 | // other options... 20 | parserOptions: { 21 | project: ['./tsconfig.node.json', './tsconfig.app.json'], 22 | tsconfigRootDir: import.meta.dirname, 23 | }, 24 | }, 25 | }) 26 | ``` 27 | 28 | - Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked` 29 | - Optionally add `...tseslint.configs.stylisticTypeChecked` 30 | - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config: 31 | 32 | ```js 33 | // eslint.config.js 34 | import react from 'eslint-plugin-react' 35 | 36 | export default tseslint.config({ 37 | // Set the react version 38 | settings: { react: { version: '18.3' } }, 39 | plugins: { 40 | // Add the react plugin 41 | react, 42 | }, 43 | rules: { 44 | // other rules... 45 | // Enable its recommended rules 46 | ...react.configs.recommended.rules, 47 | ...react.configs['jsx-runtime'].rules, 48 | }, 49 | }) 50 | ``` 51 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/container_app/README.md: -------------------------------------------------------------------------------- 1 | # React + TypeScript + Vite 2 | 3 | This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. 4 | 5 | Currently, two official plugins are available: 6 | 7 | - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh 8 | - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh 9 | 10 | ## Expanding the ESLint configuration 11 | 12 | If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: 13 | 14 | - Configure the top-level `parserOptions` property like this: 15 | 16 | ```js 17 | export default tseslint.config({ 18 | languageOptions: { 19 | // other options... 20 | parserOptions: { 21 | project: ['./tsconfig.node.json', './tsconfig.app.json'], 22 | tsconfigRootDir: import.meta.dirname, 23 | }, 24 | }, 25 | }) 26 | ``` 27 | 28 | - Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked` 29 | - Optionally add `...tseslint.configs.stylisticTypeChecked` 30 | - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config: 31 | 32 | ```js 33 | // eslint.config.js 34 | import react from 'eslint-plugin-react' 35 | 36 | export default tseslint.config({ 37 | // Set the react version 38 | settings: { react: { version: '18.3' } }, 39 | plugins: { 40 | // Add the react plugin 41 | react, 42 | }, 43 | rules: { 44 | // other rules... 45 | // Enable its recommended rules 46 | ...react.configs.recommended.rules, 47 | ...react.configs['jsx-runtime'].rules, 48 | }, 49 | }) 50 | ``` 51 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/src/components/WelcomeItem.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 88 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/src/components/WelcomeItem.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 88 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/compare-versions/src/compare.ts: -------------------------------------------------------------------------------- 1 | import { compareVersions } from './compareVersions.js'; 2 | import { CompareOperator } from './utils.js'; 3 | 4 | /** 5 | * Compare [semver](https://semver.org/) version strings using the specified operator. 6 | * 7 | * @param v1 First version to compare 8 | * @param v2 Second version to compare 9 | * @param operator Allowed arithmetic operator to use 10 | * @returns `true` if the comparison between the firstVersion and the secondVersion satisfies the operator, `false` otherwise. 11 | * 12 | * @example 13 | * ``` 14 | * compare('10.1.8', '10.0.4', '>'); // return true 15 | * compare('10.0.1', '10.0.1', '='); // return true 16 | * compare('10.1.1', '10.2.2', '<'); // return true 17 | * compare('10.1.1', '10.2.2', '<='); // return true 18 | * compare('10.1.1', '10.2.2', '>='); // return false 19 | * ``` 20 | */ 21 | export const compare = (v1: string, v2: string, operator: CompareOperator) => { 22 | // validate input operator 23 | assertValidOperator(operator); 24 | 25 | // since result of compareVersions can only be -1 or 0 or 1 26 | // a simple map can be used to replace switch 27 | const res = compareVersions(v1, v2); 28 | 29 | return operatorResMap[operator].includes(res); 30 | }; 31 | 32 | const operatorResMap = { 33 | '>': [1], 34 | '>=': [0, 1], 35 | '=': [0], 36 | '<=': [-1, 0], 37 | '<': [-1], 38 | '!=': [-1, 1], 39 | }; 40 | 41 | const allowedOperators = Object.keys(operatorResMap); 42 | 43 | const assertValidOperator = (op: string) => { 44 | if (typeof op !== 'string') { 45 | throw new TypeError( 46 | `Invalid operator type, expected string but got ${typeof op}` 47 | ); 48 | } 49 | if (allowedOperators.indexOf(op) === -1) { 50 | throw new Error( 51 | `Invalid operator, expected one of ${allowedOperators.join('|')}` 52 | ); 53 | } 54 | }; 55 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/e2b/README.md: -------------------------------------------------------------------------------- 1 |

2 | e2b logo 3 |

4 | 5 |

6 | 7 | Last 1 month downloads for the JavaScript SDK 9 | 10 |

11 | 12 | 15 | ## What is E2B? 16 | [E2B](https://www.e2b.dev/) is an open-source infrastructure that allows you to run AI-generated code in secure isolated sandboxes in the cloud. To start and control sandboxes, use our [JavaScript SDK](https://www.npmjs.com/package/@e2b/code-interpreter) or [Python SDK](https://pypi.org/project/e2b_code_interpreter). 17 | 18 | ## Run your first Sandbox 19 | 20 | ### 1. Install SDK 21 | 22 | ```bash 23 | npm i @e2b/code-interpreter 24 | ``` 25 | 26 | ### 2. Get your E2B API key 27 | 1. Sign up to E2B [here](https://e2b.dev). 28 | 2. Get your API key [here](https://e2b.dev/dashboard?tab=keys). 29 | 3. Set environment variable with your API key 30 | ``` 31 | E2B_API_KEY=e2b_*** 32 | ``` 33 | 34 | ### 3. Execute code with code interpreter inside Sandbox 35 | 36 | ```ts 37 | import { Sandbox } from '@e2b/code-interpreter' 38 | 39 | const sbx = await Sandbox.create() 40 | await sbx.runCode('x = 1') 41 | 42 | const execution = await sbx.runCode('x+=1; x') 43 | console.log(execution.text) // outputs 2 44 | ``` 45 | 46 | ### 4. Check docs 47 | Visit [E2B documentation](https://e2b.dev/docs). 48 | 49 | ### 5. E2B cookbook 50 | Visit our [Cookbook](https://github.com/e2b-dev/e2b-cookbook/tree/main) to get inspired by examples with different LLMs and AI frameworks. 51 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/@e2b/code-interpreter/README.md: -------------------------------------------------------------------------------- 1 |

2 | e2b logo 3 |

4 | 5 |

6 | 7 | Last 1 month downloads for the JavaScript SDK 9 | 10 |

11 | 12 | 15 | ## What is E2B? 16 | [E2B](https://www.e2b.dev/) is an open-source infrastructure that allows you run to AI-generated code in secure isolated sandboxes in the cloud. To start and control sandboxes, use our [JavaScript SDK](https://www.npmjs.com/package/@e2b/code-interpreter) or [Python SDK](https://pypi.org/project/e2b_code_interpreter). 17 | 18 | ## Run your first Sandbox 19 | 20 | ### 1. Install SDK 21 | 22 | ``` 23 | npm i @e2b/code-interpreter 24 | ``` 25 | 26 | ### 2. Get your E2B API key 27 | 1. Sign up to E2B [here](https://e2b.dev). 28 | 2. Get your API key [here](https://e2b.dev/dashboard?tab=keys). 29 | 3. Set environment variable with your API key. 30 | ``` 31 | E2B_API_KEY=e2b_*** 32 | ``` 33 | 34 | ### 3. Execute code with code interpreter inside Sandbox 35 | 36 | ```ts 37 | import { Sandbox } from '@e2b/code-interpreter' 38 | 39 | const sbx = await Sandbox.create() 40 | await sbx.runCode('x = 1') 41 | 42 | const execution = await sbx.runCode('x+=1; x') 43 | console.log(execution.text) // outputs 2 44 | ``` 45 | 46 | ### 4. Check docs 47 | Visit [E2B documentation](https://e2b.dev/docs). 48 | 49 | ### 5. E2B cookbook 50 | Visit our [Cookbook](https://github.com/e2b-dev/e2b-cookbook/tree/main) to get inspired by examples with different LLMs and AI frameworks. 51 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/src/components/icons/IconEcosystem.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/src/components/icons/IconEcosystem.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/@e2b/code-interpreter/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@e2b/code-interpreter", 3 | "version": "2.0.0", 4 | "description": "E2B Code Interpreter - Stateful code execution", 5 | "homepage": "https://e2b.dev", 6 | "license": "MIT", 7 | "author": { 8 | "name": "FoundryLabs, Inc.", 9 | "email": "hello@e2b.dev", 10 | "url": "https://e2b.dev" 11 | }, 12 | "bugs": "https://github.com/e2b-dev/code-interpreter/issues", 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/e2b-dev/code-interpreter", 16 | "directory": "js" 17 | }, 18 | "publishConfig": { 19 | "access": "public" 20 | }, 21 | "sideEffects": false, 22 | "main": "dist/index.js", 23 | "module": "dist/index.mjs", 24 | "types": "dist/index.d.ts", 25 | "devDependencies": { 26 | "@types/node": "^18.18.6", 27 | "dotenv": "^16.4.5", 28 | "knip": "^5.25.1", 29 | "npm-check-updates": "^17.1.14", 30 | "tsup": "^8.4.0", 31 | "typedoc": "0.26.8", 32 | "typedoc-plugin-markdown": "4.2.7", 33 | "typescript": "^5.5.3", 34 | "vitest": "^3.0.9" 35 | }, 36 | "files": [ 37 | "dist", 38 | "README.md", 39 | "package.json" 40 | ], 41 | "keywords": [ 42 | "e2b", 43 | "ai-agents", 44 | "agents", 45 | "ai", 46 | "code-interpreter", 47 | "stateful-sandbox", 48 | "stateful-serverrless", 49 | "sandbox", 50 | "code", 51 | "runtime", 52 | "vm" 53 | ], 54 | "dependencies": { 55 | "e2b": "^2.0.1" 56 | }, 57 | "engines": { 58 | "node": ">=18" 59 | }, 60 | "browserslist": [ 61 | "defaults" 62 | ], 63 | "scripts": { 64 | "build": "tsc --noEmit && tsup", 65 | "dev": "tsup --watch", 66 | "test": "vitest run", 67 | "test:coverage": "vitest run --coverage", 68 | "check-deps": "knip", 69 | "update-deps": "ncu -u && pnpm i", 70 | "example": "npx tsx example.mts", 71 | "test:bun": "bun test tests/runtimes/bun --env-file=.env", 72 | "test:deno": "deno test tests/runtimes/deno/ --allow-net --allow-read --allow-env --unstable-sloppy-imports --trace-leaks", 73 | "generate-ref": "./scripts/generate_sdk_ref.sh" 74 | } 75 | } -------------------------------------------------------------------------------- /hf_space/sandbox/sandbox_state.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Chatbot state. 3 | ''' 4 | 5 | from sandbox.code_analyzer import SandboxEnvironment 6 | from typing import TypedDict 7 | 8 | class ChatbotSandboxState(TypedDict): 9 | ''' 10 | Chatbot sandbox state in gr.state. 11 | ''' 12 | enable_sandbox: bool 13 | ''' 14 | Whether the code sandbox is enabled. 15 | ''' 16 | sandbox_instruction: str | None 17 | ''' 18 | The sandbox instruction to display. 19 | ''' 20 | 21 | enabled_round: int 22 | ''' 23 | The chat round after which the sandbox is enabled. 24 | ''' 25 | sandbox_run_round: int 26 | ''' 27 | How many rounds the sandbox has been run inside the session. 28 | ''' 29 | edit_round: int 30 | ''' 31 | How many rounds the code has been edited. 32 | Starting from 0, incrementing each time the code is edited. 33 | Refreshed when running a generated code. 34 | ''' 35 | 36 | sandbox_environment: SandboxEnvironment | None 37 | ''' 38 | The sandbox environment to run the code. 39 | ''' 40 | auto_selected_sandbox_environment: SandboxEnvironment | None 41 | ''' 42 | The sandbox environment selected automatically. 43 | ''' 44 | code_to_execute: str | None 45 | ''' 46 | The code to execute in the sandbox. 47 | ''' 48 | code_language: str | None 49 | ''' 50 | The code language to execute in the sandbox. 51 | ''' 52 | code_dependencies: tuple[list[str], list[str]] 53 | ''' 54 | The code dependencies for the sandbox (python, npm). 55 | ''' 56 | 57 | sandbox_output: str | None 58 | ''' 59 | The sandbox output. 60 | ''' 61 | sandbox_error: str | None 62 | ''' 63 | The sandbox error. 64 | ''' 65 | 66 | sandbox_id: str | None 67 | ''' 68 | The remote e2b sandbox id. None if not run yet. 69 | ''' 70 | chat_session_id: str | None 71 | ''' 72 | The chat session id, unique per chat. 73 | The two battle models share the same chat session id. 74 | ''' 75 | conv_id: str | None 76 | ''' 77 | The conv id, unique per chat per model. 78 | ''' 79 | 80 | btn_list_length: int 81 | ''' 82 | Count of Gradio user interface buttons. 83 | ''' 84 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/@connectrpc/connect-web/README.md: -------------------------------------------------------------------------------- 1 | # @connectrpc/connect-web 2 | 3 | Connect is a family of libraries for building and consuming APIs on different languages and platforms. 4 | [@connectrpc/connect](https://www.npmjs.com/package/@connectrpc/connect) brings type-safe APIs with Protobuf to 5 | TypeScript. 6 | 7 | `@connectrpc/connect-web` provides the following adapters for web browsers, and any other platform that has 8 | the fetch API on board: 9 | 10 | ### createConnectTransport() 11 | 12 | Lets your clients running in the web browser talk to a server with the Connect protocol: 13 | 14 | ```diff 15 | import { createClient } from "@connectrpc/connect"; 16 | + import { createConnectTransport } from "@connectrpc/connect-web"; 17 | import { ElizaService } from "./gen/eliza_connect.js"; 18 | 19 | + // A transport for clients using the Connect protocol with fetch() 20 | + const transport = createConnectTransport({ 21 | + baseUrl: "https://demo.connectrpc.com", 22 | + }); 23 | 24 | const client = createClient(ElizaService, transport); 25 | const { sentence } = await client.say({ sentence: "I feel happy." }); 26 | console.log(sentence) // you said: I feel happy. 27 | ``` 28 | 29 | ### createGrpcWebTransport() 30 | 31 | Lets your clients running in the web browser talk to a server with the gRPC-web protocol: 32 | 33 | ```diff 34 | import { createClient } from "@connectrpc/connect"; 35 | + import { createGrpcWebTransport } from "@connectrpc/connect-web"; 36 | import { ElizaService } from "./gen/eliza_connect.js"; 37 | 38 | + // A transport for clients using the Connect protocol with fetch() 39 | + const transport = createGrpcWebTransport({ 40 | + baseUrl: "https://demo.connectrpc.com", 41 | + }); 42 | 43 | const client = createClient(ElizaService, transport); 44 | const { sentence } = await client.say({ sentence: "I feel happy." }); 45 | console.log(sentence) // you said: I feel happy. 46 | ``` 47 | 48 | ## Getting started 49 | 50 | To get started with Connect, head over to the [docs](https://connectrpc.com/docs/node/getting-started) 51 | for a tutorial, or take a look at [our example](https://github.com/connectrpc/connect-es/tree/main/packages/example). 52 | 53 | Connect plays nice with Vue, Svelte, Remix, Next.js, Angular and many others. Take a look at 54 | [our examples](https://github.com/connectrpc/examples-es) for various frameworks. 55 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/@bufbuild/protobuf/README.md: -------------------------------------------------------------------------------- 1 | # @bufbuild/protobuf 2 | 3 | This package provides the runtime library for the [protoc-gen-es](https://www.npmjs.com/package/@bufbuild/protoc-gen-es) 4 | code generator plugin. 5 | 6 | ## Protocol Buffers for ECMAScript 7 | 8 | A complete implementation of [Protocol Buffers](https://protobuf.dev/) in TypeScript, 9 | suitable for web browsers and Node.js, created by [Buf](https://buf.build). 10 | 11 | **Protobuf-ES** is a solid, modern alternative to existing Protobuf implementations for the JavaScript ecosystem. It's 12 | the first project in this space to provide a comprehensive plugin framework and decouple the base types from RPC 13 | functionality. 14 | 15 | Some additional features that set it apart from the others: 16 | 17 | - ECMAScript module support 18 | - First-class TypeScript support 19 | - Generation of idiomatic JavaScript and TypeScript code 20 | - Generation of [much smaller bundles](https://github.com/bufbuild/protobuf-es/tree/main/packages/bundle-size/) 21 | - Implementation of all proto3 features, including the [canonical JSON format](https://protobuf.dev/programming-guides/proto3/#json) 22 | - Implementation of all proto2 features, except for extensions and the text format 23 | - Usage of standard JavaScript APIs instead of the [Closure Library](http://googlecode.blogspot.com/2009/11/introducing-closure-tools.html) 24 | - Compatibility is covered by the Protocol Buffers [conformance tests](https://github.com/bufbuild/protobuf-es/tree/main/packages/protobuf-conformance/) 25 | - Descriptor and reflection support 26 | 27 | ## Installation 28 | 29 | ```bash 30 | npm install @bufbuild/protobuf 31 | ``` 32 | 33 | ## Documentation 34 | 35 | To learn how to work with `@bufbuild/protobuf`, check out the docs for the [Runtime API](https://github.com/bufbuild/protobuf-es/tree/main/MANUAL.md#working-with-messages) 36 | and the [generated code](https://github.com/bufbuild/protobuf-es/tree/main/MANUAL.md#generated-code). 37 | 38 | Official documentation for the Protobuf-ES project can be found at [github.com/bufbuild/protobuf-es](https://github.com/bufbuild/protobuf-es). 39 | 40 | For more information on Buf, check out the official [Buf documentation](https://buf.build/docs/). 41 | 42 | ## Examples 43 | 44 | A complete code example can be found in the **Protobuf-ES** repo [here](https://github.com/bufbuild/protobuf-es/tree/main/packages/protobuf-example). 45 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/compare-versions/src/satisfies.ts: -------------------------------------------------------------------------------- 1 | import { compare } from './compare.js'; 2 | import { CompareOperator, compareSegments, validateAndParse } from './utils.js'; 3 | 4 | /** 5 | * Match [npm semver](https://docs.npmjs.com/cli/v6/using-npm/semver) version range. 6 | * 7 | * @param version Version number to match 8 | * @param range Range pattern for version 9 | * @returns `true` if the version number is within the range, `false` otherwise. 10 | * 11 | * @example 12 | * ``` 13 | * satisfies('1.1.0', '^1.0.0'); // return true 14 | * satisfies('1.1.0', '~1.0.0'); // return false 15 | * ``` 16 | */ 17 | export const satisfies = (version: string, range: string): boolean => { 18 | // clean input 19 | range = range.replace(/([><=]+)\s+/g, '$1'); 20 | 21 | // handle multiple comparators 22 | if (range.includes('||')) { 23 | return range.split('||').some((r) => satisfies(version, r)); 24 | } else if (range.includes(' - ')) { 25 | const [a, b] = range.split(' - ', 2); 26 | return satisfies(version, `>=${a} <=${b}`); 27 | } else if (range.includes(' ')) { 28 | return range 29 | .trim() 30 | .replace(/\s{2,}/g, ' ') 31 | .split(' ') 32 | .every((r) => satisfies(version, r)); 33 | } 34 | 35 | // if no range operator then "=" 36 | const m = range.match(/^([<>=~^]+)/); 37 | const op = m ? m[1] : '='; 38 | 39 | // if gt/lt/eq then operator compare 40 | if (op !== '^' && op !== '~') 41 | return compare(version, range, op as CompareOperator); 42 | 43 | // else range of either "~" or "^" is assumed 44 | const [v1, v2, v3, , vp] = validateAndParse(version); 45 | const [r1, r2, r3, , rp] = validateAndParse(range); 46 | const v = [v1, v2, v3]; 47 | const r = [r1, r2 ?? 'x', r3 ?? 'x']; 48 | 49 | // validate pre-release 50 | if (rp) { 51 | if (!vp) return false; 52 | if (compareSegments(v, r) !== 0) return false; 53 | if (compareSegments(vp.split('.'), rp.split('.')) === -1) return false; 54 | } 55 | 56 | // first non-zero number 57 | const nonZero = r.findIndex((v) => v !== '0') + 1; 58 | 59 | // pointer to where segments can be >= 60 | const i = op === '~' ? 2 : nonZero > 1 ? nonZero : 1; 61 | 62 | // before pointer must be equal 63 | if (compareSegments(v.slice(0, i), r.slice(0, i)) !== 0) return false; 64 | 65 | // after pointer must be >= 66 | if (compareSegments(v.slice(i), r.slice(i)) === -1) return false; 67 | 68 | return true; 69 | }; 70 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/src/assets/base.css: -------------------------------------------------------------------------------- 1 | /* color palette from */ 2 | :root { 3 | --vt-c-white: #ffffff; 4 | --vt-c-white-soft: #f8f8f8; 5 | --vt-c-white-mute: #f2f2f2; 6 | 7 | --vt-c-black: #181818; 8 | --vt-c-black-soft: #222222; 9 | --vt-c-black-mute: #282828; 10 | 11 | --vt-c-indigo: #2c3e50; 12 | 13 | --vt-c-divider-light-1: rgba(60, 60, 60, 0.29); 14 | --vt-c-divider-light-2: rgba(60, 60, 60, 0.12); 15 | --vt-c-divider-dark-1: rgba(84, 84, 84, 0.65); 16 | --vt-c-divider-dark-2: rgba(84, 84, 84, 0.48); 17 | 18 | --vt-c-text-light-1: var(--vt-c-indigo); 19 | --vt-c-text-light-2: rgba(60, 60, 60, 0.66); 20 | --vt-c-text-dark-1: var(--vt-c-white); 21 | --vt-c-text-dark-2: rgba(235, 235, 235, 0.64); 22 | } 23 | 24 | /* semantic color variables for this project */ 25 | :root { 26 | --color-background: var(--vt-c-white); 27 | --color-background-soft: var(--vt-c-white-soft); 28 | --color-background-mute: var(--vt-c-white-mute); 29 | 30 | --color-border: var(--vt-c-divider-light-2); 31 | --color-border-hover: var(--vt-c-divider-light-1); 32 | 33 | --color-heading: var(--vt-c-text-light-1); 34 | --color-text: var(--vt-c-text-light-1); 35 | 36 | --section-gap: 160px; 37 | } 38 | 39 | @media (prefers-color-scheme: dark) { 40 | :root { 41 | --color-background: var(--vt-c-black); 42 | --color-background-soft: var(--vt-c-black-soft); 43 | --color-background-mute: var(--vt-c-black-mute); 44 | 45 | --color-border: var(--vt-c-divider-dark-2); 46 | --color-border-hover: var(--vt-c-divider-dark-1); 47 | 48 | --color-heading: var(--vt-c-text-dark-1); 49 | --color-text: var(--vt-c-text-dark-2); 50 | } 51 | } 52 | 53 | *, 54 | *::before, 55 | *::after { 56 | box-sizing: border-box; 57 | margin: 0; 58 | font-weight: normal; 59 | } 60 | 61 | body { 62 | min-height: 100vh; 63 | color: var(--color-text); 64 | background: var(--color-background); 65 | transition: 66 | color 0.5s, 67 | background-color 0.5s; 68 | line-height: 1.6; 69 | font-family: 70 | Inter, 71 | -apple-system, 72 | BlinkMacSystemFont, 73 | 'Segoe UI', 74 | Roboto, 75 | Oxygen, 76 | Ubuntu, 77 | Cantarell, 78 | 'Fira Sans', 79 | 'Droid Sans', 80 | 'Helvetica Neue', 81 | sans-serif; 82 | font-size: 15px; 83 | text-rendering: optimizeLegibility; 84 | -webkit-font-smoothing: antialiased; 85 | -moz-osx-font-smoothing: grayscale; 86 | } 87 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/src/assets/base.css: -------------------------------------------------------------------------------- 1 | /* color palette from */ 2 | :root { 3 | --vt-c-white: #ffffff; 4 | --vt-c-white-soft: #f8f8f8; 5 | --vt-c-white-mute: #f2f2f2; 6 | 7 | --vt-c-black: #181818; 8 | --vt-c-black-soft: #222222; 9 | --vt-c-black-mute: #282828; 10 | 11 | --vt-c-indigo: #2c3e50; 12 | 13 | --vt-c-divider-light-1: rgba(60, 60, 60, 0.29); 14 | --vt-c-divider-light-2: rgba(60, 60, 60, 0.12); 15 | --vt-c-divider-dark-1: rgba(84, 84, 84, 0.65); 16 | --vt-c-divider-dark-2: rgba(84, 84, 84, 0.48); 17 | 18 | --vt-c-text-light-1: var(--vt-c-indigo); 19 | --vt-c-text-light-2: rgba(60, 60, 60, 0.66); 20 | --vt-c-text-dark-1: var(--vt-c-white); 21 | --vt-c-text-dark-2: rgba(235, 235, 235, 0.64); 22 | } 23 | 24 | /* semantic color variables for this project */ 25 | :root { 26 | --color-background: var(--vt-c-white); 27 | --color-background-soft: var(--vt-c-white-soft); 28 | --color-background-mute: var(--vt-c-white-mute); 29 | 30 | --color-border: var(--vt-c-divider-light-2); 31 | --color-border-hover: var(--vt-c-divider-light-1); 32 | 33 | --color-heading: var(--vt-c-text-light-1); 34 | --color-text: var(--vt-c-text-light-1); 35 | 36 | --section-gap: 160px; 37 | } 38 | 39 | @media (prefers-color-scheme: dark) { 40 | :root { 41 | --color-background: var(--vt-c-black); 42 | --color-background-soft: var(--vt-c-black-soft); 43 | --color-background-mute: var(--vt-c-black-mute); 44 | 45 | --color-border: var(--vt-c-divider-dark-2); 46 | --color-border-hover: var(--vt-c-divider-dark-1); 47 | 48 | --color-heading: var(--vt-c-text-dark-1); 49 | --color-text: var(--vt-c-text-dark-2); 50 | } 51 | } 52 | 53 | *, 54 | *::before, 55 | *::after { 56 | box-sizing: border-box; 57 | margin: 0; 58 | font-weight: normal; 59 | } 60 | 61 | body { 62 | min-height: 100vh; 63 | color: var(--color-text); 64 | background: var(--color-background); 65 | transition: 66 | color 0.5s, 67 | background-color 0.5s; 68 | line-height: 1.6; 69 | font-family: 70 | Inter, 71 | -apple-system, 72 | BlinkMacSystemFont, 73 | 'Segoe UI', 74 | Roboto, 75 | Oxygen, 76 | Ubuntu, 77 | Cantarell, 78 | 'Fira Sans', 79 | 'Droid Sans', 80 | 'Helvetica Neue', 81 | sans-serif; 82 | font-size: 15px; 83 | text-rendering: optimizeLegibility; 84 | -webkit-font-smoothing: antialiased; 85 | -moz-osx-font-smoothing: grayscale; 86 | } 87 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/openapi-typescript-helpers/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # openapi-typescript-helpers 2 | 3 | ## 0.0.8 4 | 5 | ### Patch Changes 6 | 7 | - [#1610](https://github.com/drwpow/openapi-typescript/pull/1610) [`cc8073b`](https://github.com/drwpow/openapi-typescript/commit/cc8073b3ee42e7aaa546a9c6a0553c300d8882de) Thanks [@illright](https://github.com/illright)! - Fix data/error discrimination when there are empty-body errors 8 | 9 | - [#1559](https://github.com/drwpow/openapi-typescript/pull/1559) [`6fe2c85`](https://github.com/drwpow/openapi-typescript/commit/6fe2c856331e910b9c8376fc151d63028dcfba11) Thanks [@drwpow](https://github.com/drwpow)! - Simplify build 10 | 11 | ## 0.0.7 12 | 13 | ### Patch Changes 14 | 15 | - [#1479](https://github.com/drwpow/openapi-typescript/pull/1479) [`c6d945b`](https://github.com/drwpow/openapi-typescript/commit/c6d945be717bb3999178fb3a77292e41e1b7ab80) Thanks [@darwish](https://github.com/darwish)! - Fixed build of openapi-typescript-helpers for CommonJS environments 16 | 17 | ## 0.0.6 18 | 19 | ### Patch Changes 20 | 21 | - [#1458](https://github.com/drwpow/openapi-typescript/pull/1458) [`23517a2`](https://github.com/drwpow/openapi-typescript/commit/23517a2c2ab94d49085391130cd7d11f4da33cfb) Thanks [@drwpow](https://github.com/drwpow)! - Add RequestBodyJSON helper 22 | 23 | ## 0.0.5 24 | 25 | ### Patch Changes 26 | 27 | - [#1456](https://github.com/drwpow/openapi-typescript/pull/1456) [`5be2082`](https://github.com/drwpow/openapi-typescript/commit/5be20827334c60e53222445561b9cfc526f4f6a9) Thanks [@drwpow](https://github.com/drwpow)! - Add SuccessResponseJSON, ErrorResponseJSON helpers 28 | 29 | ## 0.0.4 30 | 31 | ### Patch Changes 32 | 33 | - [#1366](https://github.com/drwpow/openapi-typescript/pull/1366) [`04dbd6d`](https://github.com/drwpow/openapi-typescript/commit/04dbd6d84fffd1d88300421bae25e946f1c303da) Thanks [@drwpow](https://github.com/drwpow)! - Add HasRequiredKeys helper 34 | 35 | ## 0.0.3 36 | 37 | ### Patch Changes 38 | 39 | - [#1357](https://github.com/drwpow/openapi-typescript/pull/1357) [`996e51e`](https://github.com/drwpow/openapi-typescript/commit/996e51e9b475f4818af77301ed5c0ab458736cb9) Thanks [@muttonchop](https://github.com/muttonchop)! - adds 500-511 error status codes 40 | 41 | ## 0.0.2 42 | 43 | ### Patch Changes 44 | 45 | - [#1326](https://github.com/drwpow/openapi-typescript/pull/1326) [`e63a345`](https://github.com/drwpow/openapi-typescript/commit/e63a34561c8137c4cfdef858a2272be32960ca4f) Thanks [@drwpow](https://github.com/drwpow)! - Fix type bug 46 | 47 | ## 0.0.0 48 | 49 | Initial release 50 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/platform/README.md: -------------------------------------------------------------------------------- 1 | # Platform.js v1.3.5 2 | 3 | A platform detection library that works on nearly all JavaScript platforms. 4 | 5 | ## Disclaimer 6 | 7 | Platform.js is for informational purposes only & **not** intended as a substitution for feature detection/inference checks. 8 | 9 | ## Documentation 10 | 11 | * [doc/README.md](https://github.com/bestiejs/platform.js/blob/master/doc/README.md#readme) 12 | * [wiki/Changelog](https://github.com/bestiejs/platform.js/wiki/Changelog) 13 | * [wiki/Roadmap](https://github.com/bestiejs/platform.js/wiki/Roadmap) 14 | * [platform.js demo](https://bestiejs.github.io/platform.js/) (See also [whatsmyua.info](https://www.whatsmyua.info/) for comparisons between platform.js and other platform detection libraries) 15 | 16 | ## Installation 17 | 18 | In a browser: 19 | 20 | ```html 21 | 22 | ``` 23 | 24 | In an AMD loader: 25 | 26 | ```js 27 | require(['platform'], function(platform) {/*…*/}); 28 | ``` 29 | 30 | Using npm: 31 | 32 | ```shell 33 | $ npm i --save platform 34 | ``` 35 | 36 | In Node.js: 37 | 38 | ```js 39 | var platform = require('platform'); 40 | ``` 41 | 42 | Usage example: 43 | 44 | ```js 45 | // on IE10 x86 platform preview running in IE7 compatibility mode on Windows 7 64 bit edition 46 | platform.name; // 'IE' 47 | platform.version; // '10.0' 48 | platform.layout; // 'Trident' 49 | platform.os; // 'Windows Server 2008 R2 / 7 x64' 50 | platform.description; // 'IE 10.0 x86 (platform preview; running in IE 7 mode) on Windows Server 2008 R2 / 7 x64' 51 | 52 | // or on an iPad 53 | platform.name; // 'Safari' 54 | platform.version; // '5.1' 55 | platform.product; // 'iPad' 56 | platform.manufacturer; // 'Apple' 57 | platform.layout; // 'WebKit' 58 | platform.os; // 'iOS 5.0' 59 | platform.description; // 'Safari 5.1 on Apple iPad (iOS 5.0)' 60 | 61 | // or parsing a given UA string 62 | var info = platform.parse('Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7.2; en; rv:2.0) Gecko/20100101 Firefox/4.0 Opera 11.52'); 63 | info.name; // 'Opera' 64 | info.version; // '11.52' 65 | info.layout; // 'Presto' 66 | info.os; // 'Mac OS X 10.7.2' 67 | info.description; // 'Opera 11.52 (identifying as Firefox 4.0) on Mac OS X 10.7.2' 68 | ``` 69 | 70 | ## Support 71 | 72 | Tested in Chrome 82-83, Firefox 77-78, IE 11, Edge 82-83, Safari 12-13, Node.js 4-14, & PhantomJS 2.1.1. 73 | 74 | ## BestieJS 75 | 76 | Platform.js is part of the BestieJS *“Best in Class”* module collection. This means we promote solid browser/environment support, ES5+ precedents, unit testing, & plenty of documentation. 77 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/openapi-fetch/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "openapi-fetch", 3 | "description": "Fast, type-safe fetch client for your OpenAPI schema. Only 5 kb (min). Works with React, Vue, Svelte, or vanilla JS.", 4 | "version": "0.9.8", 5 | "author": { 6 | "name": "Drew Powers", 7 | "email": "drew@pow.rs" 8 | }, 9 | "license": "MIT", 10 | "type": "module", 11 | "main": "./dist/index.js", 12 | "module": "./dist/index.js", 13 | "types": "./dist/index.d.ts", 14 | "exports": { 15 | ".": { 16 | "import": { 17 | "types": "./dist/index.d.ts", 18 | "default": "./dist/index.js" 19 | }, 20 | "require": { 21 | "types": "./dist/cjs/index.d.cts", 22 | "default": "./dist/cjs/index.cjs" 23 | } 24 | }, 25 | "./*": "./*" 26 | }, 27 | "homepage": "https://openapi-ts.dev", 28 | "repository": { 29 | "type": "git", 30 | "url": "https://github.com/openapi-ts/openapi-typescript", 31 | "directory": "packages/openapi-fetch" 32 | }, 33 | "bugs": { 34 | "url": "https://github.com/openapi-ts/openapi-typescript/issues" 35 | }, 36 | "keywords": [ 37 | "openapi", 38 | "swagger", 39 | "rest", 40 | "api", 41 | "oapi_3", 42 | "oapi_3_1", 43 | "typescript", 44 | "fetch", 45 | "react", 46 | "vue", 47 | "svelte" 48 | ], 49 | "dependencies": { 50 | "openapi-typescript-helpers": "^0.0.8" 51 | }, 52 | "devDependencies": { 53 | "axios": "^1.6.8", 54 | "del-cli": "^5.1.0", 55 | "esbuild": "^0.20.2", 56 | "execa": "^8.0.1", 57 | "msw": "^2.3.0", 58 | "openapi-typescript": "^6.x", 59 | "openapi-typescript-codegen": "^0.25.0", 60 | "openapi-typescript-fetch": "^2.0.0", 61 | "superagent": "^9.0.2", 62 | "typescript": "^5.4.5", 63 | "vitest": "^1.6.0" 64 | }, 65 | "scripts": { 66 | "build": "pnpm run build:clean && pnpm run build:js && pnpm run build:js-min && pnpm run build:cjs", 67 | "build:clean": "del-cli dist", 68 | "build:js": "mkdir -p dist && cp src/* dist", 69 | "build:js-min": "esbuild --bundle src/index.js --format=esm --minify --outfile=dist/index.min.js && cp dist/index.d.ts dist/index.min.d.ts", 70 | "build:cjs": "esbuild --bundle src/index.js --format=cjs --outfile=dist/cjs/index.cjs && cp dist/index.d.ts dist/cjs/index.d.cts", 71 | "format": "biome format . --write", 72 | "lint": "biome check .", 73 | "generate-types": "node ./scripts/generate-types.js", 74 | "pretest": "pnpm run generate-types", 75 | "test": "pnpm run \"/^test:/\"", 76 | "test:js": "vitest run", 77 | "test:ts": "tsc --noEmit", 78 | "version": "pnpm run prepare && pnpm run build" 79 | } 80 | } -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/@connectrpc/connect/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@connectrpc/connect", 3 | "version": "2.0.0-rc.3", 4 | "description": "Type-safe APIs with Protobuf and TypeScript.", 5 | "license": "Apache-2.0", 6 | "repository": { 7 | "type": "git", 8 | "url": "https://github.com/connectrpc/connect-es.git", 9 | "directory": "packages/connect" 10 | }, 11 | "scripts": { 12 | "generate": "buf generate", 13 | "postgenerate": "license-header src/protocol-grpc/gen", 14 | "prebuild": "rm -rf ./dist/*", 15 | "build": "npm run build:cjs && npm run build:esm", 16 | "build:cjs": "tsc --project tsconfig.json --module commonjs --verbatimModuleSyntax false --moduleResolution node10 --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'", 17 | "build:esm": "tsc --project tsconfig.json --outDir ./dist/esm --declaration --declarationDir ./dist/esm", 18 | "postbuild": "node scripts/update-user-agent.mjs", 19 | "test": "jasmine --config=jasmine.json", 20 | "format": "prettier --write --ignore-unknown '.' '!dist' '!src/protocol-grpc/gen'", 21 | "license-header": "license-header", 22 | "lint": "eslint --max-warnings 0 .", 23 | "attw": "attw --pack" 24 | }, 25 | "type": "module", 26 | "sideEffects": false, 27 | "main": "./dist/cjs/index.js", 28 | "exports": { 29 | ".": { 30 | "import": "./dist/esm/index.js", 31 | "require": "./dist/cjs/index.js" 32 | }, 33 | "./protocol": { 34 | "import": "./dist/esm/protocol/index.js", 35 | "require": "./dist/cjs/protocol/index.js" 36 | }, 37 | "./protocol-connect": { 38 | "import": "./dist/esm/protocol-connect/index.js", 39 | "require": "./dist/cjs/protocol-connect/index.js" 40 | }, 41 | "./protocol-grpc": { 42 | "import": "./dist/esm/protocol-grpc/index.js", 43 | "require": "./dist/cjs/protocol-grpc/index.js" 44 | }, 45 | "./protocol-grpc-web": { 46 | "import": "./dist/esm/protocol-grpc-web/index.js", 47 | "require": "./dist/cjs/protocol-grpc-web/index.js" 48 | } 49 | }, 50 | "typesVersions": { 51 | "*": { 52 | "protocol": [ 53 | "./dist/cjs/protocol/index.d.ts" 54 | ], 55 | "protocol-connect": [ 56 | "./dist/cjs/protocol-connect/index.d.ts" 57 | ], 58 | "protocol-grpc": [ 59 | "./dist/cjs/protocol-grpc/index.d.ts" 60 | ], 61 | "protocol-grpc-web": [ 62 | "./dist/cjs/protocol-grpc-web/index.d.ts" 63 | ] 64 | } 65 | }, 66 | "peerDependencies": { 67 | "@bufbuild/protobuf": "^2.2.0" 68 | }, 69 | "devDependencies": { 70 | "@bufbuild/buf": "^1.46.0", 71 | "@bufbuild/protoc-gen-es": "^2.2.2", 72 | "@types/jasmine": "^5.0.0", 73 | "jasmine": "^5.2.0" 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/@connectrpc/connect/README.md: -------------------------------------------------------------------------------- 1 | # @connectrpc/connect 2 | 3 | Connect is a family of libraries for building type-safe APIs with different languages and platforms. 4 | [@connectrpc/connect](https://www.npmjs.com/package/@connectrpc/connect) brings them to TypeScript, 5 | the web browser, and to Node.js. 6 | 7 | With Connect, you define your schema first: 8 | 9 | ``` 10 | service ElizaService { 11 | rpc Say(SayRequest) returns (SayResponse) {} 12 | } 13 | ``` 14 | 15 | And with the magic of code generation, this schema produces servers and clients: 16 | 17 | ```ts 18 | const answer = await eliza.say({ sentence: "I feel happy." }); 19 | console.log(answer); 20 | // {sentence: 'When you feel happy, what do you do?'} 21 | ``` 22 | 23 | Unlike REST, the RPCs you use with Connect are typesafe end to end, but they are 24 | regular HTTP under the hood. You can see all requests in the network inspector, 25 | and you can `curl` them if you want: 26 | 27 | ```shell 28 | curl \ 29 | --header 'Content-Type: application/json' \ 30 | --data '{"sentence": "I feel happy."}' \ 31 | https://demo.connectrpc.com/connectrpc.eliza.v1.ElizaService/Say 32 | ``` 33 | 34 | With Connect for ECMAScript, you can spin up a service in Node.js and call it 35 | from the web, the terminal, or native mobile clients. Under the hood, it uses 36 | [Protocol Buffers](https://github.com/bufbuild/protobuf-es) for the schema, and 37 | implements RPC (remote procedure calls) with three protocols: The widely available 38 | gRPC and gRPC-web, and Connect's [own protocol](https://connectrpc.com/docs/protocol/), 39 | optimized for the web. This gives you unparalleled interoperability with 40 | full-stack type-safety. 41 | 42 | ## Get started on the web 43 | 44 | Follow our [10 minute tutorial](https://connectrpc.com/docs/web/getting-started) where 45 | we use [Vite](https://vitejs.dev/) and [React](https://reactjs.org/) to create a 46 | web interface for ELIZA. 47 | 48 | **React**, **Svelte**, **Vue**, **Next.js** and **Angular** are supported (see [examples](https://github.com/connectrpc/examples-es)), 49 | and we have an expansion pack for [TanStack Query](https://github.com/connectrpc/connect-query-es). 50 | We support all modern web browsers that implement the widely available 51 | [fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) 52 | and the [Encoding API](https://developer.mozilla.org/en-US/docs/Web/API/Encoding_API). 53 | 54 | ## Get started on Node.js 55 | 56 | Follow our [10 minute tutorial](https://connectrpc.com/docs/node/getting-started) 57 | to spin up a service in Node.js, and call it from the web, and from a gRPC client 58 | in your terminal. 59 | 60 | You can use vanilla Node.js, or our server plugins for [Fastify](https://www.fastify.io/) 61 | or [Express](https://expressjs.com/). We support the builtin `http`, and `http2` 62 | modules on Node.js v18.14.1 and later. 63 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/@bufbuild/protobuf/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@bufbuild/protobuf", 3 | "version": "2.7.0", 4 | "license": "(Apache-2.0 AND BSD-3-Clause)", 5 | "description": "A complete implementation of Protocol Buffers in TypeScript, suitable for web browsers and Node.js.", 6 | "keywords": ["protobuf", "schema", "typescript", "ecmascript"], 7 | "repository": { 8 | "type": "git", 9 | "url": "https://github.com/bufbuild/protobuf-es.git", 10 | "directory": "packages/protobuf" 11 | }, 12 | "scripts": { 13 | "prebuild": "rm -rf ./dist/*", 14 | "build": "npm run build:cjs && npm run build:esm", 15 | "build:cjs": "../../node_modules/typescript/bin/tsc --project tsconfig.json --module commonjs --verbatimModuleSyntax false --moduleResolution node10 --outDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'", 16 | "build:esm": "../../node_modules/typescript/bin/tsc --project tsconfig.json --outDir ./dist/esm", 17 | "bootstrap": "npm run bootstrap:inject && npm run bootstrap:wkt", 18 | "bootstrap:inject": "node scripts/bootstrap-inject.mjs src", 19 | "bootstrap:wkt": "protoc --es_out=src/wkt/gen --es_opt=bootstrap_wkt=true,target=ts,import_extension=js,json_types=true --proto_path $(upstream-include wkt) $(upstream-files wkt)", 20 | "postbootstrap:wkt": "license-header src/wkt/gen", 21 | "format": "biome format --write", 22 | "license-header": "license-header --ignore 'src/wire/varint.ts'", 23 | "lint": "biome lint --error-on-warnings", 24 | "attw": "attw --pack" 25 | }, 26 | "type": "module", 27 | "sideEffects": false, 28 | "main": "./dist/cjs/index.js", 29 | "exports": { 30 | ".": { 31 | "import": "./dist/esm/index.js", 32 | "require": "./dist/cjs/index.js" 33 | }, 34 | "./codegenv1": { 35 | "import": "./dist/esm/codegenv1/index.js", 36 | "require": "./dist/cjs/codegenv1/index.js" 37 | }, 38 | "./codegenv2": { 39 | "import": "./dist/esm/codegenv2/index.js", 40 | "require": "./dist/cjs/codegenv2/index.js" 41 | }, 42 | "./reflect": { 43 | "import": "./dist/esm/reflect/index.js", 44 | "require": "./dist/cjs/reflect/index.js" 45 | }, 46 | "./wkt": { 47 | "import": "./dist/esm/wkt/index.js", 48 | "require": "./dist/cjs/wkt/index.js" 49 | }, 50 | "./wire": { 51 | "import": "./dist/esm/wire/index.js", 52 | "require": "./dist/cjs/wire/index.js" 53 | } 54 | }, 55 | "typesVersions": { 56 | "*": { 57 | "codegenv1": ["./dist/cjs/codegenv1/index.d.ts"], 58 | "codegenv2": ["./dist/cjs/codegenv2/index.d.ts"], 59 | "reflect": ["./dist/cjs/reflect/index.d.ts"], 60 | "wkt": ["./dist/cjs/wkt/index.d.ts"], 61 | "wire": ["./dist/cjs/wire/index.d.ts"] 62 | } 63 | }, 64 | "devDependencies": { 65 | "upstream-protobuf": "*" 66 | }, 67 | "files": ["dist/**"] 68 | } 69 | -------------------------------------------------------------------------------- /hf_space/sandbox/constants.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Constants for sandbox. 3 | ''' 4 | 5 | import os 6 | 7 | E2B_API_KEY = os.environ.get("E2B_API_KEY") 8 | ''' 9 | API key for the e2b API. 10 | ''' 11 | 12 | AZURE_BLOB_STORAGE_CONNECTION_STRING = os.environ.get("AZURE_STORAGE_CONNECTION_STRING") 13 | ''' 14 | API key for the Azure Blob Storage. 15 | ''' 16 | 17 | AZURE_BLOB_STORAGE_CONTAINER_NAME = "softwarearenalogs" 18 | ''' 19 | Contianer name for the Azure Blob Storage. 20 | ''' 21 | 22 | SANDBOX_TEMPLATE_ID: str = "bxq9sha9l55ytsyfturr" 23 | ''' 24 | Template ID for the sandbox. 25 | ''' 26 | 27 | SANDBOX_NGINX_PORT: int = 8000 28 | ''' 29 | Nginx port for the sandbox. 30 | ''' 31 | 32 | SANDBOX_TIMEOUT_SECONDS: int = 5 * 60 33 | ''' 34 | Timeout in seconds for created sandboxes to expire. 35 | ''' 36 | 37 | CODE_RUN_TIMEOUT_SECONDS: int = 60 38 | ''' 39 | Timeout in seconds for code execution. 40 | ''' 41 | 42 | SANDBOX_RETRY_COUNT: int = 3 43 | ''' 44 | Number of times to retry the sandbox creation. 45 | ''' 46 | 47 | INSTALLED_PYPI_PACKAGES = [ 48 | "boto3", 49 | "botocore", 50 | "urllib3", 51 | "setuptools", 52 | "requests", 53 | "certifi", 54 | "idna", 55 | "charset-normalizer", 56 | "packaging", 57 | "typing-extensions", 58 | "python-dateutil", 59 | "aiobotocore", 60 | "s3transfer", 61 | "grpcio-status", 62 | "pyyaml", 63 | "six", 64 | "fsspec", 65 | "s3fs", 66 | "numpy", 67 | "wheel", 68 | "pip", 69 | "cryptography", 70 | "awscli", 71 | "pydantic", 72 | "cffi", 73 | "attrs", 74 | "google-api-core", 75 | "pycparser", 76 | "pandas", 77 | "importlib-metadata", 78 | "jmespath", 79 | "click", 80 | "zipp", 81 | "rsa", 82 | "pyasn1", 83 | "markupsafe", 84 | "pytz", 85 | "colorama", 86 | "protobuf", 87 | "platformdirs", 88 | "jinja2", 89 | "rich", 90 | "tomli", 91 | "pytest", 92 | "pydantic-core", 93 | "pyjwt", 94 | "pluggy", 95 | "aiohttp", 96 | "virtualenv", 97 | "jsonschema", 98 | "googleapis-common-protos", 99 | "cachetools", 100 | "google-auth", 101 | "filelock", 102 | "wrapt", 103 | "sqlalchemy", 104 | "docutils", 105 | "pyasn1-modules", 106 | "pyarrow", 107 | "greenlet", 108 | "iniconfig", 109 | "pygments", 110 | "annotated-types", 111 | "yarl", 112 | "requests-oauthlib", 113 | "tzdata", 114 | "psutil", 115 | "multidict", 116 | "pyparsing", 117 | "requests-toolbelt", 118 | "exceptiongroup", 119 | "werkzeug", 120 | "soupsieve", 121 | "oauthlib", 122 | "beautifulsoup4", 123 | "frozenlist", 124 | "more-itertools", 125 | "distlib", 126 | "tomlkit", 127 | "pathspec", 128 | "aiosignal", 129 | "grpcio", 130 | "tqdm", 131 | "scipy", 132 | "async-timeout", 133 | "pillow", 134 | "isodate", 135 | "anyio", 136 | "sortedcontainers", 137 | "decorator", 138 | "markdown-it-py", 139 | "deprecated", 140 | "mypy-extensions", 141 | "sniffio", 142 | "httpx", 143 | "coverage", 144 | "openpyxl", 145 | "flask", 146 | "rpds-py", 147 | "et-xmlfile" 148 | ] -------------------------------------------------------------------------------- /autocodearena/utils/bedrock_utils.py: -------------------------------------------------------------------------------- 1 | import json 2 | import sys 3 | import re 4 | 5 | def create_llama3_body(messages, max_gen_len=2048, temperature=0.0, top_p=0.9, top_k=1): 6 | """ 7 | Create a request body for Llama 3 models. 8 | 9 | Args: 10 | messages (list): List of message dictionaries. 11 | max_gen_len (int): Maximum generation length. 12 | temperature (float): Temperature for sampling. 13 | top_p (float): Top-p sampling parameter. 14 | top_k (int): Top-k sampling parameter. 15 | 16 | Returns: 17 | str: JSON-encoded string representing the request body for Llama 3 models. 18 | 19 | This function formats the input messages into a prompt suitable for Llama 3 models, 20 | including specific formatting tags, and creates a structured request body. 21 | """ 22 | prompt = "\n".join([content for message in messages for content in message["content"]]) 23 | formatted_prompt = f""" 24 | <|begin_of_text|> 25 | <|start_header_id|>user<|end_header_id|> 26 | {prompt.strip()} 27 | <|eot_id|> 28 | <|start_header_id|>assistant<|end_header_id|> 29 | """ 30 | return json.dumps({ 31 | "prompt": formatted_prompt, 32 | "max_gen_len": max_gen_len, 33 | "temperature": temperature, 34 | "top_p": top_p, 35 | }) 36 | 37 | 38 | def extract_innermost_text(content): 39 | """Recursively extract the innermost `text` value from a deeply nested structure.""" 40 | if isinstance(content, list) and content: # If content is a list, dive into the first element 41 | return extract_innermost_text(content[0]) 42 | elif isinstance(content, dict) and "text" in content: # If content is a dictionary, dive into the 'text' key 43 | return extract_innermost_text(content["text"]) 44 | elif isinstance(content, str): # Base case: return the string when reached 45 | return content 46 | return "" # Fallback in case the structure is invalid 47 | 48 | def create_nova_messages(messages): 49 | """ 50 | Create messages array for Nova models from conversation 51 | 52 | Args: 53 | conv (object): Conversation object containing messages 54 | 55 | Returns: 56 | list: List of formatted messages for Nova model 57 | """ 58 | messages_formatted = [] 59 | # Format the first message with template 60 | for mesg in messages: 61 | # Transform the message 62 | transformed_message = { 63 | "role": mesg["role"], 64 | "content": extract_innermost_text(mesg["content"]) 65 | } 66 | messages_formatted.append({ 67 | "role": "user", 68 | "content": [ 69 | { 70 | "text": transformed_message['content'] 71 | } 72 | ] 73 | }) 74 | return messages_formatted 75 | 76 | def extract_answer(text): 77 | """ 78 | Extract the content after the tag. 79 | 80 | Args: 81 | text (str): Input text that may contain a tag 82 | 83 | Returns: 84 | str: Text after the tag, or the original text if tag not found 85 | """ 86 | # Look for the tag 87 | match = re.search(r'(.*)', text, re.DOTALL) 88 | 89 | if match: 90 | # Return only the content after the tag 91 | return match.group(1).strip() 92 | else: 93 | # If tag not found, return empty string 94 | return "" 95 | 96 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/@connectrpc/connect-web/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@connectrpc/connect-web", 3 | "version": "2.0.0-rc.3", 4 | "license": "Apache-2.0", 5 | "repository": { 6 | "type": "git", 7 | "url": "https://github.com/connectrpc/connect-es.git", 8 | "directory": "packages/connect-web" 9 | }, 10 | "scripts": { 11 | "prebuild": "rm -rf ./dist/*", 12 | "build": "npm run build:cjs && npm run build:esm", 13 | "build:cjs": "tsc --project tsconfig.build.json --module commonjs --verbatimModuleSyntax false --moduleResolution node10 --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'", 14 | "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm --declaration --declarationDir ./dist/esm", 15 | "conformance:safari": "npm run conformance:safari:promise && npm run conformance:client:safari:callback", 16 | "conformance:safari:promise": "connectconformance --mode client --conf conformance/conformance-web.yaml -- tsx conformance/client.ts --browser safari", 17 | "conformance:safari:callback": "connectconformance --mode client --conf conformance/conformance-web.yaml -- tsx conformance/client.ts --browser safari --useCallbackClient", 18 | "conformance:chrome:promise": "connectconformance --mode client --conf conformance/conformance-web.yaml -- tsx conformance/client.ts --browser chrome", 19 | "conformance:chrome:callback": "connectconformance --mode client --conf conformance/conformance-web.yaml -- tsx conformance/client.ts --browser chrome --useCallbackClient", 20 | "conformance:firefox:promise": "connectconformance --mode client --conf conformance/conformance-web.yaml -- tsx conformance/client.ts --browser firefox", 21 | "conformance:firefox:callback": "connectconformance --mode client --conf conformance/conformance-web.yaml -- tsx conformance/client.ts --browser firefox --useCallbackClient", 22 | "conformance:node:promise": "connectconformance --mode client --conf conformance/conformance-web-node.yaml -- tsx conformance/client.ts --browser node", 23 | "conformance:node:callback": "connectconformance --mode client --conf conformance/conformance-web-node.yaml -- tsx conformance/client.ts --browser node --useCallbackClient", 24 | "test": "jasmine --config=jasmine.json", 25 | "generate": "buf generate --template browserstack/buf.gen.yaml", 26 | "postgenerate": "license-header browserstack/gen", 27 | "test-browserstack": "wdio run ./browserstack/wdio.browserstack.conf.js", 28 | "format": "prettier --write --ignore-unknown '.' '!dist' '!browserstack/gen'", 29 | "license-header": "license-header", 30 | "lint": "eslint --max-warnings 0 .", 31 | "attw": "attw --pack" 32 | }, 33 | "type": "module", 34 | "sideEffects": false, 35 | "main": "./dist/cjs/index.js", 36 | "exports": { 37 | ".": { 38 | "import": "./dist/esm/index.js", 39 | "require": "./dist/cjs/index.js" 40 | } 41 | }, 42 | "devDependencies": { 43 | "@bufbuild/buf": "^1.46.0", 44 | "@bufbuild/protoc-gen-es": "^2.2.2", 45 | "@connectrpc/connect-conformance": "^2.0.0-rc.3", 46 | "@wdio/browserstack-service": "^9.2.8", 47 | "@wdio/cli": "^9.2.8", 48 | "@wdio/jasmine-framework": "^9.2.8", 49 | "@wdio/local-runner": "^9.2.8", 50 | "jasmine": "^5.2.0", 51 | "webdriverio": "^9.2.8" 52 | }, 53 | "peerDependencies": { 54 | "@bufbuild/protobuf": "^2.2.0", 55 | "@connectrpc/connect": "2.0.0-rc.3" 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/e2b/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "e2b", 3 | "version": "2.0.3", 4 | "description": "E2B SDK that give agents cloud environments", 5 | "homepage": "https://e2b.dev", 6 | "license": "MIT", 7 | "author": { 8 | "name": "FoundryLabs, Inc.", 9 | "email": "hello@e2b.dev", 10 | "url": "https://e2b.dev" 11 | }, 12 | "bugs": "https://github.com/e2b-dev/e2b/issues", 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/e2b-dev/e2b", 16 | "directory": "packages/js-sdk" 17 | }, 18 | "publishConfig": { 19 | "access": "public" 20 | }, 21 | "sideEffects": false, 22 | "main": "dist/index.js", 23 | "module": "dist/index.mjs", 24 | "types": "dist/index.d.ts", 25 | "devDependencies": { 26 | "@testing-library/react": "^16.2.0", 27 | "@types/node": "^18.18.6", 28 | "@types/platform": "^1.3.6", 29 | "@types/react": "^18.3.11", 30 | "@typescript-eslint/eslint-plugin": "^7.11.0", 31 | "@typescript-eslint/parser": "^7.11.0", 32 | "@vitejs/plugin-react": "^4.3.4", 33 | "@vitest/browser": "^3.1.1", 34 | "dotenv": "^16.4.5", 35 | "eslint": "^8.57.1", 36 | "knip": "^5.43.6", 37 | "npm-check-updates": "^16.14.20", 38 | "npm-run-all": "^4.1.5", 39 | "openapi-typescript": "^7.6.1", 40 | "playwright": "^1.48.0", 41 | "react": "^18.3.1", 42 | "tsup": "^8.4.0", 43 | "typedoc": "0.26.8", 44 | "typedoc-plugin-markdown": "4.2.7", 45 | "typescript": "^5.4.5", 46 | "vitest": "^3.1.1", 47 | "vitest-browser-react": "^0.1.1" 48 | }, 49 | "files": [ 50 | "dist", 51 | "README.md", 52 | "package.json" 53 | ], 54 | "keywords": [ 55 | "e2b", 56 | "ai-agents", 57 | "agents", 58 | "ai", 59 | "code-interpreter", 60 | "sandbox", 61 | "code", 62 | "runtime", 63 | "vm", 64 | "nodejs", 65 | "javascript", 66 | "typescript" 67 | ], 68 | "dependencies": { 69 | "@bufbuild/protobuf": "^2.6.2", 70 | "@connectrpc/connect": "2.0.0-rc.3", 71 | "@connectrpc/connect-web": "2.0.0-rc.3", 72 | "compare-versions": "^6.1.0", 73 | "openapi-fetch": "^0.9.7", 74 | "platform": "^1.3.6" 75 | }, 76 | "engines": { 77 | "node": ">=18" 78 | }, 79 | "browserslist": [ 80 | "defaults" 81 | ], 82 | "scripts": { 83 | "build": "tsc --noEmit && tsup", 84 | "dev": "tsup --watch", 85 | "example": "tsx example.mts", 86 | "test": "vitest run", 87 | "generate": "npm-run-all generate:* && pnpm run format", 88 | "generate:api": "python ./../../spec/remove_extra_tags.py sandboxes templates auth && openapi-typescript ../../spec/openapi_generated.yml -x api_key --array-length --alphabetize --output src/api/schema.gen.ts", 89 | "generate:envd": "cd ../../spec/envd && buf generate --template buf-js.gen.yaml\n", 90 | "generate:envd-api": "openapi-typescript ../../spec/envd/envd.yaml -x api_key --array-length --alphabetize --output src/envd/schema.gen.ts", 91 | "generate-ref": "./scripts/generate_sdk_ref.sh", 92 | "check-deps": "knip", 93 | "update-deps": "ncu -u && pnpm i", 94 | "postPublish": "./scripts/post-publish.sh || true", 95 | "test:bun": "bun test tests/runtimes/bun --env-file=.env", 96 | "test:deno": "deno test tests/runtimes/deno/ --allow-net --allow-read --allow-env --unstable-sloppy-imports --trace-leaks", 97 | "test:integration": "E2B_INTEGRATION_TEST=1 vitest run tests/integration/**", 98 | "lint": "eslint src/ tests/", 99 | "format": "prettier --write src/ tests/ example.mts" 100 | } 101 | } -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/vue_app/src/components/TheWelcome.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 95 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/vue_app/src/components/TheWelcome.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 95 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/.package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "e2b_sandbox_template", 3 | "lockfileVersion": 3, 4 | "requires": true, 5 | "packages": { 6 | "node_modules/@bufbuild/protobuf": { 7 | "version": "2.7.0", 8 | "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.7.0.tgz", 9 | "integrity": "sha512-qn6tAIZEw5i/wiESBF4nQxZkl86aY4KoO0IkUa2Lh+rya64oTOdJQFlZuMwI1Qz9VBJQrQC4QlSA2DNek5gCOA==", 10 | "license": "(Apache-2.0 AND BSD-3-Clause)" 11 | }, 12 | "node_modules/@connectrpc/connect": { 13 | "version": "2.0.0-rc.3", 14 | "resolved": "https://registry.npmjs.org/@connectrpc/connect/-/connect-2.0.0-rc.3.tgz", 15 | "integrity": "sha512-ARBt64yEyKbanyRETTjcjJuHr2YXorzQo0etyS5+P6oSeW8xEuzajA9g+zDnMcj1hlX2dQE93foIWQGfpru7gQ==", 16 | "license": "Apache-2.0", 17 | "peerDependencies": { 18 | "@bufbuild/protobuf": "^2.2.0" 19 | } 20 | }, 21 | "node_modules/@connectrpc/connect-web": { 22 | "version": "2.0.0-rc.3", 23 | "resolved": "https://registry.npmjs.org/@connectrpc/connect-web/-/connect-web-2.0.0-rc.3.tgz", 24 | "integrity": "sha512-w88P8Lsn5CCsA7MFRl2e6oLY4J/5toiNtJns/YJrlyQaWOy3RO8pDgkz+iIkG98RPMhj2thuBvsd3Cn4DKKCkw==", 25 | "license": "Apache-2.0", 26 | "peerDependencies": { 27 | "@bufbuild/protobuf": "^2.2.0", 28 | "@connectrpc/connect": "2.0.0-rc.3" 29 | } 30 | }, 31 | "node_modules/@e2b/code-interpreter": { 32 | "version": "2.0.0", 33 | "resolved": "https://registry.npmjs.org/@e2b/code-interpreter/-/code-interpreter-2.0.0.tgz", 34 | "integrity": "sha512-rCIW4dV544sUx2YQB/hhwDrK6sQzIb5lr5h/1CIVoOIRgU9q3NUxsFj+2OsgWd4rMG8l6b/oA7FVZJwP4sGX/A==", 35 | "license": "MIT", 36 | "dependencies": { 37 | "e2b": "^2.0.1" 38 | }, 39 | "engines": { 40 | "node": ">=18" 41 | } 42 | }, 43 | "node_modules/compare-versions": { 44 | "version": "6.1.1", 45 | "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.1.tgz", 46 | "integrity": "sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg==", 47 | "license": "MIT" 48 | }, 49 | "node_modules/e2b": { 50 | "version": "2.0.3", 51 | "resolved": "https://registry.npmjs.org/e2b/-/e2b-2.0.3.tgz", 52 | "integrity": "sha512-YDI4LPrbq0CZPdB0EP/qK2pCB61a/a4KK94VqSKP5tLfY/kiaViZCsjNGPWEYsfjCcwQU5MFmrzhwgy/C0uO2A==", 53 | "license": "MIT", 54 | "dependencies": { 55 | "@bufbuild/protobuf": "^2.6.2", 56 | "@connectrpc/connect": "2.0.0-rc.3", 57 | "@connectrpc/connect-web": "2.0.0-rc.3", 58 | "compare-versions": "^6.1.0", 59 | "openapi-fetch": "^0.9.7", 60 | "platform": "^1.3.6" 61 | }, 62 | "engines": { 63 | "node": ">=18" 64 | } 65 | }, 66 | "node_modules/openapi-fetch": { 67 | "version": "0.9.8", 68 | "resolved": "https://registry.npmjs.org/openapi-fetch/-/openapi-fetch-0.9.8.tgz", 69 | "integrity": "sha512-zM6elH0EZStD/gSiNlcPrzXcVQ/pZo3BDvC6CDwRDUt1dDzxlshpmQnpD6cZaJ39THaSmwVCxxRrPKNM1hHrDg==", 70 | "license": "MIT", 71 | "dependencies": { 72 | "openapi-typescript-helpers": "^0.0.8" 73 | } 74 | }, 75 | "node_modules/openapi-typescript-helpers": { 76 | "version": "0.0.8", 77 | "resolved": "https://registry.npmjs.org/openapi-typescript-helpers/-/openapi-typescript-helpers-0.0.8.tgz", 78 | "integrity": "sha512-1eNjQtbfNi5Z/kFhagDIaIRj6qqDzhjNJKz8cmMW0CVdGwT6e1GLbAfgI0d28VTJa1A8jz82jm/4dG8qNoNS8g==", 79 | "license": "MIT" 80 | }, 81 | "node_modules/platform": { 82 | "version": "1.3.6", 83 | "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz", 84 | "integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==", 85 | "license": "MIT" 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /autocodearena/e2b_sandbox_template/e2b.Dockerfile: -------------------------------------------------------------------------------- 1 | # e2b base image 2 | FROM --platform=linux/x86_64 e2bdev/code-interpreter:latest 3 | # FROM node:21-slim 4 | 5 | RUN apt-get update 6 | # Install Python 7 | RUN apt-get install -y python3 8 | 9 | # Install nginx 10 | RUN sudo apt-get install -y nginx 11 | # Add Nginx configuration and serve with Nginx 12 | COPY nginx/nginx.conf /etc/nginx/sites-enabled/default 13 | # CMD ["nginx", "-g", "daemon off;"] 14 | 15 | # Install build tools for C and C++ 16 | RUN apt-get install -y build-essential 17 | # Install build tools for C# 18 | # RUN apt-get install -y dotnet-sdk-8.0 19 | # Install build tools for Golang 20 | RUN apt-get install -y golang 21 | # Install build tools for Java 22 | RUN apt-get install -y default-jdk 23 | # Install build tools for Rust 24 | RUN apt-get install -y rustc 25 | 26 | # install ffmpeg for pygame 27 | RUN apt-get install -y ffmpeg 28 | 29 | # Pre-Install Python packages 30 | RUN pip install uv 31 | RUN pip install boto3 \ 32 | botocore \ 33 | urllib3 \ 34 | setuptools \ 35 | requests \ 36 | certifi \ 37 | idna \ 38 | charset-normalizer \ 39 | packaging \ 40 | typing-extensions \ 41 | python-dateutil \ 42 | aiobotocore \ 43 | s3transfer \ 44 | grpcio-status \ 45 | pyyaml \ 46 | six \ 47 | fsspec \ 48 | s3fs \ 49 | wheel \ 50 | pip \ 51 | cryptography \ 52 | awscli \ 53 | pydantic \ 54 | cffi \ 55 | attrs \ 56 | google-api-core \ 57 | pycparser \ 58 | pandas \ 59 | importlib-metadata \ 60 | jmespath \ 61 | click \ 62 | zipp \ 63 | rsa \ 64 | pyasn1 \ 65 | markupsafe \ 66 | pytz \ 67 | colorama \ 68 | protobuf \ 69 | platformdirs \ 70 | jinja2 \ 71 | rich \ 72 | tomli \ 73 | pytest \ 74 | pydantic-core \ 75 | pyjwt \ 76 | pluggy \ 77 | aiohttp \ 78 | virtualenv \ 79 | jsonschema \ 80 | googleapis-common-protos \ 81 | cachetools \ 82 | google-auth \ 83 | filelock \ 84 | wrapt \ 85 | sqlalchemy \ 86 | docutils \ 87 | pyasn1-modules \ 88 | pyarrow \ 89 | greenlet \ 90 | iniconfig \ 91 | pygments \ 92 | annotated-types \ 93 | yarl \ 94 | requests-oauthlib \ 95 | tzdata \ 96 | psutil \ 97 | multidict \ 98 | pyparsing \ 99 | requests-toolbelt \ 100 | exceptiongroup \ 101 | werkzeug \ 102 | soupsieve \ 103 | oauthlib \ 104 | beautifulsoup4 \ 105 | frozenlist \ 106 | more-itertools \ 107 | distlib \ 108 | tomlkit \ 109 | pathspec \ 110 | aiosignal \ 111 | grpcio \ 112 | tqdm \ 113 | scipy \ 114 | async-timeout \ 115 | pillow \ 116 | isodate \ 117 | anyio \ 118 | sortedcontainers \ 119 | decorator \ 120 | markdown-it-py \ 121 | deprecated \ 122 | mypy-extensions \ 123 | sniffio \ 124 | httpx \ 125 | coverage \ 126 | openpyxl \ 127 | flask \ 128 | rpds-py \ 129 | et-xmlfile 130 | 131 | RUN uv pip install --system pandas matplotlib requests seaborn plotly 132 | RUN uv pip install --system pygame pygbag black 133 | RUN uv pip install --system --upgrade streamlit gradio nicegui 134 | RUN pip install numpy==1.26 135 | 136 | # Build container_app 137 | WORKDIR /home/user/container_app 138 | COPY container_app/ ./ 139 | RUN npm install 140 | RUN npm run build 141 | 142 | # Prepare html app 143 | WORKDIR /home/user/html_app 144 | COPY html_app/ ./ 145 | 146 | # Prepare & Build react app 147 | WORKDIR /home/user/react_app 148 | COPY react_app/ ./ 149 | RUN npm install 150 | RUN npm run build 151 | 152 | # Prepare & Build vue app 153 | WORKDIR /home/user/vue_app 154 | COPY vue_app/ ./ 155 | RUN npm install 156 | RUN npm run build 157 | 158 | # Prepare pygame app 159 | WORKDIR /home/user/pygame_app 160 | COPY pygame_app/ ./ 161 | 162 | # Prepare gradio app 163 | WORKDIR /home/user/gradio_app 164 | COPY gradio_app/ ./ -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "e2b_sandbox_template", 3 | "lockfileVersion": 3, 4 | "requires": true, 5 | "packages": { 6 | "": { 7 | "dependencies": { 8 | "@e2b/code-interpreter": "^2.0.0" 9 | } 10 | }, 11 | "node_modules/@bufbuild/protobuf": { 12 | "version": "2.7.0", 13 | "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.7.0.tgz", 14 | "integrity": "sha512-qn6tAIZEw5i/wiESBF4nQxZkl86aY4KoO0IkUa2Lh+rya64oTOdJQFlZuMwI1Qz9VBJQrQC4QlSA2DNek5gCOA==", 15 | "license": "(Apache-2.0 AND BSD-3-Clause)" 16 | }, 17 | "node_modules/@connectrpc/connect": { 18 | "version": "2.0.0-rc.3", 19 | "resolved": "https://registry.npmjs.org/@connectrpc/connect/-/connect-2.0.0-rc.3.tgz", 20 | "integrity": "sha512-ARBt64yEyKbanyRETTjcjJuHr2YXorzQo0etyS5+P6oSeW8xEuzajA9g+zDnMcj1hlX2dQE93foIWQGfpru7gQ==", 21 | "license": "Apache-2.0", 22 | "peerDependencies": { 23 | "@bufbuild/protobuf": "^2.2.0" 24 | } 25 | }, 26 | "node_modules/@connectrpc/connect-web": { 27 | "version": "2.0.0-rc.3", 28 | "resolved": "https://registry.npmjs.org/@connectrpc/connect-web/-/connect-web-2.0.0-rc.3.tgz", 29 | "integrity": "sha512-w88P8Lsn5CCsA7MFRl2e6oLY4J/5toiNtJns/YJrlyQaWOy3RO8pDgkz+iIkG98RPMhj2thuBvsd3Cn4DKKCkw==", 30 | "license": "Apache-2.0", 31 | "peerDependencies": { 32 | "@bufbuild/protobuf": "^2.2.0", 33 | "@connectrpc/connect": "2.0.0-rc.3" 34 | } 35 | }, 36 | "node_modules/@e2b/code-interpreter": { 37 | "version": "2.0.0", 38 | "resolved": "https://registry.npmjs.org/@e2b/code-interpreter/-/code-interpreter-2.0.0.tgz", 39 | "integrity": "sha512-rCIW4dV544sUx2YQB/hhwDrK6sQzIb5lr5h/1CIVoOIRgU9q3NUxsFj+2OsgWd4rMG8l6b/oA7FVZJwP4sGX/A==", 40 | "license": "MIT", 41 | "dependencies": { 42 | "e2b": "^2.0.1" 43 | }, 44 | "engines": { 45 | "node": ">=18" 46 | } 47 | }, 48 | "node_modules/compare-versions": { 49 | "version": "6.1.1", 50 | "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.1.tgz", 51 | "integrity": "sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg==", 52 | "license": "MIT" 53 | }, 54 | "node_modules/e2b": { 55 | "version": "2.0.3", 56 | "resolved": "https://registry.npmjs.org/e2b/-/e2b-2.0.3.tgz", 57 | "integrity": "sha512-YDI4LPrbq0CZPdB0EP/qK2pCB61a/a4KK94VqSKP5tLfY/kiaViZCsjNGPWEYsfjCcwQU5MFmrzhwgy/C0uO2A==", 58 | "license": "MIT", 59 | "dependencies": { 60 | "@bufbuild/protobuf": "^2.6.2", 61 | "@connectrpc/connect": "2.0.0-rc.3", 62 | "@connectrpc/connect-web": "2.0.0-rc.3", 63 | "compare-versions": "^6.1.0", 64 | "openapi-fetch": "^0.9.7", 65 | "platform": "^1.3.6" 66 | }, 67 | "engines": { 68 | "node": ">=18" 69 | } 70 | }, 71 | "node_modules/openapi-fetch": { 72 | "version": "0.9.8", 73 | "resolved": "https://registry.npmjs.org/openapi-fetch/-/openapi-fetch-0.9.8.tgz", 74 | "integrity": "sha512-zM6elH0EZStD/gSiNlcPrzXcVQ/pZo3BDvC6CDwRDUt1dDzxlshpmQnpD6cZaJ39THaSmwVCxxRrPKNM1hHrDg==", 75 | "license": "MIT", 76 | "dependencies": { 77 | "openapi-typescript-helpers": "^0.0.8" 78 | } 79 | }, 80 | "node_modules/openapi-typescript-helpers": { 81 | "version": "0.0.8", 82 | "resolved": "https://registry.npmjs.org/openapi-typescript-helpers/-/openapi-typescript-helpers-0.0.8.tgz", 83 | "integrity": "sha512-1eNjQtbfNi5Z/kFhagDIaIRj6qqDzhjNJKz8cmMW0CVdGwT6e1GLbAfgI0d28VTJa1A8jz82jm/4dG8qNoNS8g==", 84 | "license": "MIT" 85 | }, 86 | "node_modules/platform": { 87 | "version": "1.3.6", 88 | "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz", 89 | "integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==", 90 | "license": "MIT" 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/e2b.Dockerfile: -------------------------------------------------------------------------------- 1 | # e2b base image 2 | FROM --platform=linux/x86_64 e2bdev/code-interpreter:latest 3 | # FROM node:21-slim 4 | 5 | RUN apt-get update 6 | # Install Python 7 | RUN apt-get install -y python3 8 | 9 | # Install nginx 10 | RUN sudo apt-get install -y nginx 11 | # Add Nginx configuration and serve with Nginx 12 | COPY nginx/nginx.conf /etc/nginx/sites-enabled/default 13 | # CMD ["nginx", "-g", "daemon off;"] 14 | 15 | # Install build tools for C and C++ 16 | RUN apt-get install -y build-essential 17 | # Install build tools for C# 18 | # RUN apt-get install -y dotnet-sdk-8.0 19 | # Install build tools for Golang 20 | RUN apt-get install -y golang 21 | # Install build tools for Java 22 | RUN apt-get install -y default-jdk 23 | # Install build tools for Rust 24 | RUN apt-get install -y rustc 25 | 26 | # install ffmpeg for pygame 27 | RUN apt-get install -y ffmpeg 28 | 29 | # Pre-Install Python packages 30 | RUN pip install uv 31 | RUN uv pip install --system boto3 \ 32 | botocore \ 33 | urllib3 \ 34 | setuptools \ 35 | requests \ 36 | certifi \ 37 | idna \ 38 | charset-normalizer \ 39 | packaging \ 40 | typing-extensions \ 41 | python-dateutil \ 42 | aiobotocore \ 43 | s3transfer \ 44 | grpcio-status \ 45 | pyyaml \ 46 | six \ 47 | fsspec \ 48 | s3fs \ 49 | wheel \ 50 | pip \ 51 | cryptography \ 52 | awscli \ 53 | pydantic \ 54 | cffi \ 55 | attrs \ 56 | google-api-core \ 57 | pycparser \ 58 | pandas \ 59 | importlib-metadata \ 60 | jmespath \ 61 | click \ 62 | zipp \ 63 | rsa \ 64 | pyasn1 \ 65 | markupsafe \ 66 | pytz \ 67 | colorama \ 68 | protobuf \ 69 | platformdirs \ 70 | jinja2 \ 71 | rich \ 72 | tomli \ 73 | pytest \ 74 | pydantic-core \ 75 | pyjwt \ 76 | pluggy \ 77 | aiohttp \ 78 | virtualenv \ 79 | jsonschema \ 80 | googleapis-common-protos \ 81 | cachetools \ 82 | google-auth \ 83 | filelock \ 84 | wrapt \ 85 | sqlalchemy \ 86 | docutils \ 87 | pyasn1-modules \ 88 | pyarrow \ 89 | greenlet \ 90 | iniconfig \ 91 | pygments \ 92 | annotated-types \ 93 | yarl \ 94 | requests-oauthlib \ 95 | tzdata \ 96 | psutil \ 97 | multidict \ 98 | pyparsing \ 99 | requests-toolbelt \ 100 | exceptiongroup \ 101 | werkzeug \ 102 | soupsieve \ 103 | oauthlib \ 104 | beautifulsoup4 \ 105 | frozenlist \ 106 | more-itertools \ 107 | distlib \ 108 | tomlkit \ 109 | pathspec \ 110 | aiosignal \ 111 | grpcio \ 112 | tqdm \ 113 | scipy \ 114 | async-timeout \ 115 | pillow \ 116 | isodate \ 117 | anyio \ 118 | sortedcontainers \ 119 | decorator \ 120 | markdown-it-py \ 121 | deprecated \ 122 | mypy-extensions \ 123 | sniffio \ 124 | httpx \ 125 | coverage \ 126 | openpyxl \ 127 | flask \ 128 | rpds-py \ 129 | et-xmlfile 130 | 131 | RUN uv pip install --system pandas matplotlib requests seaborn plotly 132 | RUN uv pip install --system pygame pygbag black 133 | RUN uv pip install --system --upgrade streamlit gradio nicegui 134 | RUN uv pip install --system numpy==1.26 135 | 136 | RUN sudo npm install -g npm@latest 137 | # Build container_app 138 | WORKDIR /home/user/container_app 139 | COPY container_app/ ./ 140 | RUN npm install 141 | RUN npm run build 142 | 143 | # Prepare html app 144 | WORKDIR /home/user/html_app 145 | COPY html_app/ ./ 146 | 147 | # Prepare & Build react app 148 | WORKDIR /home/user/react_app 149 | COPY react_app/ ./ 150 | RUN npm install 151 | RUN npm install update-browserslist-db 152 | RUN npm run build 153 | 154 | # Prepare & Build vue app 155 | WORKDIR /home/user/vue_app 156 | COPY vue_app/ ./ 157 | RUN npm install 158 | RUN npm install update-browserslist-db 159 | RUN npm run build 160 | 161 | # Prepare pygame app 162 | WORKDIR /home/user/pygame_app 163 | COPY pygame_app/ ./ 164 | 165 | RUN mkdir -p /home/user/.streamlit/ 166 | RUN echo "\ 167 | [server]\n\ 168 | port = 8501\n\ 169 | enableXsrfProtection=false\n\ 170 | enableCORS = false\n\ 171 | \n\ 172 | " > /home/user/.streamlit/config.toml 173 | 174 | # Prepare gradio app 175 | WORKDIR /home/user/gradio_app 176 | COPY gradio_app/ ./ -------------------------------------------------------------------------------- /bigcodereward/config/judge_model_config.yaml: -------------------------------------------------------------------------------- 1 | # Judge Model Configuration for BigCodeReward 2 | # This file defines the mappings and settings for different judge models 3 | 4 | # Model ID mappings - maps short names to full model identifiers 5 | model_mappings: 6 | # Claude series (Bedrock) 7 | sonnet35v2: 8 | model_id: bedrock/us.anthropic.claude-3-5-sonnet-20241022-v2:0 9 | api_type: litellm 10 | context_limit: 200000 11 | min_request_interval: 1.0 12 | 13 | haiku35v1: 14 | model_id: bedrock/us.anthropic.claude-3-5-haiku-20241022-v1:0 15 | api_type: litellm 16 | context_limit: 200000 17 | min_request_interval: 1.0 18 | 19 | sonnet37v1: 20 | model_id: bedrock/us.anthropic.claude-3-7-sonnet-20250219-v1:0 21 | api_type: litellm 22 | context_limit: 200000 23 | min_request_interval: 1.0 24 | 25 | sonnet4: 26 | model_id: bedrock/us.anthropic.claude-sonnet-4-20250514-v1:0 27 | api_type: litellm 28 | context_limit: 200000 29 | min_request_interval: 1.0 30 | 31 | # OpenAI series 32 | gpt-4o: 33 | model_id: gpt-4o 34 | api_type: openai 35 | context_limit: 128000 36 | min_request_interval: 1.0 37 | 38 | gpt-4o-mini: 39 | model_id: gpt-4o-mini 40 | api_type: openai 41 | context_limit: 128000 42 | min_request_interval: 1.0 43 | 44 | gpt-4.1: 45 | model_id: gpt-4.1-2025-04-14 46 | api_type: openai 47 | context_limit: 128000 48 | min_request_interval: 1.0 49 | 50 | gpt-4.1-mini: 51 | model_id: gpt-4.1-mini-2025-04-14 52 | api_type: openai 53 | context_limit: 128000 54 | min_request_interval: 1.0 55 | 56 | # SGLang locally deployed models (accessed via OpenAI compatible API) 57 | qwen2.5-vl-32b: 58 | model_id: openai/Qwen/Qwen2.5-VL-32B-Instruct 59 | api_type: sglang 60 | context_limit: 128000 61 | min_request_interval: 0.001 62 | api_base: http://localhost:30000/v1 63 | 64 | qwen2.5-vl-72b: 65 | model_id: openai/Qwen/Qwen2.5-VL-72B-Instruct 66 | api_type: sglang 67 | context_limit: 128000 68 | min_request_interval: 0.001 69 | api_base: http://localhost:30000/v1 70 | 71 | glm-4.5v: 72 | model_id: openai/zai-org/GLM-4.5v 73 | api_type: sglang 74 | context_limit: 130000 75 | min_request_interval: 0.001 76 | api_base: http://localhost:30000/v1 77 | 78 | gemma-3-27b: 79 | model_id: openai/google/gemma-3-27b-it 80 | api_type: sglang 81 | context_limit: 128000 82 | min_request_interval: 0.001 83 | api_base: http://localhost:30000/v1 84 | custom_model_path: /mnt/people/zhuoterq/xiaolong-swebench/hf_cache/google_gemma-3-27b-it 85 | 86 | OpenGVLab_InternVL3-38B: 87 | model_id: openai/OpenGVLab_InternVL3-38B 88 | api_type: sglang 89 | context_limit: 80000 90 | min_request_interval: 0.001 91 | api_base: http://localhost:30000/v1 92 | custom_model_path: /mnt/people/zhuoterq/xiaolong-swebench/hf_cache/OpenGVLab_InternVL3-38B 93 | 94 | OpenGVLab_InternVL3-78B: 95 | model_id: openai/OpenGVLab_InternVL3-78B 96 | api_type: sglang 97 | context_limit: 80000 98 | min_request_interval: 0.001 99 | api_base: http://localhost:30000/v1 100 | custom_model_path: /mnt/people/zhuoterq/xiaolong-swebench/hf_cache/OpenGVLab_InternVL3-78B 101 | 102 | XiaomiMiMo_MiMo-VL-7B-RL: 103 | model_id: openai/XiaomiMiMo/MiMo-VL-7B-RL 104 | api_type: sglang 105 | context_limit: 80000 106 | min_request_interval: 0.001 107 | api_base: http://localhost:30000/v1 108 | 109 | MiniMaxAI_MiniMax-VL-01: 110 | model_id: openai/MiniMaxAI/MiniMax-VL-01 111 | api_type: sglang 112 | context_limit: 80000 113 | min_request_interval: 0.001 114 | api_base: http://localhost:30000/v1 115 | 116 | moonshotai_Kimi-VL-A3B-Thinking-2506: 117 | model_id: openai/moonshotai/Kimi-VL-A3B-Thinking-2506 118 | api_type: sglang 119 | context_limit: 131072 120 | min_request_interval: 0.001 121 | api_base: http://localhost:30000/v1 122 | custom_model_path: moonshotai/Kimi-VL-A3B-Thinking-2506 123 | 124 | # Content truncation settings 125 | content_limits: 126 | max_code_length: 20000 127 | max_instruction_length: 5000 128 | max_output_length: 3000 129 | reserved_tokens: 10000 130 | 131 | # Image processing settings 132 | image_settings: 133 | enable_screenshot_compression: true 134 | screenshot_max_size: [1024, 768] 135 | screenshot_quality: 70 136 | max_image_size: [1024, 1024] 137 | jpeg_quality: 85 138 | 139 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/openapi-typescript-helpers/index.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types */ 2 | 3 | // HTTP types 4 | 5 | export type HttpMethod = 6 | | "get" 7 | | "put" 8 | | "post" 9 | | "delete" 10 | | "options" 11 | | "head" 12 | | "patch" 13 | | "trace"; 14 | /** 2XX statuses */ 15 | export type OkStatus = 200 | 201 | 202 | 203 | 204 | 206 | 207 | "2XX"; 16 | // prettier-ignore 17 | /** 4XX and 5XX statuses */ 18 | export type ErrorStatus = 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 | '5XX' | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 429 | 431 | 444 | 450 | 451 | 497 | 498 | 499 | '4XX' | "default"; 19 | 20 | // OpenAPI type helpers 21 | 22 | /** Given an OpenAPI **Paths Object**, find all paths that have the given method */ 23 | export type PathsWithMethod< 24 | Paths extends {}, 25 | PathnameMethod extends HttpMethod, 26 | > = { 27 | [Pathname in keyof Paths]: Paths[Pathname] extends { 28 | [K in PathnameMethod]: any; 29 | } 30 | ? Pathname 31 | : never; 32 | }[keyof Paths]; 33 | /** DO NOT USE! Only used only for OperationObject type inference */ 34 | export interface OperationObject { 35 | parameters: any; 36 | requestBody: any; // note: "any" will get overridden in inference 37 | responses: any; 38 | } 39 | /** Internal helper used in PathsWithMethod */ 40 | export type PathItemObject = { 41 | [M in HttpMethod]: OperationObject; 42 | } & { parameters?: any }; 43 | /** Return `responses` for an Operation Object */ 44 | export type ResponseObjectMap = T extends { responses: any } 45 | ? T["responses"] 46 | : unknown; 47 | /** Return `content` for a Response Object */ 48 | export type ResponseContent = T extends { content: any } 49 | ? T["content"] 50 | : unknown; 51 | /** Return `requestBody` for an Operation Object */ 52 | export type OperationRequestBody = T extends { requestBody?: any } 53 | ? T["requestBody"] 54 | : never; 55 | /** Internal helper used in OperationRequestBodyContent */ 56 | export type OperationRequestBodyMediaContent = 57 | undefined extends OperationRequestBody 58 | ? FilterKeys>, "content"> | undefined 59 | : FilterKeys, "content">; 60 | /** Return first `content` from a Request Object Mapping, allowing any media type */ 61 | export type OperationRequestBodyContent = 62 | FilterKeys, MediaType> extends never 63 | ? 64 | | FilterKeys< 65 | NonNullable>, 66 | MediaType 67 | > 68 | | undefined 69 | : FilterKeys, MediaType>; 70 | /** Return first 2XX response from a Response Object Map */ 71 | export type SuccessResponse = ResponseContent>; 72 | /** Return first 5XX or 4XX response (in that order) from a Response Object Map */ 73 | export type ErrorResponse = ResponseContent>; 74 | /** Return first JSON-like 2XX response from a path + HTTP method */ 75 | export type SuccessResponseJSON = JSONLike< 76 | SuccessResponse> 77 | >; 78 | /** Return first JSON-like 5XX or 4XX response from a path + HTTP method */ 79 | export type ErrorResponseJSON = JSONLike< 80 | ErrorResponse> 81 | >; 82 | /** Return JSON-like request body from a path + HTTP method */ 83 | export type RequestBodyJSON = JSONLike< 84 | ResponseContent> 85 | >; 86 | 87 | // Generic TS utils 88 | 89 | /** Find first match of multiple keys */ 90 | export type FilterKeys = Obj[keyof Obj & Matchers]; 91 | /** Get the type of a value of an input object with a given key. If the key is not found, return a default type. Works with unions of objects too. */ 92 | export type GetValueWithDefault = Obj extends any ? (FilterKeys extends never ? Default : FilterKeys) : never; 93 | 94 | /** Return any `[string]/[string]` media type (important because openapi-fetch allows any content response, not just JSON-like) */ 95 | export type MediaType = `${string}/${string}`; 96 | /** Return any media type containing "json" (works for "application/json", "application/vnd.api+json", "application/vnd.oai.openapi+json") */ 97 | export type JSONLike = FilterKeys; 98 | /** Filter objects that have required keys */ 99 | export type FindRequiredKeys = K extends unknown 100 | ? undefined extends T[K] 101 | ? never 102 | : K 103 | : K; 104 | /** Does this object contain required keys? */ 105 | export type HasRequiredKeys = FindRequiredKeys; 106 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/compare-versions/README.md: -------------------------------------------------------------------------------- 1 | # compare-versions 2 | 3 | [![Build Status](https://github.com/omichelsen/compare-versions/actions/workflows/ci.yml/badge.svg)](https://github.com/omichelsen/compare-versions/actions/workflows/ci.yml) 4 | [![Coverage Status](https://coveralls.io/repos/omichelsen/compare-versions/badge.svg?branch=main&service=github)](https://coveralls.io/github/omichelsen/compare-versions?branch=main) 5 | [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/compare-versions.svg)](https://bundlephobia.com/package/compare-versions) 6 | 7 | Compare [semver](https://semver.org/) version strings to find greater, equal or lesser. Runs in the browser as well as Node.js/React Native etc. Has no dependencies and is [tiny](https://bundlephobia.com/package/compare-versions). 8 | 9 | Supports the full semver specification including versions with different number of digits like `1.0.0`, `1.0`, `1` and pre-releases like `1.0.0-alpha`. Additionally supports the following variations: 10 | 11 | - Wildcards for minor and patch version like `1.0.x` or `1.0.*`. 12 | - [Chromium version numbers](https://www.chromium.org/developers/version-numbers) with 4 parts, e.g. version `25.0.1364.126`. 13 | - Any leading `v` is ignored, e.g. `v1.0` is interpreted as `1.0`. 14 | - Leading zero is ignored, e.g. `1.01.1` is interpreted as `1.1.1`. 15 | - [npm version ranges](https://docs.npmjs.com/cli/v6/using-npm/semver#ranges), e.g. `1.2.7 || >=1.2.9 <2.0.0` 16 | 17 | ## Install 18 | 19 | ```bash 20 | $ npm install compare-versions 21 | ``` 22 | 23 | __Note__: Starting from v5 the main export is now _named_ like so: `import { compareVersions } from 'compare-versions'`. 24 | 25 | __Note__: Starting from v4 this library includes a ESM version which will automatically be selected by your bundler (webpack, parcel etc). The CJS/UMD version is `lib/umd/index.js` and the new ESM version is `lib/esm/index.js`. 26 | 27 | ## Usage 28 | 29 | Will return `1` if first version is greater, `0` if versions are equal, and `-1` if the second version is greater: 30 | 31 | ```js 32 | import { compareVersions } from 'compare-versions'; 33 | 34 | compareVersions('11.1.1', '10.0.0'); // 1 35 | compareVersions('10.0.0', '10.0.0'); // 0 36 | compareVersions('10.0.0', '11.1.1'); // -1 37 | ``` 38 | 39 | Can also be used for sorting: 40 | 41 | ```js 42 | const versions = [ 43 | '1.5.19', 44 | '1.2.3', 45 | '1.5.5' 46 | ] 47 | const sorted = versions.sort(compareVersions); 48 | /* 49 | [ 50 | '1.2.3', 51 | '1.5.5', 52 | '1.5.19' 53 | ] 54 | */ 55 | ``` 56 | 57 | ### "Human Readable" Compare 58 | 59 | The alternative `compare` function accepts an operator which will be more familiar to humans: 60 | 61 | ```js 62 | import { compare } from 'compare-versions'; 63 | 64 | compare('10.1.8', '10.0.4', '>'); // true 65 | compare('10.0.1', '10.0.1', '='); // true 66 | compare('10.1.1', '10.2.2', '<'); // true 67 | compare('10.1.1', '10.2.2', '<='); // true 68 | compare('10.1.1', '10.2.2', '>='); // false 69 | ``` 70 | 71 | ### Version ranges 72 | 73 | The `satisfies` function accepts a range to compare, compatible with [npm package versioning](https://docs.npmjs.com/cli/v6/using-npm/semver): 74 | 75 | ```js 76 | import { satisfies } from 'compare-versions'; 77 | 78 | satisfies('10.0.1', '~10.0.0'); // true 79 | satisfies('10.1.0', '~10.0.0'); // false 80 | satisfies('10.1.2', '^10.0.0'); // true 81 | satisfies('11.0.0', '^10.0.0'); // false 82 | satisfies('10.1.8', '>10.0.4'); // true 83 | satisfies('10.0.1', '=10.0.1'); // true 84 | satisfies('10.1.1', '<10.2.2'); // true 85 | satisfies('10.1.1', '<=10.2.2'); // true 86 | satisfies('10.1.1', '>=10.2.2'); // false 87 | satisfies('1.4.6', '1.2.7 || >=1.2.9 <2.0.0'); // true 88 | satisfies('1.2.8', '1.2.7 || >=1.2.9 <2.0.0'); // false 89 | satisfies('1.5.1', '1.2.3 - 2.3.4'); // true 90 | satisfies('2.3.5', '1.2.3 - 2.3.4'); // false 91 | ``` 92 | 93 | ### Validate version numbers 94 | 95 | Applies the same rules used comparing version numbers and returns a boolean: 96 | 97 | ```js 98 | import { validate } from 'compare-versions'; 99 | 100 | validate('1.0.0-rc.1'); // true 101 | validate('1.0-rc.1'); // false 102 | validate('foo'); // false 103 | ``` 104 | 105 | ### Validate version numbers (strict) 106 | 107 | Validate version numbers strictly according to semver.org; 3 integers, no wildcards, no leading zero or "v" etc: 108 | 109 | ```js 110 | import { validateStrict } from 'compare-versions'; 111 | 112 | validate('1.0.0'); // true 113 | validate('1.0.0-rc.1'); // true 114 | validate('1.0'); // false 115 | validate('1.x'); // false 116 | validate('v1.02'); // false 117 | ``` 118 | 119 | ### Browser 120 | 121 | If included directly in the browser, the functions above are available on the global window under the `compareVersions` object: 122 | 123 | ```html 124 | 125 | 133 | ``` 134 | -------------------------------------------------------------------------------- /hf_space/e2b_sandbox_template/node_modules/openapi-fetch/README.md: -------------------------------------------------------------------------------- 1 | openapi-fetch 2 | 3 | openapi-fetch is a type-safe fetch client that pulls in your OpenAPI schema. Weighs **4 kB** and has virtually zero runtime. Works with React, Vue, Svelte, or vanilla JS. 4 | 5 | | Library | Size (min) | “GET” request\* | 6 | | :------------------------- | ---------: | :------------------------- | 7 | | openapi-fetch | `5 kB` | `300k` ops/s (fastest) | 8 | | openapi-typescript-fetch | `4 kB` | `150k` ops/s (2× slower) | 9 | | axios | `32 kB` | `225k` ops/s (1.3× slower) | 10 | | superagent | `55 kB` | `50k` ops/s (6× slower) | 11 | | openapi-typescript-codegen | `367 kB` | `100k` ops/s (3× slower) | 12 | 13 | _\* [Benchmarks are approximate](https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-fetch/test/index.bench.js) to just show rough baseline and will differ among machines and browsers. The relative performance between libraries is more reliable._ 14 | 15 | The syntax is inspired by popular libraries like react-query or Apollo client, but without all the bells and whistles and in a 2 kB package. 16 | 17 | ```ts 18 | import createClient from "openapi-fetch"; 19 | import type { paths } from "./my-openapi-3-schema"; // generated by openapi-typescript 20 | 21 | const client = createClient({ baseUrl: "https://myapi.dev/v1/" }); 22 | 23 | const { 24 | data, // only present if 2XX response 25 | error, // only present if 4XX or 5XX response 26 | } = await client.GET("/blogposts/{post_id}", { 27 | params: { 28 | path: { post_id: "123" }, 29 | }, 30 | }); 31 | 32 | await client.PUT("/blogposts", { 33 | body: { 34 | title: "My New Post", 35 | }, 36 | }); 37 | ``` 38 | 39 | `data` and `error` are typechecked and expose their shapes to Intellisense in VS Code (and any other IDE with TypeScript support). Likewise, the request `body` will also typecheck its fields, erring if any required params are missing, or if there’s a type mismatch. 40 | 41 | `GET`, `PUT`, `POST`, etc. are only thin wrappers around the native [fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) (which you can [swap for any call](https://openapi-ts.dev/openapi-fetch/api/#create-client)). 42 | 43 | Notice there are no generics, and no manual typing. Your endpoint’s request and response were inferred automatically. This is a huge improvement in the type safety of your endpoints because **every manual assertion could lead to a bug**! This eliminates all of the following: 44 | 45 | - ✅ No typos in URLs or params 46 | - ✅ All parameters, request bodies, and responses are type-checked and 100% match your schema 47 | - ✅ No manual typing of your API 48 | - ✅ Eliminates `any` types that hide bugs 49 | - ✅ Also eliminates `as` type overrides that can also hide bugs 50 | - ✅ All of this in a **5 kb** client package 🎉 51 | 52 | ## 🔧 Setup 53 | 54 | Install this library along with [openapi-typescript](../openapi-typescript): 55 | 56 | ```bash 57 | npm i openapi-fetch 58 | npm i -D openapi-typescript typescript 59 | ``` 60 | 61 | > **Highly recommended**: enable [noUncheckedIndexedAccess](https://www.typescriptlang.org/tsconfig#noUncheckedIndexedAccess) in your `tsconfig.json` ([docs](/advanced#enable-nouncheckedindexaccess-in-your-tsconfigjson)) 62 | 63 | Next, generate TypeScript types from your OpenAPI schema using openapi-typescript: 64 | 65 | ```bash 66 | npx openapi-typescript ./path/to/api/v1.yaml -o ./src/lib/api/v1.d.ts 67 | ``` 68 | 69 | > ⚠️ Be sure to validate your schemas! openapi-typescript will err on invalid schemas. 70 | 71 | Lastly, be sure to **run typechecking** in your project. This can be done by adding `tsc --noEmit` to your npm scripts like so: 72 | 73 | ```json 74 | { 75 | "scripts": { 76 | "test:ts": "tsc --noEmit" 77 | } 78 | } 79 | ``` 80 | 81 | And run `npm run test:ts` in your CI to catch type errors. 82 | 83 | > **Tip**: use `tsc --noEmit` to check for type errors rather than relying on your linter or your build command. Nothing will typecheck as accurately as the TypeScript compiler itself. 84 | 85 | ## Usage 86 | 87 | The best part about using openapi-fetch over oldschool codegen is no documentation needed. openapi-fetch encourages using your existing OpenAPI documentation rather than trying to find what function to import, or what parameters that function wants: 88 | 89 | ![OpenAPI schema example](../../docs/public/assets/openapi-schema.png) 90 | 91 | ```ts 92 | import createClient from "openapi-fetch"; 93 | import type { paths } from "./my-openapi-3-schema"; // generated by openapi-typescript 94 | 95 | const client = createClient({ baseUrl: "https://myapi.dev/v1/" }); 96 | 97 | const { data, error } = await client.GET("/blogposts/{post_id}", { 98 | params: { 99 | path: { post_id: "my-post" }, 100 | query: { version: 2 }, 101 | }, 102 | }); 103 | 104 | const { data, error } = await client.PUT("/blogposts", { 105 | body: { 106 | title: "New Post", 107 | body: "

New post body

", 108 | publish_date: new Date("2023-03-01T12:00:00Z").getTime(), 109 | }, 110 | }); 111 | ``` 112 | 113 | 1. The HTTP method is pulled directly from `createClient()` 114 | 2. You pass in your desired `path` to `GET()`, `PUT()`, etc. 115 | 3. TypeScript takes over the rest and returns helpful errors for anything missing or invalid 116 | 117 | ## 📓 Docs 118 | 119 | [View Docs](https://openapi-ts.dev/openapi-fetch/) 120 | --------------------------------------------------------------------------------