Commit 17fd9f3
* feat: add PRD for Daytona Sandbox Backend integration (#751)
Add product requirements document for integrating DaytonaSandbox as an
optional deepagents backend, activated via metadata.sandbox="daytona".
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* prd.json, progress.txt reset
* feat: US-001 - Add langchain-daytona dependency to pyproject.toml
Add langchain-daytona>=0.0.2 and daytona>=0.140.0 to backend dependencies.
The explicit daytona pin ensures the SDK version with the correct `daytona`
module name is resolved (older versions used `daytona_sdk`).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-002 - Add conditional import and create_daytona_backend() factory
Add DAYTONA_API_KEY to constants and UserTokenKey enum. Add conditional
try/except import for Daytona and DaytonaSandbox in src/agents/__init__.py.
Implement create_daytona_backend() factory that creates a sandbox via the
Daytona client and wraps it in DaytonaSandbox, returning (None, None)
gracefully on missing packages, missing API key, or creation errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-003 - Wire Daytona backend into LLMController (llm.py)
llm_invoke() now checks params.metadata.sandbox for 'daytona' and creates
a Daytona sandbox backend via create_daytona_backend(). Falls back to
StateBackend with a SystemMessage notification when creation fails.
daytona_sandbox.stop() is called in the finally block for cleanup.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-004 - Wire Daytona backend into stream_generator (stream.py)
stream_generator() now checks config metadata for sandbox='daytona' and
creates a Daytona sandbox backend via create_daytona_backend(). Falls back
to StateBackend with an SSE system message on failure. daytona_sandbox.stop()
is called in the finally block for cleanup.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-005 - Wire Daytona backend into worker task (tasks.py)
_execute_agent_stream() now checks config metadata for sandbox='daytona'
and creates a Daytona sandbox backend via create_daytona_backend(). Falls
back to StateBackend with a Redis stream system message on failure.
daytona_sandbox.stop() is called in the finally block for cleanup.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-006 - Add unit tests for backend factory and wiring
Add 8 unit tests for create_daytona_backend() covering:
- Returns (None, None) when DaytonaSandbox is None (package missing)
- Returns (None, None) when Daytona client is None
- Returns (None, None) when API key is None or empty
- Returns valid (sandbox, backend) tuple with mocked client
- Returns (None, None) and logs error on client.create() exception
- Uses DAYTONA_API_KEY constant as fallback
- sandbox.stop() cleanup works correctly
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* - finshed iteration 1
* feat: US-001 - Create unified resolve_sandbox_backend() helper
Add resolve_sandbox_backend() that tries Daytona first and silently
falls back to StateBackend. Create daytona.py with
validate_daytona_execute_capability(). Add Daytona deps and constants.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-002 - Simplify invoke execution path in llm.py
Replace self.init_backend() with resolve_sandbox_backend() in llm_invoke()
so the invoke path uses the shared Daytona-first helper. Delete the
controller's init_backend() method and update imports accordingly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-003 - Simplify stream execution path in stream.py
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-004 - Simplify worker execution path in tasks.py
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-005 - Remove sandbox_backend from backend settings infrastructure
All sandbox_backend settings infrastructure was already absent from the
codebase. Verified and marked as passing. Includes formatting fix from
make format on tasks.py imports.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-006 - Remove sandbox_backend from frontend
All sandbox_backend frontend infrastructure was already absent from the
codebase. Verified: no component, type, function, or test file exists.
Frontend typecheck and all 180 tests pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-007 - Clean up dead backend code
Remove init_backend() from agents/__init__.py (no remaining callers)
and inline its logic into resolve_sandbox_backend() fallback path.
daytona_fallback_message() was already absent from the codebase.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-008 - Update and rewrite unit tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* - iter 1 done
* feat: US-009 - Remove StoreBackend routes from resolve_sandbox_backend() and all callers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-010 - Update unit tests for routeless resolve_sandbox_backend()
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-010 - Update unit tests for routeless resolve_sandbox_backend()
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* docs: add PRD for extensible sandbox/backend selection (#769)
Product requirements document for user-configurable sandbox selection
using enum + registry dict + factory function pattern.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* Archive previous
* chore: add Ralph prd.json for extensible sandbox selection (#769)
Converted PRD to Ralph format with 10 user stories ordered by dependency:
schema -> repo -> route -> registry -> wiring -> frontend.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-001 - Add SandboxType enum and schema fields
- Add SandboxType(str, Enum) with values auto, daytona, state
- Add default_sandbox field to UserSettings entity
- Add default_sandbox field to UserSettingsResponse model
- Add UpdateDefaultSandboxRequest schema
- Export new types from entities __init__.py
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-002 - Add set_default_sandbox repo method with unit tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-003 - Add PUT /settings/default-sandbox endpoint with route tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-004 - Implement registry pattern in resolve_sandbox_backend with dispatch tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-005 - Wire sandbox_type through LLMController
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-007 - Wire sandbox_type through worker tasks
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-008 - Frontend service types and API call
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-009 - SandboxSettings frontend component
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* feat: US-010 - Wire SandboxSettings into Settings page
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* chore: mark US-010 complete and update progress
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
* fix: patch correct function name in worker model resolution tests
The tests patched non-existent `src.agents.init_backend` — the actual
function is `resolve_sandbox_backend`. Also supply the 2-tuple return
value it expects and add `default_sandbox` to FakeSettings.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Signed-off-by: ryaneggz <kre8mymedia@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0d51cc5 commit 17fd9f3
28 files changed
Lines changed: 2132 additions & 556 deletions
File tree
- .ralph
- backend
- src
- agents
- constants
- controllers
- repos
- routes/v0
- schemas/entities
- utils
- workers
- tests/unit
- agents
- controllers
- repos
- routes
- services
- workers
- frontend
- src
- components/settings
- lib/services
- pages/settings
- tasks
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| 24 | + | |
| 25 | + | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
24 | 33 | | |
25 | 34 | | |
26 | 35 | | |
| |||
232 | 241 | | |
233 | 242 | | |
234 | 243 | | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
243 | 298 | | |
244 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
245 | 335 | | |
246 | 336 | | |
247 | 337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| |||
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| 137 | + | |
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| |||
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | 48 | | |
54 | 49 | | |
55 | 50 | | |
| |||
71 | 66 | | |
72 | 67 | | |
73 | 68 | | |
74 | | - | |
75 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
76 | 73 | | |
77 | | - | |
78 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
79 | 77 | | |
80 | 78 | | |
81 | 79 | | |
82 | 80 | | |
83 | 81 | | |
84 | | - | |
| 82 | + | |
85 | 83 | | |
86 | 84 | | |
87 | 85 | | |
| |||
95 | 93 | | |
96 | 94 | | |
97 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
98 | 99 | | |
99 | 100 | | |
100 | | - | |
| 101 | + | |
101 | 102 | | |
102 | 103 | | |
103 | | - | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| |||
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
120 | | - | |
121 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
| |||
129 | 132 | | |
130 | 133 | | |
131 | 134 | | |
132 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
133 | 139 | | |
134 | 140 | | |
135 | 141 | | |
| |||
161 | 167 | | |
162 | 168 | | |
163 | 169 | | |
164 | | - | |
165 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
166 | 174 | | |
167 | 175 | | |
168 | 176 | | |
| |||
174 | 182 | | |
175 | 183 | | |
176 | 184 | | |
| 185 | + | |
177 | 186 | | |
178 | 187 | | |
179 | 188 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
74 | 87 | | |
75 | 88 | | |
76 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
45 | 67 | | |
46 | 68 | | |
47 | 69 | | |
| |||
60 | 82 | | |
61 | 83 | | |
62 | 84 | | |
| 85 | + | |
63 | 86 | | |
64 | 87 | | |
65 | 88 | | |
| |||
80 | 103 | | |
81 | 104 | | |
82 | 105 | | |
| 106 | + | |
83 | 107 | | |
84 | 108 | | |
0 commit comments