EvoScientist 0.0.1.dev4__py3-none-any.whl → 0.1.0rc2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. EvoScientist/EvoScientist.py +25 -61
  2. EvoScientist/__init__.py +0 -19
  3. EvoScientist/backends.py +0 -26
  4. EvoScientist/cli.py +1365 -480
  5. EvoScientist/middleware.py +7 -56
  6. EvoScientist/skills/clip/SKILL.md +253 -0
  7. EvoScientist/skills/clip/references/applications.md +207 -0
  8. EvoScientist/skills/langgraph-docs/SKILL.md +36 -0
  9. EvoScientist/skills/tensorboard/SKILL.md +629 -0
  10. EvoScientist/skills/tensorboard/references/integrations.md +638 -0
  11. EvoScientist/skills/tensorboard/references/profiling.md +545 -0
  12. EvoScientist/skills/tensorboard/references/visualization.md +620 -0
  13. EvoScientist/skills/vllm/SKILL.md +364 -0
  14. EvoScientist/skills/vllm/references/optimization.md +226 -0
  15. EvoScientist/skills/vllm/references/quantization.md +284 -0
  16. EvoScientist/skills/vllm/references/server-deployment.md +255 -0
  17. EvoScientist/skills/vllm/references/troubleshooting.md +447 -0
  18. EvoScientist/stream/__init__.py +0 -25
  19. EvoScientist/stream/utils.py +16 -23
  20. EvoScientist/tools.py +2 -75
  21. {evoscientist-0.0.1.dev4.dist-info → evoscientist-0.1.0rc2.dist-info}/METADATA +8 -153
  22. {evoscientist-0.0.1.dev4.dist-info → evoscientist-0.1.0rc2.dist-info}/RECORD +26 -24
  23. evoscientist-0.1.0rc2.dist-info/entry_points.txt +2 -0
  24. EvoScientist/config.py +0 -274
  25. EvoScientist/llm/__init__.py +0 -21
  26. EvoScientist/llm/models.py +0 -99
  27. EvoScientist/memory.py +0 -715
  28. EvoScientist/onboard.py +0 -725
  29. EvoScientist/paths.py +0 -44
  30. EvoScientist/skills_manager.py +0 -391
  31. EvoScientist/stream/display.py +0 -604
  32. EvoScientist/stream/events.py +0 -415
  33. EvoScientist/stream/state.py +0 -343
  34. evoscientist-0.0.1.dev4.dist-info/entry_points.txt +0 -5
  35. {evoscientist-0.0.1.dev4.dist-info → evoscientist-0.1.0rc2.dist-info}/WHEEL +0 -0
  36. {evoscientist-0.0.1.dev4.dist-info → evoscientist-0.1.0rc2.dist-info}/licenses/LICENSE +0 -0
  37. {evoscientist-0.0.1.dev4.dist-info → evoscientist-0.1.0rc2.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: EvoScientist
3
- Version: 0.0.1.dev4
3
+ Version: 0.1.0rc2
4
4
  Summary: EvoScientist: Towards Self-Evolving AI Scientists for End-to-End Scientific Discovery
5
5
  Author: Xi Zhang
6
6
  Maintainer: Xi Zhang
@@ -16,14 +16,11 @@ License-File: LICENSE
16
16
  Requires-Dist: deepagents>=0.3.6
17
17
  Requires-Dist: langchain>=1.2
18
18
  Requires-Dist: langchain-anthropic>=1.3
19
- Requires-Dist: langchain-openai>=0.3
20
- Requires-Dist: langchain-nvidia-ai-endpoints>=0.3
19
+ Requires-Dist: anthropic>=0.76
21
20
  Requires-Dist: tavily-python>=0.7
22
21
  Requires-Dist: pyyaml>=6.0
23
22
  Requires-Dist: rich>=14.0
24
23
  Requires-Dist: prompt-toolkit>=3.0
25
- Requires-Dist: questionary>=2.0.1
26
- Requires-Dist: typer>=0.12
27
24
  Requires-Dist: python-dotenv>=1.0
28
25
  Requires-Dist: langgraph-cli[inmem]>=0.4
29
26
  Requires-Dist: httpx>=0.27
@@ -31,8 +28,6 @@ Requires-Dist: markdownify>=0.14
31
28
  Provides-Extra: dev
32
29
  Requires-Dist: pytest>=8.0; extra == "dev"
33
30
  Requires-Dist: pytest-cov>=5.0; extra == "dev"
34
- Requires-Dist: ruff>=0.5; extra == "dev"
35
- Requires-Dist: build>=1.0; extra == "dev"
36
31
  Dynamic: license-file
37
32
 
38
33
  <!-- Add logo here -->
@@ -46,12 +41,11 @@ Dynamic: license-file
46
41
 
47
42
  <a href="https://git.io/typing-svg"><img src="https://readme-typing-svg.demolab.com?font=Fira+Code&pause=1000&width=435&lines=Towards+Self-Evolving+AI+Scientists+for+End-to-End+Scientific+Discovery" alt="Typing SVG" /></a>
48
43
 
49
- [![PyPI](https://img.shields.io/badge/PyPI-EvoScientist%20v0.0.1-3da9fc?style=for-the-badge&logo=python&logoColor=3da9fc)](https://pypi.org/project/EvoScientist/)
50
- [![Project Page](https://img.shields.io/badge/Project-Page-ff8e3c?style=for-the-badge&logo=googlelens&logoColor=ff8e3c)]()
44
+ [![Project Page](https://img.shields.io/badge/Project-Page-4285F4?style=for-the-badge&logo=googlelens&logoColor=4285F4)]()
51
45
  [![arXiv](https://img.shields.io/badge/arXiv-xxxx.xxxx-b31b1b?style=for-the-badge&logo=arxiv&logoColor=b31b1b)]()
46
+ [![Gradio Demo](https://img.shields.io/badge/Gradio-Online_Demo-FFCC00?style=for-the-badge&logo=gradio&logoColor=yellow&labelColor=grey)]()
47
+ [![Evaluation Split](https://img.shields.io/badge/HF-Test_Dataset-AECBFA?style=for-the-badge&logo=huggingface&logoColor=FFCC00&labelColor=grey)]()
52
48
  [![License](https://img.shields.io/badge/License-MIT-green?style=for-the-badge)]()
53
- <!-- [![Gradio Demo](https://img.shields.io/badge/Gradio-Online_Demo-FFCC00?style=for-the-badge&logo=gradio&logoColor=yellow&labelColor=grey)]()
54
- [![Evaluation Split](https://img.shields.io/badge/HF-Test_Dataset-AECBFA?style=for-the-badge&logo=huggingface&logoColor=FFCC00&labelColor=grey)]() -->
55
49
 
56
50
  </div>
57
51
 
@@ -65,9 +59,7 @@ Dynamic: license-file
65
59
 
66
60
 
67
61
  ## 📖 Contents
68
- - [🤖 Supported Models](#-supported-models)
69
62
  - [⛏️ Installation](#️-installation)
70
- - [🔑 API Key Configuration](#-api-key-configuration)
71
63
  - [⚡ Quick Start](#-quick-start)
72
64
  - [CLI Inference](#cli-inference)
73
65
  - [Script Inference](#script-inference)
@@ -78,24 +70,6 @@ Dynamic: license-file
78
70
  - [📦 Codebase Contributors](#-codebase-contributors)
79
71
  - [📜 License](#-license)
80
72
 
81
- ## 🤖 Supported Models
82
-
83
- | Provider | Short Name | Model ID |
84
- |----------|-----------|----------|
85
- | Anthropic | `claude-sonnet-4-5` | `claude-sonnet-4-5-20250929` |
86
- | Anthropic | `claude-opus-4-5` | `claude-opus-4-5-20251101` |
87
- | Anthropic | `claude-3-5-sonnet` | `claude-3-5-sonnet-20241022` |
88
- | Anthropic | `claude-3-5-haiku` | `claude-3-5-haiku-20241022` |
89
- | OpenAI | `gpt-4o` | `gpt-4o` |
90
- | OpenAI | `gpt-4o-mini` | `gpt-4o-mini` |
91
- | OpenAI | `o1` | `o1` |
92
- | OpenAI | `o1-mini` | `o1-mini` |
93
- | NVIDIA | `glm4.7` | `z-ai/glm4.7` |
94
- | NVIDIA | `deepseek-v3.1` | `deepseek-ai/deepseek-v3.1-terminus` |
95
- | NVIDIA | `nemotron-nano` | `nvidia/nemotron-3-nano-30b-a3b` |
96
-
97
- You can also use any full model ID directly — the provider will be inferred automatically.
98
-
99
73
  ## ⛏️ Installation
100
74
 
101
75
  > [!TIP]
@@ -131,56 +105,6 @@ uv pip install -e .
131
105
 
132
106
  </details>
133
107
 
134
- ## 🔑 API Key Configuration
135
-
136
- EvoScientist requires API keys for LLM inference and web search. You can configure them in three ways:
137
-
138
- ### Option A: Interactive Setup Wizard (Recommended)
139
-
140
- ```Shell
141
- EvoSci onboard
142
- ```
143
-
144
- The wizard guides you through selecting a provider, entering API keys, choosing a model, and configuring workspace settings. Keys are validated automatically.
145
-
146
- ### Option B: Environment Variables (Global)
147
-
148
- Set keys directly in your terminal session. Add these to your shell profile (`~/.bashrc`, `~/.zshrc`, etc.) to persist across sessions:
149
-
150
- ```Shell
151
- export ANTHROPIC_API_KEY="your_anthropic_api_key_here"
152
- export TAVILY_API_KEY="your_tavily_api_key_here"
153
-
154
- # Optional: OpenAI or NVIDIA provider
155
- export OPENAI_API_KEY="your_openai_api_key_here"
156
- export NVIDIA_API_KEY="your_nvidia_api_key_here"
157
- ```
158
-
159
- ### Option C: `.env` File (Project-level)
160
-
161
- Create a `.env` file in the project root. This keeps keys scoped to the project and out of your shell history:
162
-
163
- ```Shell
164
- cp .env.example .env
165
- ```
166
-
167
- Then edit `.env` and fill in your keys:
168
-
169
- ```
170
- ANTHROPIC_API_KEY=your_anthropic_api_key_here
171
- TAVILY_API_KEY=your_tavily_api_key_here
172
- ```
173
-
174
- > [!WARNING]
175
- > Never commit `.env` files containing real API keys to version control. The `.env` file is already included in `.gitignore`.
176
-
177
- | Key | Required | Description |
178
- |-----|----------|-------------|
179
- | `ANTHROPIC_API_KEY` | For Anthropic | Anthropic API key for Claude ([console.anthropic.com](https://console.anthropic.com/)) |
180
- | `OPENAI_API_KEY` | For OpenAI | OpenAI API key for GPT models ([platform.openai.com](https://platform.openai.com/)) |
181
- | `NVIDIA_API_KEY` | For NVIDIA | NVIDIA API key for NIM models ([build.nvidia.com](https://build.nvidia.com/)) |
182
- | `TAVILY_API_KEY` | Yes | Tavily API key for web search ([app.tavily.com](https://app.tavily.com/)) |
183
-
184
108
  ## ⚡ Quick Start
185
109
 
186
110
  ### CLI Inference
@@ -189,80 +113,11 @@ You can perform inference directly from the command line using our CLI tool:
189
113
  ![demo](./assets/EvoScientist_cli.png)
190
114
 
191
115
  ```Shell
192
- python -m EvoScientist
193
- ```
194
- or
195
- ```Shell
196
- EvoSci # or EvoScientist
116
+ python -m EvoScientist
197
117
  ```
198
- **Optional arguments:**
199
-
200
- ```
201
- --mode <mode> Workspace mode: 'daemon' (persistent) or 'run' (isolated per-session)
202
- --workdir <path> Override workspace directory for this session
203
- --use-cwd Use current working directory as workspace
204
- --thread-id <id> Resume a conversation thread
205
- --no-thinking Disable thinking display
206
- -p, --prompt <q> Single-shot mode: execute query and exit
207
- ```
208
-
209
- **Configuration commands:**
210
-
211
- ```Shell
212
- EvoSci onboard # Interactive setup wizard
213
- EvoSci onboard --skip-validation # Skip API key validation
214
- EvoSci config # List all configuration values
215
- EvoSci config get <key> # Get a single value
216
- EvoSci config set <key> <val> # Set a single value
217
- EvoSci config reset --yes # Reset to defaults
218
- EvoSci config path # Show config file path
219
- ```
220
-
221
- **Interactive Commands:**
222
-
223
- | Command | Description |
224
- |---------|-------------|
225
- | `/exit` | Quit the session |
226
- | `/new` | Start a new session (new workspace + thread) |
227
- | `/thread` | Show current thread ID and workspace path |
228
- | `/skills` | List installed user skills |
229
- | `/install-skill <source>` | Install a skill from local path or GitHub |
230
- | `/uninstall-skill <name>` | Uninstall a user-installed skill |
231
-
232
- **Skill Installation Examples:**
118
+ **Optional arguments:**
233
119
 
234
- ```bash
235
- # Install from local path
236
- /install-skill ./my-skill
237
-
238
- # Install from GitHub URL
239
- /install-skill https://github.com/owner/repo/tree/main/skill-name
240
-
241
- # Install from GitHub shorthand
242
- /install-skill owner/repo@skill-name
243
- ```
244
-
245
- ### Runtime Directories
246
-
247
- By default, the **workspace** is created under the current directory:
248
-
249
- ```
250
- ./workspace/
251
- memory/ # shared MEMORY.md (persistent across sessions)
252
- skills/ # user-installed skills
253
- runs/ # per-session workspaces
254
- ```
255
-
256
- You can force workspace to be the current directory via `--use-cwd`.
257
-
258
- Override individual paths via environment variables:
259
-
260
- | Variable | Default | Description |
261
- |----------|---------|-------------|
262
- | `EVOSCIENTIST_WORKSPACE_DIR` | `./workspace` | Root workspace directory |
263
- | `EVOSCIENTIST_RUNS_DIR` | `./workspace/runs` | Per-session run directories |
264
- | `EVOSCIENTIST_MEMORY_DIR` | `./workspace/memory` | Shared memory storage |
265
- | `EVOSCIENTIST_SKILLS_DIR` | `./workspace/skills` | User-installed skills |
120
+ > TODO
266
121
 
267
122
  ### Script Inference
268
123
  ```python
@@ -1,20 +1,13 @@
1
- EvoScientist/EvoScientist.py,sha256=qhiCOOZvH6cmjLiKRMvfr74xJM7x-dZrrRoX9xrfLtQ,6053
2
- EvoScientist/__init__.py,sha256=BN8yi3iCIaq2gNfKORrI9OvMq49a2LrYWgEqW86vYLw,1120
1
+ EvoScientist/EvoScientist.py,sha256=j0J-bIIxAvG1acsDCcEYmb4FIYoyibdRSQSkzoQUcg4,4627
2
+ EvoScientist/__init__.py,sha256=yj4YJUPldtq4xx8geadIoZ1n-BmgsM2Z_S2W8ld9S1k,702
3
3
  EvoScientist/__main__.py,sha256=P5USQ_BiiY0TBhtajGMuX5AMXlQ5joz1kvljHeacqmA,91
4
- EvoScientist/backends.py,sha256=3fIYRdOecL-KZx2hSNolsLO-2_rMzey-NpVMDMN701U,13355
5
- EvoScientist/cli.py,sha256=5y_yTBhLnXxI5JVFawcYbsbDEWMED_t2-X4LVbT24kY,25978
6
- EvoScientist/config.py,sha256=rXD_qlrTxP3HLH7H6DxvqKP4WwymyrzRyS8665igd6k,8649
7
- EvoScientist/memory.py,sha256=ZgITkiLezjAeo9z12UWRZurE1hZU7ehF-SAKrchPIEs,26475
8
- EvoScientist/middleware.py,sha256=hBHov8wFhe-AS-C84BFRDgikl5q8Xb9AMU4FfNxs9Jg,2620
9
- EvoScientist/onboard.py,sha256=x6THI4ryTMTBQBb90JRFhcZmPsc970yh77_VCuNqwm8,22200
10
- EvoScientist/paths.py,sha256=r3u632RJXfl8KPVhWBwVKPx9zFbvj1CZCIf7NeFBja4,1346
4
+ EvoScientist/backends.py,sha256=yKI5fofVd3sDxJp5BEaqPsXjIOrKrpge1KnFG-X7gzU,12321
5
+ EvoScientist/cli.py,sha256=-7iL6NUjW5CmLKx1BLd0d-Y2DtcXPcoMOCdOgA6X-_E,59946
6
+ EvoScientist/middleware.py,sha256=ai2SZjSNtGCMQdFiMELPJ1t0uKPDZ199Lp5dEr5EnTo,931
11
7
  EvoScientist/prompts.py,sha256=ni-qHoEoM703xtfD4J3IlvwAWPcW8gcNiCBVjRJoy3g,10692
12
- EvoScientist/skills_manager.py,sha256=r1ZCnZkFij-uRwj09FmT67VFR5eRgd3ynzKWmykQJeI,12205
13
8
  EvoScientist/subagent.yaml,sha256=yoFlMJWitLlYuOe4_44EPG6vjpNP_txHBlqr-kNX2GM,6130
14
- EvoScientist/tools.py,sha256=7rCq3Sy74qAKEKnttvy9H7-LB8moXeYK0h7xRJnZJGk,6772
9
+ EvoScientist/tools.py,sha256=oYaJN8tl_NCw6PLFFNRZbjPB9-VriVcpVb6Zp-d_xVQ,4223
15
10
  EvoScientist/utils.py,sha256=GuWMRMkPHYgUOtoPZA0ErIt4FUBE4NMkz_OZluxYyRo,6801
16
- EvoScientist/llm/__init__.py,sha256=A3nQPKGP6qqh2K72_NZlUozNNwfD4jcEMyBerne9IGc,363
17
- EvoScientist/llm/models.py,sha256=3AhHG__OLbnQlgB3kIM3Ejf9kU2Cv6rDzc7uT5eKzYk,3335
18
11
  EvoScientist/skills/accelerate/SKILL.md,sha256=Ju_xLlGW3bZBWQO_8FWThkP155jE2atq9Ww0Zn8XwEs,8328
19
12
  EvoScientist/skills/accelerate/references/custom-plugins.md,sha256=Gy8c9dcKFV93ksrRKkZr5DFbeH_iHgGzbTK_N0aTwCA,11781
20
13
  EvoScientist/skills/accelerate/references/megatron-integration.md,sha256=ad7cw8eMGX3vqGUxQSVBuWpiQJDAr9eHqWfPhlEXJz0,11252
@@ -23,11 +16,14 @@ EvoScientist/skills/bitsandbytes/SKILL.md,sha256=3VM2RakwcfyTM6Yul6MwgDnUqHPV-3F
23
16
  EvoScientist/skills/bitsandbytes/references/memory-optimization.md,sha256=a8y1Mt5qkEeFylaRRPuGSKGnBXIL2JT6xFDdW-qBBWc,12642
24
17
  EvoScientist/skills/bitsandbytes/references/qlora-training.md,sha256=E2Nrxy-_gLz6nEgA30MQ_RQ4mdRX3w-aJO7f16RJriQ,12015
25
18
  EvoScientist/skills/bitsandbytes/references/quantization-formats.md,sha256=U1nvDKjlg305DaYvlyJW2SS5NMNVI2XHD__m1YEErH4,10258
19
+ EvoScientist/skills/clip/SKILL.md,sha256=n8rPHAQdce8eYcfKwrt6LELD0Z1sKg_C5fWjyWQbej4,6884
20
+ EvoScientist/skills/clip/references/applications.md,sha256=aC_DE-Y8775GbtDv30gEiUajq7KS5fMs9AWPz1lpKuk,5360
26
21
  EvoScientist/skills/find-skills/SKILL.md,sha256=fvjNEIEVsOauW_LuEKshYkbvd19pRdVV-rXcQqfFeKo,4169
27
22
  EvoScientist/skills/find-skills/scripts/install_skill.py,sha256=sbLrZeY887LeiKcvA7f3AuxJI98PwGeAVyttVXxs_eA,6332
28
23
  EvoScientist/skills/flash-attention/SKILL.md,sha256=3GL1xP6jFkjZhs9ZcE-61FbkB5d4p7NvVXm9MvxTG58,10190
29
24
  EvoScientist/skills/flash-attention/references/benchmarks.md,sha256=Jk_zBgr4JMMvem48DgIIw4ZGxyiyKS-zXt6SOjjWC2s,7129
30
25
  EvoScientist/skills/flash-attention/references/transformers-integration.md,sha256=ievo4gdW7iGBA6EUTUaC6WCg-qB4cMJYhTC8jSbEQaE,7427
26
+ EvoScientist/skills/langgraph-docs/SKILL.md,sha256=8Whxox7qKnNti7ijSJlDtscsk2dPXeNFFdr8dKWHAfY,1054
31
27
  EvoScientist/skills/llama-cpp/SKILL.md,sha256=10yqRUg_Wzxr1iZ-ObREYnmJ_5D9uEtsLnw9pN3xQ-8,5912
32
28
  EvoScientist/skills/llama-cpp/references/optimization.md,sha256=TomBHAgn9eud65_GCc1EHrGX-w-oXnndjB8nKxSmaf0,1659
33
29
  EvoScientist/skills/llama-cpp/references/quantization.md,sha256=x2hqhok9Tg4FLMczti6hvA5dro8bF0Q2zCk6RqSGiT0,4956
@@ -101,17 +97,23 @@ EvoScientist/skills/skill-creator/references/workflows.md,sha256=70hGh31dq0dRGgG
101
97
  EvoScientist/skills/skill-creator/scripts/init_skill.py,sha256=C7olC5TKpMsrKLFdrSb9zzca7aTJeXuBIOVcLjPgxzw,10863
102
98
  EvoScientist/skills/skill-creator/scripts/package_skill.py,sha256=sx-8s-Ni1cUwjpklX_joPN46UT4GNpU5ZKZISUyhCTE,3288
103
99
  EvoScientist/skills/skill-creator/scripts/quick_validate.py,sha256=OBqy09H9XsMjcQFkEwY-_5nQ1IxBV0cIXGFRfpZ9u4c,3523
104
- EvoScientist/stream/__init__.py,sha256=_mdc88i75D3qlfuIBWpNm4-W5xMYIvM39vERgb53Bkk,1933
105
- EvoScientist/stream/display.py,sha256=jCyohjfulwgyV-gOa5g5HXsepNLNLjdMdfQE9bt1-ZA,22565
100
+ EvoScientist/skills/tensorboard/SKILL.md,sha256=cXxLBfiLvIiNVMxR-jkK4iXWh7O4b7YW42zH_CYQgCA,15276
101
+ EvoScientist/skills/tensorboard/references/integrations.md,sha256=pkfUfpWJ63q7vLSU_CyPIcK4yrH-46WeMMq0uBAUzUo,16205
102
+ EvoScientist/skills/tensorboard/references/profiling.md,sha256=FHEwLVicAMO9nQJHAI1zLk9EaEJpKy3EWH7IJ4rNM9g,13337
103
+ EvoScientist/skills/tensorboard/references/visualization.md,sha256=Dl72GAjcC7HTggoGlaqGpK9mWfG6IyQgSVO4TdpvOBU,14897
104
+ EvoScientist/skills/vllm/SKILL.md,sha256=j4Yt6lbZa9jQvBlUa92hYWYwZCVQeWFBxI17_4zs4DI,9013
105
+ EvoScientist/skills/vllm/references/optimization.md,sha256=D4YNM3rbHQcj1AcNizFEUX8RGtf2U2BpJ7xnp6AZsaw,5769
106
+ EvoScientist/skills/vllm/references/quantization.md,sha256=X7MOqej77Ep_MEfzfRDAkA0QzS32ZVWBj_1CWjspsnA,6746
107
+ EvoScientist/skills/vllm/references/server-deployment.md,sha256=fbYY7EC4Zf4u-s9GwEw9XcIz_GSjxj0mRRr7l7eVET4,5252
108
+ EvoScientist/skills/vllm/references/troubleshooting.md,sha256=MHrNkI5gZ0AXvSNjcm5rm-GUEAYuPbBkUpCmmAKXYoM,9037
109
+ EvoScientist/stream/__init__.py,sha256=cO30Ujs7mVB1pZjI0AXgaggmPeV6jXgBjt6AKYH42kQ,1219
106
110
  EvoScientist/stream/emitter.py,sha256=zmdn8vIXNgkgoWRtanrMtPN2GlsHmZtdFmoqCry3o_o,2978
107
- EvoScientist/stream/events.py,sha256=dSnHsDGl_HEBbfmQYv40YZVR-RDZPLZFsjlwmO46ch4,17251
108
111
  EvoScientist/stream/formatter.py,sha256=vyv89NGoTzxjsWt0teBXX38MZzFLhzMDBUcIH6-slDo,5532
109
- EvoScientist/stream/state.py,sha256=RX7JOBJLYXu7tdtDx71QR2U8JDHHTsB4GM877z9UKLM,12961
110
112
  EvoScientist/stream/tracker.py,sha256=cVWmiTCiwzOh84I7sAXXfgr_HXxOCCCzTvli-XJhthQ,3670
111
- EvoScientist/stream/utils.py,sha256=yQXhPIzOYzpNUUyDvkQDv1K-Yo0ePkXMtU7fHhRoG64,7718
112
- evoscientist-0.0.1.dev4.dist-info/licenses/LICENSE,sha256=NsYFy5JSm90lmXcPNQuthVTCVaVcbT4XZ9h5HpAoGIo,1069
113
- evoscientist-0.0.1.dev4.dist-info/METADATA,sha256=Hi6nET3VH8m2uv_JIcCNrQZJz4jL1OfbMd6jM5tGEY0,13901
114
- evoscientist-0.0.1.dev4.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
115
- evoscientist-0.0.1.dev4.dist-info/entry_points.txt,sha256=mGxz9_-jfGhwkdiiVGTQ9IQEhzLixWJoPNU39_boWMM,154
116
- evoscientist-0.0.1.dev4.dist-info/top_level.txt,sha256=XBZouSd9lQfNn0Fus6jQb9nqdXzAbKyzh987Jt3A2-A,13
117
- evoscientist-0.0.1.dev4.dist-info/RECORD,,
113
+ EvoScientist/stream/utils.py,sha256=36e5aaEZVpwTZnqO1qlVs2QTr04JbmWuvHMSbor49xM,7278
114
+ evoscientist-0.1.0rc2.dist-info/licenses/LICENSE,sha256=NsYFy5JSm90lmXcPNQuthVTCVaVcbT4XZ9h5HpAoGIo,1069
115
+ evoscientist-0.1.0rc2.dist-info/METADATA,sha256=2a_6L4t6tuldTQEvLYZFyoNgOeOFxFq5Pr0hdO0YxOY,8581
116
+ evoscientist-0.1.0rc2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
117
+ evoscientist-0.1.0rc2.dist-info/entry_points.txt,sha256=AQTfRSD-9-fgD1ViOdbGcvhsNeaUNgvmNqLkNY7o7Zw,55
118
+ evoscientist-0.1.0rc2.dist-info/top_level.txt,sha256=XBZouSd9lQfNn0Fus6jQb9nqdXzAbKyzh987Jt3A2-A,13
119
+ evoscientist-0.1.0rc2.dist-info/RECORD,,
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ evoscientist = EvoScientist.cli:main
EvoScientist/config.py DELETED
@@ -1,274 +0,0 @@
1
- """Configuration management for EvoScientist.
2
-
3
- Handles loading, saving, and merging configuration from multiple sources
4
- with the following priority (highest to lowest):
5
- CLI arguments > Environment variables > Config file > Defaults
6
- """
7
-
8
- from __future__ import annotations
9
-
10
- import os
11
- from dataclasses import dataclass, asdict, fields
12
- from pathlib import Path
13
- from typing import Any, Literal
14
-
15
- import yaml
16
-
17
-
18
- # =============================================================================
19
- # Configuration paths
20
- # =============================================================================
21
-
22
- def get_config_dir() -> Path:
23
- """Get the configuration directory path.
24
-
25
- Uses XDG_CONFIG_HOME if set, otherwise ~/.config/evoscientist/
26
- """
27
- xdg_config = os.environ.get("XDG_CONFIG_HOME")
28
- if xdg_config:
29
- return Path(xdg_config) / "evoscientist"
30
- return Path.home() / ".config" / "evoscientist"
31
-
32
-
33
- def get_config_path() -> Path:
34
- """Get the path to the configuration file."""
35
- return get_config_dir() / "config.yaml"
36
-
37
-
38
- # =============================================================================
39
- # Configuration dataclass
40
- # =============================================================================
41
-
42
- @dataclass
43
- class EvoScientistConfig:
44
- """EvoScientist configuration settings.
45
-
46
- Attributes:
47
- anthropic_api_key: Anthropic API key for Claude models.
48
- openai_api_key: OpenAI API key for GPT models.
49
- tavily_api_key: Tavily API key for web search.
50
- provider: Default LLM provider ('anthropic' or 'openai').
51
- model: Default model name (short name or full ID).
52
- default_mode: Default workspace mode ('daemon' or 'run').
53
- default_workdir: Default workspace directory (empty = use ./workspace).
54
- max_concurrent: Maximum concurrent sub-agents.
55
- max_iterations: Maximum delegation iterations.
56
- show_thinking: Whether to show thinking panels in CLI.
57
- """
58
-
59
- # API Keys
60
- anthropic_api_key: str = ""
61
- openai_api_key: str = ""
62
- nvidia_api_key: str = ""
63
- tavily_api_key: str = ""
64
-
65
- # LLM Settings
66
- provider: str = "anthropic"
67
- model: str = "claude-sonnet-4-5"
68
-
69
- # Workspace Settings
70
- default_mode: Literal["daemon", "run"] = "daemon"
71
- default_workdir: str = ""
72
-
73
- # Agent Parameters
74
- max_concurrent: int = 3
75
- max_iterations: int = 3
76
-
77
- # UI Settings
78
- show_thinking: bool = True
79
-
80
-
81
- # =============================================================================
82
- # Config file operations
83
- # =============================================================================
84
-
85
- def load_config() -> EvoScientistConfig:
86
- """Load configuration from file.
87
-
88
- Returns:
89
- EvoScientistConfig instance with values from file, or defaults if
90
- file doesn't exist.
91
- """
92
- config_path = get_config_path()
93
-
94
- if not config_path.exists():
95
- return EvoScientistConfig()
96
-
97
- try:
98
- with open(config_path) as f:
99
- data = yaml.safe_load(f) or {}
100
-
101
- # Filter to only valid fields
102
- valid_fields = {f.name for f in fields(EvoScientistConfig)}
103
- filtered_data = {k: v for k, v in data.items() if k in valid_fields}
104
-
105
- return EvoScientistConfig(**filtered_data)
106
- except Exception:
107
- # On any error, return defaults
108
- return EvoScientistConfig()
109
-
110
-
111
- def save_config(config: EvoScientistConfig) -> None:
112
- """Save configuration to file.
113
-
114
- Args:
115
- config: EvoScientistConfig instance to save.
116
- """
117
- config_path = get_config_path()
118
- config_path.parent.mkdir(parents=True, exist_ok=True)
119
-
120
- data = asdict(config)
121
-
122
- # Save all fields including empty API keys (users can set them via env vars instead)
123
- with open(config_path, "w") as f:
124
- yaml.safe_dump(data, f, default_flow_style=False, sort_keys=False)
125
-
126
-
127
- def reset_config() -> None:
128
- """Reset configuration to defaults by deleting the config file."""
129
- config_path = get_config_path()
130
- if config_path.exists():
131
- config_path.unlink()
132
-
133
-
134
- # =============================================================================
135
- # Config value operations
136
- # =============================================================================
137
-
138
- def get_config_value(key: str) -> Any:
139
- """Get a single configuration value.
140
-
141
- Args:
142
- key: Configuration key name.
143
-
144
- Returns:
145
- The value, or None if key doesn't exist.
146
- """
147
- config = load_config()
148
- return getattr(config, key, None)
149
-
150
-
151
- def set_config_value(key: str, value: Any) -> bool:
152
- """Set a single configuration value.
153
-
154
- Args:
155
- key: Configuration key name.
156
- value: New value.
157
-
158
- Returns:
159
- True if successful, False if key is invalid.
160
- """
161
- valid_fields = {f.name for f in fields(EvoScientistConfig)}
162
- if key not in valid_fields:
163
- return False
164
-
165
- config = load_config()
166
-
167
- # Type coercion based on field type
168
- field_info = next(f for f in fields(EvoScientistConfig) if f.name == key)
169
- field_type = field_info.type
170
-
171
- try:
172
- if field_type == "bool" or field_type is bool:
173
- if isinstance(value, str):
174
- value = value.lower() in ("true", "1", "yes", "on")
175
- else:
176
- value = bool(value)
177
- elif field_type == "int" or field_type is int:
178
- value = int(value)
179
- elif field_type == "str" or field_type is str:
180
- value = str(value)
181
- except (ValueError, TypeError):
182
- return False
183
-
184
- setattr(config, key, value)
185
- save_config(config)
186
- return True
187
-
188
-
189
- def list_config() -> dict[str, Any]:
190
- """List all configuration values.
191
-
192
- Returns:
193
- Dictionary of all configuration key-value pairs.
194
- """
195
- return asdict(load_config())
196
-
197
-
198
- # =============================================================================
199
- # Effective configuration (merging sources)
200
- # =============================================================================
201
-
202
- # Environment variable mappings
203
- _ENV_MAPPINGS = {
204
- "anthropic_api_key": "ANTHROPIC_API_KEY",
205
- "openai_api_key": "OPENAI_API_KEY",
206
- "nvidia_api_key": "NVIDIA_API_KEY",
207
- "tavily_api_key": "TAVILY_API_KEY",
208
- "default_mode": "EVOSCIENTIST_DEFAULT_MODE",
209
- "default_workdir": "EVOSCIENTIST_WORKSPACE_DIR",
210
- }
211
-
212
-
213
- def get_effective_config(cli_overrides: dict[str, Any] | None = None) -> EvoScientistConfig:
214
- """Get effective configuration by merging all sources.
215
-
216
- Priority (highest to lowest):
217
- 1. CLI arguments (cli_overrides)
218
- 2. Environment variables
219
- 3. Config file
220
- 4. Defaults
221
-
222
- Args:
223
- cli_overrides: Dictionary of CLI argument overrides.
224
-
225
- Returns:
226
- EvoScientistConfig with merged values.
227
- """
228
- # Start with file config (includes defaults for missing values)
229
- config = load_config()
230
- data = asdict(config)
231
-
232
- # Apply environment variable overrides
233
- for config_key, env_key in _ENV_MAPPINGS.items():
234
- env_value = os.environ.get(env_key)
235
- if env_value:
236
- # Type coercion
237
- field_info = next(f for f in fields(EvoScientistConfig) if f.name == config_key)
238
- field_type = field_info.type
239
- if field_type == "bool" or field_type is bool:
240
- data[config_key] = env_value.lower() in ("true", "1", "yes", "on")
241
- elif field_type == "int" or field_type is int:
242
- try:
243
- data[config_key] = int(env_value)
244
- except ValueError:
245
- pass
246
- else:
247
- data[config_key] = env_value
248
-
249
- # Apply CLI overrides (highest priority)
250
- if cli_overrides:
251
- for key, value in cli_overrides.items():
252
- if value is not None and key in data:
253
- data[key] = value
254
-
255
- return EvoScientistConfig(**data)
256
-
257
-
258
- def apply_config_to_env(config: EvoScientistConfig) -> None:
259
- """Apply config API keys to environment variables if not already set.
260
-
261
- This allows the config file to provide API keys that downstream
262
- libraries (like langchain-anthropic) can pick up.
263
-
264
- Args:
265
- config: Configuration to apply.
266
- """
267
- if config.anthropic_api_key and not os.environ.get("ANTHROPIC_API_KEY"):
268
- os.environ["ANTHROPIC_API_KEY"] = config.anthropic_api_key
269
- if config.openai_api_key and not os.environ.get("OPENAI_API_KEY"):
270
- os.environ["OPENAI_API_KEY"] = config.openai_api_key
271
- if config.nvidia_api_key and not os.environ.get("NVIDIA_API_KEY"):
272
- os.environ["NVIDIA_API_KEY"] = config.nvidia_api_key
273
- if config.tavily_api_key and not os.environ.get("TAVILY_API_KEY"):
274
- os.environ["TAVILY_API_KEY"] = config.tavily_api_key
@@ -1,21 +0,0 @@
1
- """LLM module for EvoScientist.
2
-
3
- Provides a unified interface for creating chat model instances
4
- with support for multiple providers.
5
- """
6
-
7
- from .models import (
8
- MODELS,
9
- DEFAULT_MODEL,
10
- get_chat_model,
11
- list_models,
12
- get_model_info,
13
- )
14
-
15
- __all__ = [
16
- "MODELS",
17
- "DEFAULT_MODEL",
18
- "get_chat_model",
19
- "list_models",
20
- "get_model_info",
21
- ]